Authorization: Bearer <token> header. Tokens sent in query parameters or tool arguments are ignored and the request is rejected. The server never falls back to an unauthenticated state.
Discovery endpoint
Before acquiring a token, query the protected resource metadata to find the authorization server and supported scopes.Response
Token requirements
- Header only: pass the token in the
Authorizationheader. Never in a query parameter or tool argument. - Audience-bound: tokens must be minted for the MCP endpoint via the RFC 8707
resourceparameter. Tokens created for a different audience are rejected. - Scope and organization bound: the token carries a fixed set of scopes and a fixed list of organizations. A tool call succeeds only when the token includes the required scope and the requested
organizationIdis in the token’s organization list.
Scopes and tool access
tools/list returns only the tools unlocked by the scopes on your token. Request only the scopes your agent needs.
Authentication failure
When the token is missing, malformed, or unverifiable, the server returns HTTP401 Unauthorized with this header:
Authentication flow
1
Discover the authorization server
Call
GET /.well-known/oauth-protected-resource/mcp to read the authorization_servers array and scopes_supported.2
Request a token
Complete OAuth against the advertised authorization server. Include the
resource parameter set to the MCP endpoint so the token is audience-bound.3
Send the token on every request
Include
Authorization: Bearer <token> in the header of every POST /mcp call. The server is stateless and does not remember prior authorization.4
Handle 401 by re-authorizing
If you receive a
401, re-read the discovery document and repeat the OAuth flow. Do not retry the same request with the same token.Transport
Learn how Relay MCP uses a single POST endpoint with JSON responses.
Errors
Understand how auth failures and rate limits surface at the transport level.