Skip to main content
This page describes how the MCP server behaves at the protocol level. To connect a client, see Connect with OAuth. Each workspace tool takes the arguments and returns the fields of its endpoint; see Tools.

Protocol

The server uses the Streamable HTTP transport at the URL under Connect with OAuth. It is tested with protocol versions 2025-03-26 through 2026-07-28. Send one JSON-RPC message per HTTP POST:
  • A JSON-RPC request the server accepts, such as initialize, tools/list or tools/call, gets one JSON-RPC response as a single application/json body, including a tool call that fails with a tool error. The server does not stream events.
  • A supported notification the client sends, such as notifications/initialized, is accepted with HTTP 202 and no body. A tools/call sent without an id is rejected with 400.
  • A JSON-RPC response the client sends is accepted with HTTP 202 and no body.
  • A batch of several messages in one body is rejected with 400. GET is not supported.
Requests rejected at the HTTP level get the statuses under HTTP errors. The server does not keep sessions or send notifications or requests to the client, and its tool list does not change while a client is connected. Requests a browser sends from another website’s origin are rejected with 403.

Results

A successful call returns the endpoint’s JSON response twice: as structuredContent, which matches the tool’s output schema, and as the same JSON serialized in a single text content block for clients that read only text. The two are equivalent.

Pagination

Paginated tools return one page per call. Pass the result’s nextPageToken as the pageToken argument of the next call, with the same other arguments except pageSize, which may change, until nextPageToken is absent. A short or empty page can still carry a token. Tokens are opaque: do not parse or construct them. Which tools are paginated, page size, token lifetime of up to 24 hours and consistency are the same as for the REST endpoints; see Pagination.

Errors

Tool errors

A tool call that fails returns a result with isError: true and one text content block containing a JSON error:
code is a status code; the common ones are listed below. message describes the failure without data from outside the client’s workspace. requestId identifies the request; include it in support requests. retryAfterSeconds is present only when a rate limit rejected the call. These are the same failures the REST API reports with the HTTP statuses under Errors.

HTTP errors

Some failures reject the HTTP request before any tool runs:

Limits

Tool calls share the REST API’s per-key and per-workspace rate limits and 55-second timeout; see Limits. A tool call that reaches the API counts against those limits. Connecting, listing tools, and other requests rejected before they reach the API, such as an unknown tool or malformed arguments, use a separate limit for each key or signed-in person. A signed-in person’s tool calls count against a per-person limit in the workspace, the same size as a key’s, shared by every client the person allows there, and against the workspace’s limit, which they share with its API keys. Responses carry the RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers of the limit that applied.

Account settings tools

get_account_settings and update_account_settings read and change your Personal settings. Only clients connected with OAuth can use them, and a change applies to your pull requests in every workspace. See Personal settings for who can use them.

Fields

Both tools return settings, with your preferences in values and the names of the preferences you can read and change in availableFields, comma-separated. A preference is available when it is shown to you on the Personal settings page in the connected workspace: Check Run Agents and detection modes depend on the workspace’s features, and Slack mentions on a Slack account connected in the workspace. A preference that is not available is omitted from values and cannot be changed. Most preferences are overrides of a repository setting. An override is true for Always on, false for Always off, and omitted for Repo default, which follows each repository’s setting.

Update account settings

update_account_settings changes only the preferences named in updateMask:
  • updateMask: comma-separated names from the table, for example "detectionMode,prSummaryEnabled". Between 1 and 10 names, each at most once.
  • settings: a value for each named preference you set. To return an override to Repo default, name it and omit its value. prSummaryInDescription, costLimitCommentsEnabled and slackMentionsEnabled always need a value.
The update is all or nothing. A preference that is not in availableFields, or a detection mode the workspace does not offer, returns PERMISSION_DENIED. A name that is not a preference, a value without its name in updateMask, or a preference that always needs a value named without one returns INVALID_ARGUMENT. Either way, nothing changes. The result is your preferences after the update. Each change is recorded in the audit log of the connected workspace, with you and the connected app that made it. This call sets your detection mode and returns your pull request summaries to the repository default: