Per-person consent
Each person signs in and approves each assistant–server pair on a consent screen.
- Works with any OAuth server
- The person decides, server by server
- A consent screen for each new server
- Admins see the result afterwards
The MCP specification builds sign-in from existing OAuth standards, so a server never sees a password and every call carries a token issued for that server alone.
A remote MCP server lets an AI model act on real systems, so the first question is whose permission it is using. This guide walks through the authorization flow the current specification (revision 2026-07-28) defines, the RFCs behind each step, how enterprises put their identity provider in charge, and the attacks the design is built to stop.
Updated · 16 sources
MCP authentication uses OAuth 2.1. When an assistant calls a remote MCP server without a token, the server answers 401 and points to its metadata; the assistant finds the authorization server, registers itself, and opens a browser where the person signs in and consents. The assistant then sends a token issued for that one server on every request, and the server checks it each time. Local servers over standard input and output take credentials from the environment instead.
The specification maps MCP onto OAuth’s roles. The most important consequence: the MCP server checks tokens but need not issue them, so a company’s own identity provider can sit in the middle.
An assistant can connect to a server it has never seen, because each step tells it where to go next.
The first call has no token. The server answers 401 with a link to its resource metadata and the scope it needs.
The assistant reads which authorization server to use, then that server’s endpoints.
It uses a pre-registered client ID or a client ID metadata document; dynamic registration remains only as a deprecated fallback.
A browser opens; the person signs in and consents. The request carries a PKCE challenge and names the target server; on return the client checks the iss value.
The token goes in the Authorization header of every request; the server checks it was issued for itself.
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer
resource_metadata=
"https://mcp.example.com/
.well-known/oauth-protected-resource",
scope="files:read"{
"resource":
"https://mcp.example.com",
"authorization_servers": [
"https://login.example.com"
],
"scopes_supported":
["files:read", "files:write"]
}Asking for more later. When a call needs a permission the token lacks, the server answers 403 with insufficient_scope and the scopes required. The assistant runs the flow again for just those — step-up authorization — so a token starts small.
The authorization design was rewritten twice in its first year and tightened twice since. Older blog posts and server code often describe a superseded revision.
iss in authorization responses (RFC 9207) and binds client credentials to their issuer.OAuth assumes the client is registered in advance. MCP assistants connect to servers chosen by their users, so the specification ranks four ways to get a client ID.
What does the assistant already have with this authorization server?
What to check on a client ID metadata document. The authorization server fetches a URL supplied by a stranger, so the specification warns of server-side request forgery, and of apps that copy a real app’s document and redirect to localhost. Show the redirect host on the consent screen and consider an allow-list of trusted domains. Whatever the method, the client keeps its credentials keyed to the issuing authorization server and registers again if that server changes.
The standard flow asks each person to consent to each server. Companies want the identity provider they already run to make that call — and many servers on the internet still ask for nothing at all.
Each person signs in and approves each assistant–server pair on a consent screen.
An administrator enables MCP servers in the identity provider by group and role; at sign-in the assistant gets a signed grant and exchanges it for tokens.
Each rule in the specification answers a specific attack. When reviewing an MCP server or client, check them one by one.
state checked on return.iss (RFC 9207); the client checks it before redeeming the code.The Botminds MCP server holds no identity of its own: every request carries a valid token for one person and is handled as that person, with that person’s role.
| What the specification asks | On Botminds | |
|---|---|---|
| Discovery | Protected resource metadata (RFC 9728) | The assistant finds where to sign in from the server link |
| Registration | Pre-registration or CIMD; dynamic registration deprecated but allowed | Assistants register themselves as public clients — no client secret to steal |
| Sign-in | Authorization code with PKCE | Authorization code with a proof key, through the normal Botminds sign-in and a consent card naming the app |
| Audience | Tokens issued for this server only | Each token names the MCP server and carries the MCP scope; tokens for anything else, including a browser session, are refused |
| Validation | Check every request | Signature, expiry and audience checked on every call; the server is stateless and fails closed |
| Revoking access | Outside the specification | A list of connected AI clients to disconnect; suspending a person ends all their connections |
| Records | Outside the specification | Registration, consent, token issue and disconnect logged — with IDs, never tokens |
Go further. The full design: MCP for the enterprise. Connecting an assistant, hands-on: the Academy lesson on MCP integration. What the protocol is for: MCP vs API.
MCP authentication uses OAuth 2.1. The server answers an unauthenticated call with 401 and a metadata link; the assistant discovers the authorization server, registers, and sends the person to sign in with PKCE. It then sends a token issued for that server on every request.
Authentication proves who the person is; it happens at the authorization server, often the company’s identity provider. Authorization decides what the token allows; the specification covers it with OAuth scopes, and the server behind the tools still checks the person’s permissions.
Yes. Since the March 2025 revision the specification bases authorization on the OAuth 2.1 draft, with PKCE required, and adds protected resource metadata, authorization server discovery and resource indicators.
A client ID metadata document: the assistant uses an HTTPS URL as its client ID, and that URL serves JSON naming the app and its redirect addresses. Since November 2025 it is the recommended way to register when client and server have never met, and since revision 2026-07-28 it replaces dynamic registration.
RFC 7591 lets an assistant register itself with an authorization server and receive a client ID without human help. The current specification (2026-07-28) deprecates it in favour of client ID metadata documents and keeps it only for authorization servers that do not support them.
No. Servers that run on the same machine over standard input and output should take credentials from the environment. The OAuth flow is for remote servers over HTTP.
A JSON document a server publishes, usually under /.well-known/oauth-protected-resource, naming the authorization servers that issue its tokens and the scopes it supports. MCP servers must publish it, and clients must use it to find where to sign in.
With the Enterprise-Managed Authorization extension, declared stable in June 2026: administrators enable servers in the identity provider by group and role, and assistants exchange a signed grant from the identity provider for tokens.
If a server forwarded the token it received to another API, it would bypass that API’s audience checks, blur the audit trail and let a stolen token travel. The specification requires servers to accept only their own tokens and use separate ones downstream.
Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.