Repository navigation
|
Are delegation chains and RFC 8693 token exchange the same mechanism, and how does a resource server see who is really acting? |
Replies: 1 comment
|
They are two mechanisms that you can link. Delegation chains ( const mcp = createMcpModule({
config: {
// ...
jtiDenylist: createInMemoryJtiDenylist(), // required with tokenExchange
tokenExchange: {
enabled: true,
maxChainDepth: 3, // default
authorize: async ({ client, subject, scopes, resource }) =>
client.clientId === "orchestrator" && scopes.every((s) => s.startsWith("mcp:")),
},
},
});The server enforces narrowing: extra scopes give Limits:
Docs: docs/mcp-grants.mdx (Token exchange) and docs/delegation.mdx. |
They are two mechanisms that you can link. Delegation chains (
theauth.delegate) are database records: one agent grants a subset of its own permissions to another, with an expiry and a depth limit (default 3). Token exchange (RFC 8693) is an OAuth grant on the MCP token endpoint. It trades a token this server issued for a narrower one, and the new token carries a nestedactclaim naming each actor. Earlier hops sit inside the newest one.