MCP Authorization (OAuth 2.1 for MCP)
The MCP specification's transport-level authorization flow for HTTP-based MCP servers, based on a subset of OAuth 2.1 and related RFCs.
Tags
Description
Authorization is optional; HTTP-based implementations SHOULD conform, STDIO implementations SHOULD instead read credentials from the environment. Builds on OAuth 2.1 (IETF draft), RFC 6750 bearer tokens, RFC 8414 authorization server metadata and related specs.
Agent access
Related
- Model Context Protocol (MCP): Open protocol that standardizes how AI applications connect to external tools, data sources and prompts via MCP servers.
- Auth0 for AI Agents: Auth0's identity toolkit for AI agents: user authentication, delegated authorization, human-in-the-loop (CIBA) and fine-grained authorization for RAG.
- WorkOS AuthKit for MCP: WorkOS AuthKit guide and support for securing MCP servers that require authentication.
- Stytch Connected Apps (MCP auth): Stytch Connected Apps: authorization for remote MCP servers and connected agent integrations.
- RFC 9728: OAuth 2.0 Protected Resource Metadata: IETF Proposed Standard defining a metadata document a protected resource publishes (at /.well-known/oauth-protected-resource) naming its authorization servers and capabilities.
- RFC 8707: Resource Indicators for OAuth 2.0: IETF Proposed Standard adding a `resource` parameter so a client can tell the authorization server which protected resource a token is meant for (audience binding).
- MCP Authorization Extensions (ext-auth): Official repo of optional, additive extensions to MCP authorization, such as Enterprise-Managed Authorization (stable) and OAuth Client Credentials (draft).
Guides & comparisons
- Publish an MCP server so agents can find it (Guide): Build a small MCP server with FastMCP, test it with the MCP Inspector CLI, publish its metadata to the official MCP Registry with mcp-publisher, then get it into GitHub's registry, Glama, the Docker MCP Catalog and Index Agentica.
- Bridge stdio and remote MCP servers: mcp-remote, Supergateway, mcp-proxy and mcpo (Guide): Put a local stdio MCP server on HTTP so remote agents can reach it, or plug a remote server into a client that only speaks stdio. Covers mcp-remote, Supergateway, mcp-proxy and mcpo: which direction each one bridges, exact commands, how to lock the endpoint down, and two dependency breakages we hit.
- Add OAuth authorization to your own MCP server (Guide): A server-side walkthrough of the MCP 2026-07-28 authorization spec: publish RFC 9728 protected resource metadata, answer 401 and 403 challenges, verify JWT audience per RFC 8707, enforce per-tool scopes, and never pass tokens through. Tested with the MCP TypeScript SDK v2.
- Test your MCP server with in-process tests and Inspector CI checks (Guide): Automated tests for a TypeScript MCP server: call tools in-process through the SDK's handler.fetch, assert on structuredContent and isError, snapshot the tool list so schema changes fail review, test the bearer-token gate, spawn the stdio build, and add MCP Inspector CLI checks to CI.
- Agent auth and delegated access, step by step (Guide): How an agent acts for a user without holding their passwords: CIMD client registration, the MCP 2026-07-28 OAuth flow with resource indicators and audience checks, no token passthrough, vaulted third-party tokens, CIBA approvals and Cross App Access (ID-JAG).
- Connect an agent to a remote MCP server (Guide): How remote MCP works over Streamable HTTP in the 2026-07-28 spec, how OAuth sign-in is discovered, and copy-paste configs for Claude Code, Codex, Cursor, Gemini CLI, VS Code and Claude connectors.
- MCP server frameworks compared: FastMCP vs mcp-use vs the official Python and TypeScript SDKs (Comparison): Four ways to build an MCP server in 2026: the official Python SDK (v2) and TypeScript SDK (v2), Prefect's FastMCP and Manufact's mcp-use. Covers languages, schemas, transports, auth, MCP Apps (UI), local testing, deployment and license.
- Work-management MCP servers compared: Asana vs monday.com vs Linear vs Notion vs Atlassian (Comparison): The official hosted MCP servers for five work-management tools (Asana, monday.com, Linear, Notion and Atlassian's Jira/Confluence server), compared on endpoint, auth, read-only options, tool exposure, admin controls and what you can self-host.
- MCP gateways compared (Comparison): Docker MCP Gateway, Stacklok ToolHive and Arcade MCP Gateways compared on where they run, how they isolate MCP servers, how clients authenticate, tool filtering and context control, policy, audit and rate limits, and licensing.
- DevOps and observability MCP servers compared (Comparison): Eight official MCP servers for infrastructure and operations work (Kubernetes, Terraform, Buildkite, Azure DevOps, Heroku, Datadog, Grafana and Sentry) compared on what they cover, where they run, how they authenticate and how far their read-only modes actually go.
- Database MCP servers compared (Comparison): Google's MCP Toolbox for Databases and the MongoDB, Neon and Supabase MCP servers compared on what they connect to, where they run, how they authenticate, how read-only mode and scoping work, and what guards their write tools.
- Agent identity and MCP authorization platforms (Comparison): Descope, Stytch Connected Apps, Auth0 for AI Agents, WorkOS AuthKit and Arcade compared on their role in MCP OAuth, DCR and CIMD support, delegated tokens for third-party APIs, human approval, pricing and SDKs.
- Discover a site's agent interfaces (Skill): A probe-then-pick workflow for finding the best machine interface a website offers (MCP, A2A, OpenAPI, Agent Skills, llms.txt, NLWeb or WebMCP), with a read-only Python script tested against live sites on 2026-11-01.
- Pick an MCP server (Skill): A repeatable shortlist-compare-probe workflow for selecting an MCP server from Index Agentica, with two scripts that pull candidates from the live REST API and test a remote endpoint's auth without credentials.
- Connect a remote MCP server (Skill): Configure, verify and troubleshoot a remote Streamable HTTP MCP server in the major agent clients, including OAuth discovery and protocol-version checks.
Sources
Machine-readable
- JSON
- Markdown
- Source file on GitHub (edit via pull request)