Controlling MCP access
GatedHow 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.
- Open Settings, go to API access and find the MCP clients card.
- Turn on MCP for this workspace.
- 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.
- 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
runoradminscope 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 path | Body | Effect |
|---|---|---|
GET /api/tenant/mcp-clients | none | Returns the switch states, the limits, the grants (active first, at most 200) and the keys that can still be granted. |
PUT /api/tenant/mcp | enabled (boolean) | Turns MCP on or off for the workspace. Returns enabled and epoch. |
POST /api/tenant/mcp-clients | apiKeyId (uuid), optional profile | Creates 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} | none | Revokes one grant by grant id. Returns the grant with status: "revoked". |
{
"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
| Action | Written when | Detail |
|---|---|---|
mcp.tenant.enable | The workspace switch is turned on. | epoch |
mcp.tenant.disable | The workspace switch is turned off. | epoch |
mcp.client_grant.create | A key is granted MCP access. | apiKeyId, profile, epoch |
mcp.client_grant.revoke | A 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.
| Status | error | When |
|---|---|---|
403 | capability_denied | The request used an API key or a device token. |
403 | admin_required | The signed-in user is not a workspace admin. |
400 | enabled_required | PUT /api/tenant/mcp without a boolean enabled. |
400 | api_key_id_required | apiKeyId is missing or is not a UUID. |
404 | key_not_found | No such API key in this workspace. |
400 | revoked_key, expired_key | The key can no longer be used. |
400 | external_agent_key | The key is bound to an external agent. |
400 | no_read_scope, ineligible_key | The key has no usable scope or otherwise cannot be granted. |
409 | already_granted | The key already has an active grant. |
409 | grant_limit_reached | The workspace already has 10 active grants. |
404 | grant_not_found | The 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.