
Clerk
OfficialProvides direct access to Clerk's user management system for retrieving, updating, and managing user data and authentication states.
Manage Clerk's authentication and user management organization management, session handling, and authorization features.
What it does
- Get current authenticated user ID
- Retrieve detailed user information by ID
- Count total users in your application
- Update user profile attributes
- Manage user public metadata
- Modify user unsafe metadata
Best for
About Clerk
Clerk is an official MCP server published by clerk that provides AI assistants with tools and capabilities via the Model Context Protocol. Securely manage Clerk authentication, users, sessions, orgs, and authorization for seamless identity and access control. It is categorized under ai ml, developer tools. This server exposes 6 tools that AI clients can invoke during conversations and coding sessions.
How to install
You can install Clerk in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Clerk is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Tools (6)
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
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.
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
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
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.
Official Clerk JavaScript SDKs
Clerk helps developers build user management. We provide streamlined user experiences for your users to sign up, sign in, and manage their profile.
This repository contains all the Clerk JavaScript SDKs under the @clerk namespace.
š¼ Clerk is hiring!
Would you like to work on Open Source software and help maintain this repository? Apply today!
š Get started with Clerk
- Sign up for an account.
- Create an application in your Clerk Dashboard.
- Spin up a new codebase with one of the quickstart guides.
This repository contains the SDKs for environment/platforms that Clerk supports. For example, if you want to use Clerk with Next.js, you can install:
npm install @clerk/nextjs
# or
yarn add @clerk/nextjs
# or
pnpm add @clerk/nextjs
š Learning Clerk
Clerk's full documentation is available at clerk.com/docs.
- We recommend starting with the quickstart guides. They'll help you quickly add Clerk to your application. If you're starting a new project and aren't sure what to pick, check out our most popular quickstart: Next.js.
- Clerk offers a comprehensive suite of components designed to seamlessly integrate authentication and multi-tenancy into your application. To learn more about Clerk's components, check out the docs.
- Clerk's organizations feature provides powerful multi-tenancy capabilities, allowing you to group users, manage roles and permissions, and control access to resources. Perfect for B2B applications, enterprise software, and any multi-tenant system. Learn more in the docs.
š¢ Release notes
Curious what we shipped recently? You can browse the GitHub Releases page or look at the individual CHANGELOG.md files inside each package (e.g. clerk-js CHANGELOG).
š¤ How to contribute
We'd love to have you as part of the Clerk community! š
If you'd like to contribute in any way, please read our contribution guidelines. They'll show you how to submit issues, make changes to the SDKs, or open pull requests. If you want to add or edit localizations (e.g. how a button text is translated to your language), you can check out the localizations README.
š License
This project is licensed under the MIT license.
See LICENSE for more information.
Alternatives
Related Skills
Browse all skillsUI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.
Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.
Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.
Integrate Vercel AI SDK applications with You.com tools (web search, AI agent, content extraction). Use when developer mentions AI SDK, Vercel AI SDK, generateText, streamText, or You.com integration with AI SDK.