Skip to main content
The Model Context Protocol authenticates the agent (the client app that holds an OAuth token), but most real workflows have a second identity in play: the end user the agent is acting on behalf of. Closient’s MCP server tracks both — the dual-principal model — so audit records, rate-limit decisions, and end-user revocation can answer “which user asked the agent to do this,” not just “which agent did it.” This page explains the two identities, how each is conveyed to Closient, and what guarantees you can rely on as an integrator.

The two principals

The agent principal is always present on an authenticated MCP request — if there’s a valid bearer token, there’s an OAuth application behind it. The end-user actor is only present when the token was issued via the authorization_code flow, where the user is part of the consent contract. Tokens issued via client_credentials (server- to-server agents acting on their own behalf) carry no end-user actor, and Closient records the call as the agent’s alone.

How it gets to Closient

The MCP spec does not yet standardize a wire format for the end-user actor — there’s an active conversation in the MCP community about whether and how to formalize it as a protocol primitive. Until that lands, Closient derives the actor from something already unambiguous: the user who consented when the token was issued. Concretely:
  1. The agent obtains a bearer token via OAuth 2.0 authorization_code (typical for Anthropic Connectors or any user-consent flow). Closient remembers which user consented.
  2. The agent calls a Closient MCP tool with Authorization: Bearer <token>.
  3. Closient validates the token and treats the consenting user as the end-user actor for the duration of the tool call.
client_credentials tokens have no consent step, so there is no end-user actor: the agent is the only principal on those calls.

What Closient records

Every tools/call is recorded with: The arguments are hashed rather than stored, so the record can be matched with later changes without keeping GTINs, batch or lot codes, or any other identifier. Tools that change data also leave a durable audit entry of the change, naming the end user when the token has one, so “who created this resolver rule?” or “who generated this QR code?” stays answerable after the call record has aged out.

Forward compatibility

The MCP working group is discussing standardized identity propagation (actor claims in the access token, structured headers, OAuth Token Exchange, etc.). When something lands, Closient will adopt it. The two principals stay the same; only how Closient learns the end user changes. If you depend on the call record, the stable fields are tool, client_id, end_user_id, status, and required_scopes. We may add fields without notice; we will not remove or rename those five without a deprecation cycle.