Build1 publisher3 min readPublished
Six OAuth steps run before an MCP client makes its first tool call
The MCP spec mandates OAuth 2.1 with PKCE, dynamic client registration and metadata discovery for remote servers. The one-hour tokens and customer-facing audit logs procurement asks about come from a guide's own bar.
The Engineer · Build desk

What happened
- The flow set out in the guide runs eight steps, from metadata discovery to token refresh, and six of them complete before the client puts a bearer token on its first JSON-RPC tool call.
- Three patterns dominate by the guide's count: OAuth with PKCE in Claude, Gemini and modern ChatGPT, API key handoff in Cursor and AI-first IDEs, and SSO delegation to Entra ID or Google OAuth.
- Its enterprise-readiness bar adds per-resource, per-verb and per-sensitivity scopes, access tokens capped at an hour with immediate revocation, customer-facing audit logs and SSO for Entra ID, Okta and Google Workspace.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint Dynamic Client Registration moves client onboarding into the runtime path, so the runtime, not a vendor allowlist, is where you decide which AI clients can hold credentials for your server.
- contradiction Spec compliance and security-review readiness are separate tests: the token lifetime, revocation and audit-log items reviewers ask about come from the guide's recommendations, not the spec's mandates.
- decision With the guide advising at least two of the three patterns, the live question for a vendor is how many parallel consent, revocation and audit paths it is willing to operate.
- exposure Security teams arrive with their SaaS OAuth checklist plus a new question: how a non-human agent's behaviour is bounded inside the permissions it was granted.
Six of the eight steps in that sequence finish before the server sees a tool call [19]. The client starts at `/.well-known/oauth-authorization-server`, which is where it finds the authorization endpoint, the token endpoint, the supported scopes, the supported grant types and the registration endpoint [6]. It POSTs to the registration endpoint with its redirect URIs and gets back a `client_id`, plus a `client_secret` if it is a confidential client [7]. The redirect that follows carries `response_type=code`, `code_challenge` and `code_challenge_method=S256` [8]. PKCE is there to stop an intercepted authorization code from being redeemed [13]. The user consents, the code comes back to the redirect URI, and the client trades the code plus the verifier for an access token and a refresh token [9]. The access token is bound to your server's resource indicator so it cannot be replayed against another MCP server [10]. Step seven is the first `Authorization: Bearer` header on a JSON-RPC request [11].
That ordering puts client registration inside the runtime path. A client you have never heard of obtains a `client_id` by asking for one, so the population of registered clients is settled by the clients rather than by your onboarding [21].
The spec's mandates are narrower than the procurement bar people quote from them. OAuth 2.1 with PKCE, RFC 7591 and RFC 8414 are mandated for remote servers [1][2]. Resource indicators under RFC 8707 are a recommendation, aimed at token-confusion attacks [3]. The hour ceiling on access tokens, transparent refresh, immediate revocation, scopes cut per resource and per verb and per sensitivity, customer-facing audit logs and SSO for Entra ID, Okta and Google Workspace all come from the guide's enterprise-readiness list [5]. A server can implement every mandate in the spec and still miss every item on that list at review [22].
The guide places API key handoff in Cursor and AI-first IDEs and calls it weak on revocation and scoping [4]. It tells vendors to ship it anyway: "A serious MCP app shipping to multiple AI clients implements at least two of these, and probably all three. There is no shortcut." [14] Ship the key path alongside a promise of immediate revocation and the revocation has to work for keys too, which is the part of that pattern the guide identifies as thin [23].
"The fastest way to lose an enterprise procurement conversation about an MCP app is to lose the auth conversation," the Launch Day Advisors guide on dev.to says [15]. Its mapping of patterns to clients is the claim to check against your own install base before you plan around it: OAuth 2.1 with PKCE for Claude, Gemini and modern ChatGPT, Entra ID delegation for Microsoft Copilot, Google OAuth for Gemini [4]. The guide does not name which revision of the MCP specification it is citing [18].
What to watch
- Whether a later MCP spec revision moves token lifetime limits or audit logging from recommendation into requirement.
- Whether Cursor and other AI-first IDEs add OAuth 2.1 with PKCE, removing the reason to keep an API key path.
- Whether resource indicators under RFC 8707 move from recommended to mandated for remote servers.