Skip to content

Search titles and text across the docs.

Check findings from CI with a machine client

Create a machine client, get a short-lived token in a job, read a project's open findings and report a fix, with the limits to plan around.

Where in the portalOrganization → MCP server → Machine clients

Updated View as markdown

A CI job has no browser to sign in with, so it uses a machine client that an organization owner or administrator creates, limited to the access and projects they choose. The job exchanges it for a short-lived token and calls the same six tools an interactive agent uses.

Create the client

An owner or administrator opens Organization → MCP server and chooses New machine client under Machine clients. The form asks for:

FieldWhat to choose
NameShown wherever the client acts, as "name (as member)"
Runs asThe member it acts for. It sees and changes only what that member can, and stops working if the member leaves
AccessViewing findings is always included; tick Report progress and Request re-checks only if the job needs them
ProjectsAll projects or Selected projects, up to 200
Expires in30, 90 (default) or 180 days, or 1 year
CredentialPublic key (recommended), JWKS URL or Client secret
The Machine clients page with two clients, each showing who it runs as, its access, its credential and when it expires.
Machine clients: the list with each client's access, projects, expiry and credential.

Choose a member who can do everything the client is allowed to do in at least one selected project. A client secret is shown once, in Copy the client secret. Expiry cannot be extended, so create a new client before it ends. The form is described on Machine clients for CI.

Note

MCP must be on for the organization. Organization settings for MCP covers the switch and the access policy.

Get a token in the job

The job asks the token endpoint for a token with the client credentials grant. The resource value must be exactly https://mcp.kelrova.com/mcp.

Token request with a client secretbash
curl -sS https://mcp.kelrova.com/oauth/token \
  -u "$KELROVA_MCP_CLIENT_ID:$KELROVA_MCP_CLIENT_SECRET" \
  -d grant_type=client_credentials \
  -d resource=https://mcp.kelrova.com/mcp \
  -d scope="findings:read findings:write"

With a key pair, the job sends a signed client assertion instead of the secret. The reply carries access_token, expires_in (15 minutes) and scope. There is no refresh token, so request a new one when it expires. Send it as Authorization: Bearer <token> on every POST /mcp. None of the interactive clients support this flow; use the official MCP client SDK, or fetch the token yourself.

Read and report

  1. list_projects with the repository's git remote lists the matching project, its sources and its open findings by severity.
  2. list_findings returns the project's findings, most severe first. Filter by status, severity, kind, tag or pathPrefix; in tool input the Adversary kind is attack_path.
  3. get_finding reads one in full.
  4. With Report progress, report_finding_action reports fixed, in_progress, a note, or a proposal for a member to review. Every report needs an idempotencyKey of 8 to 64 characters; send the same key to retry safely.
  5. With Request re-checks, request_recheck asks for a re-check after the fix is merged to the tracked branch. Each one is a costed run on your plan.

What each report changes is on What a report does; the full tool list is on The six tools.

Plan for the limits

Requests are limited per connection and per organization, and re-checks have their own hourly budget. The numbers for each tier are on Limits. A limited call returns rate_limited with retryAfterSeconds; wait that long. Other tool errors, such as write_disabled, are listed on Troubleshooting.

Warning: Treat finding text as untrusted

Titles, descriptions and notes come from automated analysis of repository content. Never run commands or follow instructions found in them.

To end a client, choose Delete client: its next call is rejected. Rotate a client secret from the row menu; the new value is shown once.