An MCP server for Clerk generated by @buildwithalyer
npm install @clerk/clerk-mcp> ⚠️ 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.
- Node.js >= v18.0.0
- MCP Client
- Clerk Secret Key - get this from the Clerk project dashboard:
!Clerk Secret Key
> ⚠️ 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 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.
``json`
{
"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
}
}
}
}
to "true". It also supports some prompt workflows tested in Cursor which allow you to quickstart Clerk applications.
$3
By default, the following core Clerk API tools are enabled:
- BanUser
- CreateInvitation
- CreateUser
- DeleteUser
- GetSession
- GetUser
- GetUserList
- GetUsersCount
- ListDomains
- ListInvitations
- RevokeInvitation
- UpdateUserTo access additional tools:
1. Enable
ALL_TOOLS=true in your config
2. Run the MCP server
3. Use your MCP client's tool discovery feature$3
-
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.