Articles
How MCP authorization works and what it protects
Who handles authorization
In MCP, the server acts as the protected resource server, so it checks access tokens instead of creating them. That separation matters because the tool server can focus on whether a request is allowed, while a different component is responsible for proving who approved access. The client acts for a user, while the authorization server is the component that authenticates that user and issues tokens for the MCP server. For a beginner, the basic picture is that the client asks, the authorization server vouches, and the MCP server decides whether the request matches the token.
How a client learns what to ask for
If a client sends a request without a valid token, the MCP server answers with 401 and can use the WWW-Authenticate header to point to its Protected Resource Metadata document and name needed scopes. This protects tools from anonymous use, and it also gives the client a clear next step instead of making it guess where permission comes from. The client then fetches the Protected Resource Metadata document to learn which authorization servers the MCP server trusts, and that document must list at least one authorization server. That matters because the client should learn the trusted place to seek approval from the server itself, not from a hard-coded guess or a random prompt. The same metadata uses the exact MCP server URL as its resource value, and clients must not use a metadata document whose resource does not match. In plain terms, this check helps stop a client from following authorization instructions that belong to some other service.
What the token must prove
MCP guidance says to validate the token audience exactly, because a correctly signed token from the authorization server might still be intended for another service. A good signature is therefore only part of the answer; the server also needs to confirm that the token was meant for this destination. The tutorial also says to accept only access tokens, never an ID token, and to reject tokens from other issuers unless the server is meant to be multi-tenant. Together, those checks narrow what the server will trust, which reduces the chance that a valid-looking but wrong token slips through.
When a token is valid but not powerful enough
When a token is present but lacks enough scope for a runtime operation, the server should answer with 403 and a Bearer challenge that identifies insufficient scope and the minimum scopes needed. Here, authorization is protecting a specific action rather than simple sign-in, so a caller may be known and still be blocked from doing this operation. The specification says servers should include all scopes required for the current operation in one challenge, rather than forcing multiple retries for one request. That makes permission prompts more predictable and avoids a frustrating loop where each retry reveals one more missing permission. For scope-related errors, clients should request a new token with a larger set of scopes through step-up authorization or handle the error in another appropriate way; clients acting for a user should attempt step-up, while client_credentials clients may try it or stop. The practical check for builders is to confirm which kind of client they are making, because that changes whether the next step is user consent or a clean failure.
Sources
- MCP authorization tutorial: The Authorization Flow: Step by Step
- MCP authorization tutorial: Common Pitfalls and How to Avoid Them
- MCP specification: Authorization: Scope Challenge Handling
Created with AIVE
This article was written with AIVE, our AI-powered publishing autopilot, from the cited public sources, and checked automatically before publication. OU1COMES reviews published articles and corrects or removes them when needed.
AIVE powers the intelligence. OU1COMES delivers the outcomes.