Glossary auth/

What is per-user OAuth?

Per-user OAuth is the pattern in which an agent reaches each MCP server or downstream API with an OAuth token issued for the specific user it is acting for, rather than with a credential shared across users.

Published
Read
1 min
Source
Markdown

Also called: per-user authorization, user-delegated OAuth

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://mcp.example.com/.well-known/oauth-protected-resource",
                         scope="files:read"

A protected MCP server answers an unauthenticated call with that 401 (example from MCP spec version 2026-07-28). The client follows resource_metadata to the authorization server, the user signs in, and the client gets a token for that user, bound to that server. The spec describes the client as acting “on behalf of a resource owner.” That is per-user OAuth, though the spec never uses the phrase.

The payoff is that the downstream system’s own permissions apply. If a user can’t see a repository, their agent can’t either, and the logs name the person. OWASP gives the same advice in LLM06:2025 Excessive Agency: have extensions execute in the user’s own context, with OAuth tokens held to the minimum scope.

Behind a gateway or proxy there are two legs, and each needs its own per-user token; forwarding the first one downstream is token passthrough. When no user is present, as in CI, MCP’s OAuth Client Credentials extension lets the client authenticate as itself. The Enterprise-Managed Authorization extension moves per-server consent to the company’s identity provider.

See also: Token passthrough · Agent identity · MCP authorization step by step · Why MCP servers must not forward client tokens

Agent identity, Least privilege for agents, MCP gateway, OAuth 2.1, Token passthrough

Guides that cover Per-user OAuth

Sources

  1. Authorization (MCP specification version 2026-07-28)Model Context Protocol modelcontextprotocol.io
  2. OAuth Client CredentialsModel Context Protocol modelcontextprotocol.io
  3. Enterprise-Managed AuthorizationModel Context Protocol modelcontextprotocol.io
  4. LLM06:2025 Excessive AgencyOWASP Gen AI Security Project genai.owasp.org

Changelog

  • First published.

Cite this page

Agents for Devs. "What is per-user OAuth?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/per-user-oauth
Cite one section