Package Exports
- @clerk/clerk-mcp
- @clerk/clerk-mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@clerk/clerk-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Clerk MCP Server
⚠️ Warning: This project is in active development and subject to rapid changes. Features and APIs may be modified frequently. If you have feedback or workflows you'd like to see supported, please get in touch via ai@clerk.dev
Model Context Protocol (MCP) is a standardized protocol for managing context between large language models (LLMs) and external systems or services like Clerk.
Clerk's MCP server allows you to use any MCP Client (Claude Desktop, Cursor, Windsurf and many others) to use natural language and your LLM to accomplish things with Clerk.
Setup
Requirements
- Node.js >= v18.0.0
- MCP Client
- Clerk Secret Key - get this from the Clerk project dashboard:
⚠️ Security Warning: Never share or commit your Clerk Secret Key. If exposed, immediately rotate it in your Clerk Dashboard. Add it to your
.gitignore
file and use environment variables in production.
Installation
Installation will vary depending on your client, but in most cases you'll need to add the JSON below to your MCP config file. Be sure to insert your Clerk API token.
{
"mcpServers": {
"Clerk": {
"command": "npx",
"args": ["@clerk/clerk-mcp@latest"],
"env": {
"CLERK_API_KEY": "YOUR CLERK API KEY",
"ALL_TOOLS": "false", // Optional
"PROMPTS_DISABLED": "false" // Optional
}
}
}
}
Features
This project supports tools for all Clerk API endpoints by setting the ALL_TOOLS
to "true"
. It also supports some prompt workflows tested in Cursor which allow you to quickstart Clerk applications.
Supported Tools
By default, the following core Clerk API tools are enabled:
BanUser
CreateInvitation
CreateUser
DeleteUser
GetSession
GetUser
GetUserList
GetUsersCount
ListDomains
ListInvitations
RevokeInvitation
UpdateUser
To access additional tools:
- Enable
ALL_TOOLS=true
in your config - Run the MCP server
- Use your MCP client's tool discovery feature
Supported Prompts
CreateClerkNextJSApp
- follows our Next.js quickstart guide to setup a Next.js project using Clerk.CreateClerkReactApp
- follows our React quickstart guide to setup a React project using Clerk.