part 2OAuth 2.1 from scratch·lesson 2.1 of 10·2 min read
The four OAuth roles
OAuth defines four roles: resource owner, client, authorization server and resource server. They are roles, not machines, and understanding that makes the big change in MCP authorization in revision 2025-06-18 trivial to follow. This lesson names each role, maps it to MCP and explains why one machine can play two of them.
In this lesson
Name the four roles and what each one does.
Map them to MCP.
Explain why the same machine can play two roles.
The four roles and how MCP fills them
Role (RFC name)
What it does
In MCP
Real-world examples
Resource owner
Owns the data and grants the permission
The user
You
Client
The application that wants access on behalf of the user
The MCP client
Claude Desktop, Claude Code, an IDE, an agent
Authorization server (AS)
Authenticates the user, collects their consent and issues tokens
The authorization server
Keycloak, Auth0, Okta, Microsoft Entra ID, GitHub's login
Resource server (RS)
Holds the data; checks tokens and serves requests
The MCP server
Your company's MCP server
Who talks to whom in OAuth
The client asks for permission
Client → Authorization server
It sends the user (through the browser) to the authorization server: "this app wants to read your files".
The user authenticates and consents
User → Authorization server
This happens at the AS. The client never sees the password.
The AS issues the token
Authorization server → Client
First a code, which the client exchanges for the access token.
The client uses the token
Client → Resource server
It presents it with every request to the resource server.
The RS checks it
Signature, expiry, audience, scopes. If everything matches, the resource server serves the request.
Roles, not machines
In MCP 2025-03-26 the usual setup was for the MCP server to also act as the authorization server: a single program with two roles. Since 2025-06-18 they are split: the MCP server is only a resource server and delegates token issuance to an AS (which may live on the same host or be the company's identity provider).
Summary
Four roles: user (resource owner), client, authorization server (issues) and resource server (checks).
In MCP the client is the MCP client acting on behalf of the user, and the resource server is the MCP server.
The same server can play two roles; MCP split them in 2025-06-18.
quiz · 2 questions
1. Your company uses Microsoft Entra ID for corporate login and you want to protect an internal MCP server. Which role does Entra ID play?
Entra ID authenticates employees and issues tokens: it is the AS. The MCP server is the resource server.
2. Who checks the tokens on every MCP tool request?
The RS validates. It may ask the AS (introspection) or verify a signature locally (JWT), but the responsibility to accept or reject is its own (see lesson 2.10).