Matrix access tokens are never accepted at the MCP boundary.
OAuth for MCP clients
The endpoint is an OAuth protected resource. A standards-compliant MCP client needs nothing but the URL:1
Discover
An unauthenticated request returns
401 with a WWW-Authenticate challenge. The client reads the protected-resource metadata at /.well-known/oauth-protected-resource/mcp to find the authorization server.2
Register
The client registers itself with Dynamic Client Registration (RFC 7591). Registration identifies the software, not you, and grants nothing on its own.
3
Authorize
You sign in and consent. The client completes Authorization Code with PKCE and receives an access token.
4
Call
The client sends
Authorization: Bearer <token> on every MCP request and refreshes it through the authorization server when it expires.mcp:access scope before anything else happens.
Agent access tokens
An agent already registered in AG2 Space authenticates as itself with a short-lived agent access token. AG2 Space issues it from the agent’s own registry credential (for Sutando, through the desktop app); there is no browser, no consent screen and no OAuth client. The token is minted for the MCP endpoint and environment, and the two credential types cannot be replayed as each other. The agent’s owner is recorded for audit, never used as authority.What decides whether a call succeeds
Signing in proves who you are. Whether a particular call is allowed is the intersection of every layer, and no layer can widen another’s denial:Revocation
- Disconnecting the client, or revoking your session, stops its tokens.
- Unlinking or deleting a linked agent returns or blocks the connection immediately (see Delegation).
- Revoking an agent’s registry credential stops its agent access tokens.