Set up Clerk MCP Server
Connect the official Clerk MCP Server via the Clerk CLI or manually and integrate current SDK snippets into the AI agent.
- Skill Road
- Set up Clerk MCP Server
Published on 18.09.2026
Purpose and scope
The Clerk MCP Server is a hosted development assistant that provides current Clerk SDK snippets and implementation patterns for AI agents. It helps answer questions like "How do I protect a route in Next.js with Clerk?" or "How do I implement a B2B SaaS setup with Organizations?" directly in the agent — based on current Clerk documentation, not outdated training data. It does not provide runtime user management and has no access to Clerk accounts or production data.
The server is in beta. Tool names, bundle identifiers, and the endpoint may change before general availability.
Prerequisites
You need an MCP-compatible client that supports Streamable HTTP: Claude Code, Cursor, Codex, VSCode, Windsurf, or Zed. The server endpoint is https://mcp.clerk.com/mcp. Per Clerk's FAQ, older SSE-only clients cannot use this server. No Clerk account or API key is required to connect; the server is accessible without authentication.
Optional: the Clerk CLI, which auto-detects supported clients and configures them automatically.
Setup with the Clerk CLI
The simplest approach is the automatic setup command:
clerk mcp install
The CLI detects all supported clients on the machine and asks which ones should receive the server registration. The connection is saved in user-global configuration so the server is available in every project for the selected client.
Useful variations:
# Select specific clients without prompting
clerk mcp install --client claude --client cursor
clerk mcp install --all
# List all registered Clerk MCP entries
clerk mcp list
# Remove the entry
clerk mcp uninstall
# Check whether the server is reachable
clerk doctor
Fully restart the client after registering.
Manual setup in Claude Code
claude mcp add clerk --transport http https://mcp.clerk.com/mcp
After running this command, enter /mcp in a Claude Code session to confirm the connection. The server should appear as active and list the tools clerk_sdk_snippet and list_clerk_sdk_snippets.
Manual setup in Cursor, Claude Desktop, and other clients
In the client's MCP JSON configuration (typically ~/.cursor/mcp.json, ~/Library/Application Support/Claude/claude_desktop_config.json, or .vscode/mcp.json), add the following block:
{
"mcpServers": {
"clerk": {
"type": "http",
"url": "https://mcp.clerk.com/mcp"
}
}
}
For clients without native HTTP MCP support, an mcp-remote bridge can act as an intermediary. Clerk's documentation covers this for each client separately.
Testing available tools and snippet bundles
After connecting, start a new conversation and list all available snippets first:
> "List all available Clerk snippet bundles."
Then query a specific topic:
> "Show me how to use the useUser hook in React."
> "How do I set up B2B SaaS with Clerk Organizations?"
> "How do I protect routes in Next.js with Clerk middleware?"
The following bundles are available per the documentation: b2b-saas, waitlist, auth-basics, custom-flows, organizations, server-side. A bundle can be retrieved in full with a question like "Show me the auth-basics bundle."
Security notes for development sessions
Check SDK versions: Snippets reflect the current Clerk SDK. Anyone using an older version should compare patterns against their own package.json version. An agent may apply a snippet directly without noting a version mismatch.
Account for the data path: The remote server processes calls on Clerk infrastructure. Results go to the AI client and may be forwarded to the model provider. Avoid placing sensitive session content (e.g. production variables) in the same context as Clerk snippet queries.
Beta behavior: If a tool or bundle is no longer available, consult Clerk's official documentation and check server connection status with clerk doctor. Connection problems usually indicate transport or network issues per the FAQ.
Prompt injection: When an agent simultaneously reads external sources (repositories, websites, issue threads), that content can influence how Clerk snippets are interpreted. Keep the context focused on what is necessary.
FAQ
Do I need a Clerk account to use the server? No. The endpoint is accessible without an account or API key. The snippets provided relate to Clerk's public SDK documentation.
Why do I see an internal server error? Per Clerk's FAQ, this indicates a network or transport problem. Disconnect, reconnect, and verify that the client supports Streamable HTTP — SSE is not supported.
How often are snippets updated? Clerk updates the server when the SDK changes. Beta status means this process is still evolving.
Frequently asked questions
Do I need a Clerk account or API key?
No. The endpoint https://mcp.clerk.com/mcp is accessible without an account or key via Streamable HTTP.
Which clients are supported?
Claude Code, Cursor, Codex, VSCode, Windsurf, Zed, and other clients with Streamable HTTP support. SSE-only clients are not supported per Clerk's FAQ.
Why do outdated Clerk snippets appear?
The server provides current snippets based on the latest SDK. If an older SDK version is installed, compare patterns manually against the installed version.