The MCP spec requires OAuth 2.1 and other RFCs for auth. Instead of spending weeks on them, use MCP Auth to connect to a trusted provider with a few lines of code.
mcp-auth targets the latest MCP specification and the MCP TypeScript SDK v2, implementing the spec's authorization requirements โ RFC 9728 Protected Resource Metadata and RFC 8707 audience-bound token validation โ for any OAuth 2.0 / OpenID Connect provider.
Check out the MCP-compatible providers to see which providers are supported. It also includes a tool for real-time checking of provider compatibility.
npm install mcp-authOr use your package manager of choice, such as pnpm or yarn.
Still on MCP SDK v1 (@modelcontextprotocol/sdk)? Stay on the 0.2 line โ npm install mcp-auth@0.2 โ and see the v0.2.0 code and samples.
See the documentation for the full guide.
Join the MCP Auth org discussion to ask questions or share your feedback.