Tools for building modern and secure MCP integrations across the client and server side
open sourceMITself-hostablefree
@clerk/mcp-tools is Clerk's MIT-licensed TypeScript library on top of the MCP TypeScript SDK for adding OAuth to MCP servers and clients. On the server side it generates RFC 9728 protected resource metadata (with Clerk helpers), adds step-up scope challenges, and has adapters for Express, Hono and Next.js. Its feedback module adds a submit_feedback tool to any MCP server built on the TypeScript SDK, so agents can report missing, broken or confusing tools; reports are stored on your Clerk instance and shown in the Clerk Dashboard. It also has a create_browser_session tool that gives an agent a one-time signed-in link to your app, and, for MCP clients, dynamic client registration and OAuth callback helpers with Redis, Postgres, SQLite and file stores.
Problems it solves
- find out when agents get stuck on our MCP server because a tool is missing, broken or confusing
- add a submit_feedback tool to our MCP server so agents can report problems to us
- serve OAuth protected resource metadata so MCP clients can sign users in to our server
- ask the user to approve more OAuth scopes only when an MCP tool needs them
- add OAuth-protected MCP endpoints to our Express, Hono or Next.js app
- let an agent driving a browser open our app already signed in as the user it works for
- connect our AI app to a user's MCP servers with OAuth and keep the session across serverless functions
- store MCP client OAuth sessions in Redis or Postgres
- protect our MCP server with the same Clerk accounts our web app uses
Features
- protected resource metadata generation (RFC 9728), with Clerk helpers
- Clerk authorization server metadata fetch
- requireAdditionalScopes for step-up scope challenges (MCP SDK 2.1+)
- streamable HTTP handlers for Express and Hono; Next.js helpers
- verifyClerkToken and mcpAuthClerk to authenticate MCP requests with Clerk
- submit_feedback tool: agents report missing, broken, confusing or idea feedback with task, impact and what they tried
- feedback works with MCP SDK 1.x and 2.x, including local stdio servers
- create_browser_session tool: one-time signed-in browser links for agents
- MCP client helpers: dynamic client registration, OAuth callback handling, tool calls
- client session stores: file system, Redis, Postgres, SQLite or custom
Limitations
- Doesn't store agent feedback without Clerk: the submit_feedback tool needs a Clerk instance's secret key and reports appear in the Clerk Dashboard12
- Doesn't support Python or other MCP SDKs: it is built on the MCP TypeScript SDK1
- Authorization server metadata (RFC 8414) is not yet fully implemented1
- No step-up scope challenges behind its Express and Hono adapters: they run MCP SDK 1.x, so those tools must check scopes themselves1
Alternatives
The same job
These do what Clerk MCP Tools does.
- Arcade.dev The actions runtime for enterprise AI agents
- Zuplo MCP Gateway One gateway for every MCP server your agents touch.
