mcpField
M
MCP Auth Node.js SDK

MCP Auth Node.js SDK

Local
github.com/mcp-authDeveloper Tools50Updated 8w ago

About MCP Auth Node.js SDK

MCP Auth Node.js SDK is an npm library that adds authentication to Node.js MCP servers. It connects to any OAuth 2.0 or OpenID Connect provider and is built for the MCP TypeScript SDK v2. It targets developers who need to meet the MCP spec's authorization requirements.

Key features

  1. 01Implements RFC 9728 Protected Resource Metadata
  2. 02Validates audience-bound tokens per RFC 8707
  3. 03Works with any OAuth 2.0 or OpenID Connect provider
  4. 04Offers a 0.2 line for MCP SDK v1 users

Use cases

  1. 01Adding OAuth 2.1 authorization to a Node.js MCP server
  2. 02Connecting an MCP server to an existing OIDC identity provider
  3. 03Checking that access tokens are issued for the server's audience

MCP support

The library gives MCP servers the authorization layer required by the MCP specification's OAuth requirements.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Auth Node.js SDK

GitHub branch check runs codecov NPM version npm bundle size License

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.

Get started

Is my provider supported?

Check out the MCP-compatible providers to see which providers are supported. It also includes a tool for real-time checking of provider compatibility.

Installation
npm install mcp-auth

Or 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 [email protected] — and see the v0.2.0 code and samples.

See the documentation for the full guide.

Join the discussion

Join the MCP Auth org discussion to ask questions or share your feedback.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.