Context
Follow-up from PR #4052 (per-user trusted MCP server, synced config) and a Copilot review note.
The gap
Removing the trusted MCP server, or turning off the master toggle, in Settings → Trusted MCP server only updates the per-identity config (now stored as synced identity_metadata). It does not revoke the backend authorization established at connect time by mcp_set_access(origin, account, true).
Consequence: a previously-connected MCP server keeps its principal -> anchor binding in the reverse index, so as long as it still holds a valid standing delegation (the user-chosen TTL, up to 30 days) it can keep calling mcp_prepare_account_delegation / mcp_get_account_delegation to mint per-app delegations — even after the user "removes" the server or disables MCP in Settings.
This is pre-existing behaviour (the earlier device-local/localStorage version didn't revoke either); the trusted-server config has always been a pre-gate for new connects, not a kill switch for existing access. PR #4052 keeps that semantics and defers the kill-switch to this issue.
Proposed work
- On remove (and on disabling the master toggle), revoke the backend binding(s): enumerate the identity's accounts at that origin (
get_accounts) plus the default, and call mcp_set_access(origin, account, false) for each, so mcp_prepare/get_account_delegation calls from that server start failing immediately.
- Consider a dedicated "connected MCP servers / active access" management surface so users can see and revoke active connections independently of the trusted-server allowlist.
Notes
- Even without explicit revocation, access ends when the standing delegation expires (≤ 30 days).
- The account number used at connect isn't currently tracked in the trusted-server config, hence the
get_accounts enumeration in the proposed FE fix.
🤖 Generated with Claude Code
Context
Follow-up from PR #4052 (per-user trusted MCP server, synced config) and a Copilot review note.
The gap
Removing the trusted MCP server, or turning off the master toggle, in Settings → Trusted MCP server only updates the per-identity config (now stored as synced
identity_metadata). It does not revoke the backend authorization established at connect time bymcp_set_access(origin, account, true).Consequence: a previously-connected MCP server keeps its
principal -> anchorbinding in the reverse index, so as long as it still holds a valid standing delegation (the user-chosen TTL, up to 30 days) it can keep callingmcp_prepare_account_delegation/mcp_get_account_delegationto mint per-app delegations — even after the user "removes" the server or disables MCP in Settings.This is pre-existing behaviour (the earlier device-local/localStorage version didn't revoke either); the trusted-server config has always been a pre-gate for new connects, not a kill switch for existing access. PR #4052 keeps that semantics and defers the kill-switch to this issue.
Proposed work
get_accounts) plus the default, and callmcp_set_access(origin, account, false)for each, somcp_prepare/get_account_delegationcalls from that server start failing immediately.Notes
get_accountsenumeration in the proposed FE fix.🤖 Generated with Claude Code