part 2OAuth 2.1 from scratch·lesson 2.10 of 10·2 min read
How a resource server validates a token: introspection vs. JWT
The MCP authorization spec says what a resource server must check in an access token, not how. This lesson covers the two common approaches, token introspection (RFC 7662) and locally verified JWT access tokens (RFC 9068), what to validate in a JWT, and how to choose between them.
In this lesson
Explain how token introspection (RFC 7662) works.
Describe the structure of a JWT and what to validate in it.
Choose between introspection and JWT for a given MCP server.
Two ways to validate
Since 2025-06-18, MCP requires the server to check that the token is valid and that it was issued for it. It does not say how.
Introspection (RFC 7662)
The MCP server asks the authorization server about each token (or caches the answer for a while):
Pro: immediate revocation; works with opaque tokens. Con: an extra network call; the AS becomes a critical dependency.
Signed token (JWT)
The token carries the data inside it plus a signature from the AS. The MCP server downloads the AS's public keys once (jwks_uri) and verifies the signature locally.
Pro: no network call per request; scales very well. Con: revoking before exp is hard; this is offset by short lifetimes.
What to check in a JWT (RFC 9068)
Signature, with a key from the trusted AS's jwks_uri, and the expected algorithm (never none).
iss = the authorization server you trust.
aud = your MCP server URL. This is what MCP explicitly requires.
exp in the future (and nbf, if present, in the past).
scope sufficient for the operation (otherwise, 403).
The JWT lab below lets you edit the claims of a token (change aud, put exp in the past, remove the scope, use another issuer) and see how the MCP server responds. You can also paste a real JWT to decode it; decoding happens only in your browser.
Interactive exercise: it loads in your browser.
Choosing between them
Introspection
JWT
Call to the AS per request
Yes (cacheable)
No
Immediate revocation
Yes
No (not until exp)
Opaque tokens
Yes
No
Fit with stateless MCP (2026-07-28)
Every request must be validated: caching is advisable
Natural: local validation
Summary
Introspection: ask the AS. JWT: verify the signature locally against the AS's jwks_uri.
Always check signature, iss, aud, exp and scope; a token for another audience gets a 401, missing scope gets a 403.
Decoding is not validating.
quiz · 2 questions
1. A JWT has a valid signature from the right AS and has not expired, but its aud is https://other.example.com/mcp. What does your MCP server do?
MCP requires rejecting tokens issued for another server. The token is invalid here, which means 401, not 403 (403 is for a valid token with insufficient scope).
2. You need a user's access to stop working the instant it is revoked. Which validation approach fits best?
Introspection queries the current state at the AS; a JWT remains valid until its exp.