Summary
Jean Lee's post (LinkedIn, 2026-11-12) is a correct primer on how an MCP client gets a token for a remote MCP server, but it describes registration the 2025-06-18 way. In the current spec (2025-11-25), Client ID Metadata Documents are the default for clients with no prior relationship, and Dynamic Client Registration is a fallback. The four principles it names (PKCE, audience binding, least-privilege scopes, no token passthrough) are all MUSTs or SHOULDs in the spec.
The framing matters for anyone building agent harnesses: MCP authorization is plain OAuth 2.1 with the MCP server as a resource server and a separate authorization server. Nothing in it is agent-specific except the problem it solves, which is a general-purpose client that can't know in advance which scopes a tool server needs.
Scope of the spec: authorization is optional, applies to HTTP transports, and does not apply to stdio servers, which take credentials from the environment. Most local MCP servers today are stdio, so this flow only covers remote, hosted servers.
The flow
The post's six steps, with what the 2025-11-25 spec actually requires at each.
| Step | Post says | Spec requires |
|---|---|---|
| 1. Challenge | Server answers 401 with authorization details | 401 with WWW-Authenticate: Bearer resource_metadata="...", and SHOULD add scope= with the scopes needed. Clients MUST parse it. |
| 2. Discover | Client finds the authorization server and its metadata | Two hops. MCP servers MUST serve Protected Resource Metadata (RFC 9728), which names the authorization server; the client then reads that server's OAuth or OIDC metadata. Clients fall back to the well-known URI when the header has no URL. |
| 3. Register | Client obtains a client ID | Priority order: pre-registered ID, then a Client ID Metadata Document (the client_id is an HTTPS URL the server fetches), then Dynamic Client Registration, then ask the user. |
| 4. Authorize | User signs in; auth code flow with PKCE | PKCE is MUST, with S256. The client MUST refuse to proceed if the metadata lacks code_challenge_methods_supported. Redirect URIs must be localhost or HTTPS and match exactly. |
| 5. Get token | Code exchanged for a token for that server | The resource parameter (RFC 8707, the server's canonical URI) is MUST in both the authorization and token requests. Public clients MUST get rotated refresh tokens. |
| 6. Access | Token sent with each request; server validates | Authorization: Bearer on every HTTP request, never in the query string. Server MUST check the token's audience is itself. Missing scope at runtime returns 403 insufficient_scope with the needed scopes, which drives step-up authorization. |
The step the post leaves out is step-up. Clients start with the scopes from the 401 (or all of scopes_supported, which is meant to be the minimum for basic use) and ask for more only when a 403 names them. That is how least privilege works in practice for a client that can't predict which tools it will call.
Where the post is thin or out of date
Registration. "The client obtains its client identifier" hides the biggest change in the 2025-11-25 spec. Client ID Metadata Documents replace Dynamic Client Registration as the default, because DCR let any client mint unlimited registrations and gave the authorization server nothing to verify. CIMD moves trust to the client's domain, which brings its own risks: SSRF when the server fetches the URL, and localhost redirect impersonation, where an attacker presents a real client's metadata URL with their own localhost redirect.
Token passthrough. The post says it "prevents misuse of client credentials". The spec's point is narrower: an MCP server that calls an upstream API must get its own token from that upstream, and MUST NOT forward the token the MCP client gave it. Forwarding breaks audit trails and makes the server a confused deputy.
Audience binding is only as strong as the authorization server. RFC 8707 support is uneven, so the spec requires clients to send
resourceand servers to validate the audience anyway, "to enable current and future adoption".Confused deputy for proxy servers. An MCP server that fronts a third-party API with one static client ID MUST get user consent for each dynamically registered client. The post doesn't mention it, and it is the case most proxy-style servers fall into.
What authorization doesn't cover. OAuth scopes gate which server and coarse capabilities a token reaches. They say nothing about which tool calls an agent makes with that access, prompt injection through tool results, or per-call approval. Those are harness problems.
Failure modes and a review checklist
Failure modes the spec's security section names, mapped to the spec clause that prevents each:
| Failure | What goes wrong | Spec defence |
|---|---|---|
| Token accepted by the wrong server | A token for server A works at server B that shares an authorization server | resource on every request; server checks audience |
| Token passthrough | MCP server forwards the client's token to GitHub or Jira | Server gets its own upstream token; MUST NOT transit others |
| Confused deputy | Proxy server with a static upstream client ID skips consent for a new client | Per-client user consent before forwarding |
| Over-broad first grant | Client requests every scope up front and keeps them | Start from the 401 scope hint; step up on 403 |
| Code interception | Auth code stolen on redirect | PKCE S256; refuse servers without PKCE metadata |
| CIMD abuse | Malicious client_id URL makes the authorization server fetch internal endpoints | SSRF controls on metadata fetch; domain trust policies |
| Localhost impersonation | Attacker reuses a real client's metadata URL with their own localhost port | Show the redirect host; extra warnings for localhost-only clients |
| Token in logs | Token in a URL query string ends up in proxy logs | Bearer header only; short-lived tokens; refresh rotation |
Review checklist for an MCP server or client:
Server serves RFC 9728 metadata and sends
resource_metadataplusscopeon 401Client sends
resource(the canonical server URI) in both the authorization and token requestsServer rejects tokens whose audience isn't itself, including tokens from the same authorization server
Upstream calls use a separate token the server obtained itself
scopes_supportedlists the minimum; extra scopes come through 403insufficient_scopeClient refuses authorization servers that don't advertise PKCE
Registration follows pre-registered, then CIMD, then DCR; CIMD fetches are SSRF-guarded
Tokens are short-lived, refresh tokens rotate for public clients, nothing lands in a URL
stdio servers take credentials from the environment and are not treated as covered by this flow
Related entries
R055 Relate: an MCP surface split into read and write tools. Tool-level least privilege, which OAuth scopes can carry if the server maps scopes to tools.
R030 OpenShell: kernel-enforced policy on what an agent's process can reach. The layer below authorization; together they bound both credentials and network reach.
R048 Australia's Medicare portal breach by an agent: what happens when an agent's access is broader than its task.
R028 auto-ontology-mcp and R054 (MCP adoption across eleven harnesses): the population of MCP clients this flow has to work for.
R034 AG-UI: the agent-to-user protocol beside MCP, where per-call approval would surface.
Sources
Jean Lee, "Your AI Agent has access to your tools", LinkedIn, 2026-11-12
MCP specification 2025-06-18, Authorization (the earlier, DCR-first version the post's steps match)
RFC 9728, OAuth 2.0 Protected Resource Metadata and RFC 8707, Resource Indicators