Skip to content
Documentation menu

Controlling MCP access

Gated

How a workspace admin turns MCP on or off and grants or revokes MCP access for an API key, with limits and audit entries. These controls cannot be used yet.

Status: Gated. Shipped, but closed until a switch described on this page is turned on.

MCP access is controlled per workspace and per API key. A workspace admin can turn MCP on or off for the whole workspace and decide which existing API keys may call the MCP server. Neither action changes what the web workspace or the REST API can do.

Who can manage access

Only a workspace admin who is signed in to the web workspace. The management endpoints on this page accept that admin's browser session and nothing else: API keys, including admin-scoped keys, and device tokens receive 403. MCP access cannot be granted with an API key.

In the web workspace

These steps describe the card as it is built. They cannot be used yet.

  1. Open Settings, go to API access and find the MCP clients card.
  2. Turn on MCP for this workspace.
  3. Under Grant read access to a key, choose an API key and select Grant MCP access. Keys are shown by name only. If you need a new key, create it first; see Authentication.
  4. To remove access for one key, select Revoke MCP access on its row. To stop every MCP call at once, turn the workspace switch off.

While the platform-wide switch is off, the card says so, and calls stay refused whatever the workspace switch and the grants say.

What a grant allows

The default profile, coa.read_metadata.v1, remains exactly five metadata reads. Freshly selecting coa.read_metadata_help.v1 adds the fixed documentation reader, resources and prompts. Existing grants keep their original scope: revoke and grant again to expand one. Each profile binds one existing workspace API key.

  • A grant selects only its explicit metadata/help operations. A key with the run or admin scope gains no additional MCP domain, execution or administration rights.
  • A grant does not change what the key can do over REST, and revoking it leaves the key working for REST.
  • A key can be granted if it is active, not expired, not bound to an external agent and has at least one scope.
  • The key is still checked on every call. A revoked or expired key fails authentication whatever its grant says.

Management endpoints

Method and pathBodyEffect
GET /api/tenant/mcp-clientsnoneReturns the switch states, the limits, the grants (active first, at most 200) and the keys that can still be granted.
PUT /api/tenant/mcpenabled (boolean)Turns MCP on or off for the workspace. Returns enabled and epoch.
POST /api/tenant/mcp-clientsapiKeyId (uuid), optional profileCreates a new metadata-only grant by default, or the explicitly selected product-help profile. Returns 201 with the new grant; existing grants are never edited.
DELETE /api/tenant/mcp-clients/{id}noneRevokes one grant by grant id. Returns the grant with status: "revoked".
GET /api/tenant/mcp-clients
{
  "platformEnabled": false,
  "tenant": {
    "enabled": true,
    "epoch": 1,
    "changedBy": "user_2exampleAdmin",
    "changedAt": "2026-11-24T09:12:44.000Z"
  },
  "limits": { "activeGrantsPerTenant": 10, "revokedRetentionDays": 90 },
  "grants": [
    {
      "id": "9d2b7c40-5e1a-4f6b-8c3d-0a1b2c3d4e5f",
      "apiKeyId": "5d0e7c2a-41b8-4c6f-9f0a-2b7e6d1c3a90",
      "keyName": "Reporting integration",
      "profile": "coa.read_metadata.v1",
      "status": "active",
      "epoch": 1,
      "grantedBy": "user_2exampleAdmin",
      "grantedAt": "2026-11-24T09:15:02.000Z",
      "revokedBy": null,
      "revokedAt": null
    }
  ],
  "eligibleKeys": [
    { "id": "5a7e1c3b-2d4f-4a6b-8c9d-1e2f3a4b5c6d", "name": "CI pipeline", "scopes": ["read"] }
  ]
}

tenant describes the workspace switch; before the switch is first set, its epoch is 0 and changedBy and changedAt are null. An epoch is a counter that only goes up. The workspace's epoch rises each time the switch is set, and a grant's epoch rises when its key is granted or revoked. Audit entries record the value. Use an id from eligibleKeys as apiKeyId when granting. The response never contains a key secret or key prefix.

Limits and retention

  • At most 10 active grants per workspace, and one active grant per key.
  • Revoking a grant is final. Granting the same key again creates a new grant.
  • A revoked grant stays listed until a scheduled cleanup deletes it, 90 days after revocation. Audit entries are separate and are not removed by this cleanup.
  • By default a granted key may make 60 MCP calls a minute, and a workspace 300 a minute. While MCP access is open for a key, its REST calls to the five equivalent reads count against the same limits. See Rate limits.

When changes take effect

Immediately. Nothing is cached: every tools/list and tools/call re-reads the platform-wide switch, the workspace switch and the calling key's grant. After a revoke, or after the workspace switch is turned off, the next call from that key gets an empty tool list or a host_grant_required result. A client that kept an earlier tool list will find its next call refused.

Audit entries

ActionWritten whenDetail
mcp.tenant.enableThe workspace switch is turned on.epoch
mcp.tenant.disableThe workspace switch is turned off.epoch
mcp.client_grant.createA key is granted MCP access.apiKeyId, profile, epoch
mcp.client_grant.revokeA grant is revoked.apiKeyId, profile, epoch

Each entry records the admin who acted and the time. Entries hold key ids, never key secrets. Individual MCP tool calls do not write audit entries today; only the management actions above do. Export evidence for review explains how to read the audit log.

Error codes

Errors use the REST format: a JSON body with an error code and sometimes a detail. See Errors.

StatuserrorWhen
403capability_deniedThe request used an API key or a device token.
403admin_requiredThe signed-in user is not a workspace admin.
400enabled_requiredPUT /api/tenant/mcp without a boolean enabled.
400api_key_id_requiredapiKeyId is missing or is not a UUID.
404key_not_foundNo such API key in this workspace.
400revoked_key, expired_keyThe key can no longer be used.
400external_agent_keyThe key is bound to an external agent.
400no_read_scope, ineligible_keyThe key has no usable scope or otherwise cannot be granted.
409already_grantedThe key already has an active grant.
409grant_limit_reachedThe workspace already has 10 active grants.
404grant_not_foundThe grant id is unknown, malformed, already revoked or belongs to another workspace.

Next steps

Something missing or unclear? Tell us and we will improve this page.