UNPKG

@clerk/clerk-mcp

Version:

An MCP server for Clerk generated by @buildwithalyer

69 lines (51 loc) 2.54 kB
# 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](mailto:ai@clerk.dev) Model Context Protocol (MCP) is a [standardized protocol](https://modelcontextprotocol.io/introduction) 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: ![Clerk Secret Key](https://storage.googleapis.com/generic-assets/clerk_secret_key_pic.png) > ⚠️ **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. ```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 } } } } ``` ## 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: 1. Enable `ALL_TOOLS=true` in your config 2. Run the MCP server 3. Use your MCP client's tool discovery feature ### Supported Prompts - `CreateClerkNextJSApp` - follows our [Next.js quickstart guide](https://clerk.com/docs/quickstarts/nextjs) to setup a Next.js project using Clerk. - `CreateClerkReactApp` - follows our [React quickstart guide](https://clerk.com/docs/quickstarts/react) to setup a React project using Clerk.