Feedback

Basic information

Transport
stdio
Authentication
OAuth
Runtime
TypeScript
Version
1.0.0
Category
Author
clerk
Quality
88 (A)
Views
982

About Clerk MCP Server

Securely manage Clerk authentication, users, sessions, orgs, and authorization for seamless identity and access control.

Clerk is a remote MCP server in the Ai Ml category listed in the AddMCP.net directory, published by clerk. It exposes 6 tools, including getUserId, getUser, getUserCount, updateUser and more. Supported transport: stdio. Runtime: TypeScript. License: MIT. The repository has 1,673 GitHub stars. Source code is hosted on github.com. Related topics: ai-ml, astro, auth, authentication, developer-tools.

Connection details

https://mcp.clerk.com/mcp

Setup

claude mcp add clerk --transport http https://mcp.clerk.com/mcp

Clerk MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "clerk": {
            "command": "npx",
            "args": [
                "-y",
                "@clerk/agent-toolkit",
                "-p=local-mcp",
                "--tools=users",
                "--secret-key=sk_123"
            ]
        }
    }
}

Clerk MCP Server tools

  • getUserId — Tool name: getUserId Description: Get the userId of the current authenticated user if signed in, otherwise return null. Use this tool when you need to identify the current user but don't need their profile details. This tool takes no parameters and is the quickest way to check if a user is authenticated. Example use case: When you need to verify if a user is logged in before performing user-specific operations. . Arguments: Takes no arguments
  • getUser — Tool name: getUser Description: Retrieves detailed information about a user by their userId, including email addresses, username, profile image, created/updated timestamps, and public metadata. Use this tool when you need comprehensive user information beyond just their ID. If the userId parameter is not provided, it will use the current authenticated user's ID. Example use case: When you need to display user profile information or check user attributes. . Arguments: - userId: (string): The userId of the User to retrieve.
  • getUserCount — Tool name: getUserCount Description: Retrieves the total count of users in your Clerk instance. Use this tool when you need to know the total number of users in the system. This tool takes no parameters and is an efficient way to get just the count without retrieving user details. . Arguments: Takes no arguments
  • updateUser — Tool name: updateUser Description: Updates an existing user's attributes in your Clerk instance. Use this tool when you need to modify core user information (NOT metadata). Important notes: 1. If the userId parameter is not provided, it will use the current authenticated user's ID 2. Only the provided fields will be updated, other fields remain unchanged 3. For updating metadata, use the specialized metadata update tools instead 4. Email and phone verification status cannot be changed with this tool Example use cases: 1. Updating a user's name, username, or other profile information 2. Enabling or disabling a user account 3. Setting a user's primary contact information . Arguments: - userId: (string): The userId of the User to update. - firstName: (string): New first name for the user - lastName: (string): New last name for the user - username: (string): New username for the user - profileImageUrl: (string): URL for the user profile image
  • updateUserPublicMetadata — Tool name: updateUserPublicMetadata Description: Updates the public metadata associated with a user by merging existing values with the provided parameters. Use this tool when you need to store or update user preferences, settings, or other non-sensitive information. Important characteristics: 1. A "deep" merge is performed - any nested JSON objects will be merged recursively. 2. You can remove metadata keys at any level by setting their value to null. 3. Public metadata is visible to the frontend and should NOT contain sensitive information. Example use case: Storing user preferences, feature flags, or application-specific data that persists across sessions. . Arguments: - userId: (string): The userId of the User to update. - metadata: (Record<string,any>): The public metadata to set or update. Use null values to remove specific keys.
  • updateUserUnsafeMetadata — Tool name: updateUserUnsafeMetadata Description: Updates the unsafe metadata associated with a user by merging existing values with the provided parameters. Use this tool when you need to store data that should be accessible both on the frontend and backend. Important characteristics: 1. A "deep" merge is performed - any nested JSON objects will be merged recursively. 2. You can remove metadata keys at any level by setting their value to null. 3. Unsafe metadata is accessible from both frontend and backend code. 4. Unlike public metadata, unsafe metadata is NOT included in JWT tokens. Example use case: Storing user data that should be modifiable from the frontend but not included in authentication tokens. . Arguments: - userId: (string): The userId of the User to update. - metadata: (Record<string,any>): The unsafe metadata to set or update. Use null values to remove specific keys.

Overview

What is Clerk?

Clerk provides authentication, organization management, and billing implementation support for application developers. Its connector brings current SDK snippets, route-protection patterns, B2B organization examples, and framework-specific guidance into assistant coding workflows.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬