Clerk MCP Server
Clerk's official hosted MCP server: SDK snippets and authentication implementation patterns for AI agents during development.
- Skill Road
- Clerk MCP Server
Categories
Description
The Clerk MCP Server is an official, Clerk-hosted Model Context Protocol server that, per the provider, supplies AI agents such as Claude, Cursor, and GitHub Copilot with up-to-date Clerk SDK snippets and implementation patterns. It does not offer generic user management at runtime; rather, it targets developers who write code with Clerk libraries. The server answers questions like: "Which hook do I use to query a logged-in user in React?" or "How do I protect a route in Next.js with Clerk?"
The server is currently in beta according to Clerk's documentation. Functionality may change before general availability.
Official product, repository, and scope
The primary documentation for the Clerk MCP Server is available at clerk.com/docs/guides/ai/mcp/clerk-mcp-server. The GitHub repository clerk/mcp-tools contains source code for Clerk's own MCP tools and integrations — including library functions for client-side and server-side MCP implementations with Clerk auth. Immediately before this entry was created on September 8, 2026, the GitHub API reported exactly 48 stars for the mcp-tools repository. That figure belongs to the entire repository, which encompasses both the hosted server and the library for building custom MCP integrations. Stars are a point-in-time popularity signal, not evidence of quality or security.
The hosted server endpoint is https://mcp.clerk.com/mcp and exclusively supports Streamable HTTP transport — SSE is not supported per the official FAQ. This means a client must be capable of speaking Streamable HTTP; older SSE-only clients cannot use this server.
Available tools and scope
The Clerk MCP Server exposes two tools according to the documentation:
clerk_sdk_snippet — Returns SDK code snippets and patterns for specific Clerk features, such as useUser, currentUser, middleware, organizations, or custom flows.
list_clerk_sdk_snippets — Lists all available snippets and bundle groups.
These tools are intended for the development phase, not production operation. They help apply integration patterns correctly and reduce outdated or incorrect code suggestions from an AI model that would otherwise fall back on training data.
Available snippet bundles
Per Clerk's documentation, the following bundles are available for comprehensive implementations: b2b-saas (complete B2B SaaS setup with organizations, billing, and role-based access), waitlist (waitlist and early-access flows), auth-basics (core authentication hooks), custom-flows (custom sign-in/sign-up flows), organizations (multi-tenant management), and server-side (server-side auth patterns).
Setup: Clerk CLI or manual configuration
The quickest path is the Clerk CLI command clerk mcp install. It auto-detects supported AI clients and registers the server in their configuration so it is available across every project. For Claude Code specifically, the direct command is: claude mcp add clerk --transport http https://mcp.clerk.com/mcp. Restart the client after installation.
For clients the CLI does not support, manual configuration via an MCP JSON file is possible. The documentation covers Claude Code, Claude Desktop, Cursor, Codex, VSCode, Windsurf, and Zed.
Security, limits, and SDK versions
The Clerk MCP Server sends code snippets to the connected AI client, which may forward this information to a model provider depending on its architecture. Because it is a remote server under Clerk's control, the data flow crosses the network. The following points deserve attention:
SDK versions: The snippets provided reflect the current Clerk SDK. Anyone using an older SDK version should always verify patterns against their installed version. AI agents may apply snippets uncritically even when an API has changed between versions.
Model path: Results from this server are passed to the AI client and may appear in the model's prompt or context. Clerk snippets themselves contain no secrets, but a development session's context can include sensitive information that gets processed alongside tool results. Review the data policies of your client and model provider separately.
Untrusted input: Content from external repositories, issue comments, or websites processed by an agent in parallel can affect how Clerk snippets are interpreted (prompt injection risk). The Clerk MCP Server itself is a controlled source, but it cannot govern which other sources an agent reads concurrently.
Beta status: Because the server is in beta, tool names, bundle identifiers, or the endpoint may change without prior notice.
Frequently asked questions (FAQ)
When should I use the Clerk MCP Server? According to Clerk, the provider recommends it for everyone actively building with Clerk so that AI agents always use current patterns rather than outdated training data.
Why do I see an internal server error? This usually indicates a network or transport issue per the FAQ. Disconnect, reconnect, and ensure the client supports Streamable HTTP transport.
Does the server support SSE? No. Only Streamable HTTP is available at https://mcp.clerk.com/mcp.
Requirements
An MCP-capable client with Streamable HTTP support (e.g. Claude Code, Cursor, Codex); optionally the Clerk CLI for the quickest setup.
Installation instructions
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.
Step 1: 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.
Step 2: 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.
Step 3: 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.
Step 4: 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.
Step 5: 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.
clerk mcp install
Authentication
The endpoint https://mcp.clerk.com/mcp is accessible without an API key via Streamable HTTP. The snippet tools do not require a Clerk account.
Required access permissions
The server delivers read-only SDK information only. It has no access to Clerk accounts, user data, or production systems.
Transmitted or stored data
Clerk processes tool calls on its servers and returns snippet text. The connected AI client may send this content to its model provider; review that provider's privacy policy separately.
Security risks
SDK snippets may target a different Clerk version than the one installed. Beta status means potential breaking changes. Results may appear in the agent context alongside untrusted content from other sources (prompt injection risk). Account for the data path over the network and model provider.
License and costs
- License
- MIT
- Cost
- free
The hosted server is free to use per the provider. Review current Clerk plan terms at clerk.com; this entry contains no pricing figures.
Alternatives
Not recorded yet.
At a glance
- Provider
- Clerk
- Status
- Official server
- Deployment
- Remote
- Current version
- beta
- GitHub stars
- 53
- Last reviewed
- 08.09.2026
Repository and documentation
Categories
Supported clients
Related guides
Guides and background related to this entry.