Logo de Clerk

Clerk

OrganizaçãoPopular
clerk

Official JavaScript repository for Clerk authentication

Publicado porclerk
Repositóriojavascript
IdiomaTypeScript
Forks
471
Estrelas
1.8K
Ferramentas disponíveis
6
Tipo de transportestdio
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Clerk disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 6 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    1.8K estrelas e 471 forks no repositório vinculado.


💼 Clerk is hiring!

Would you like to work on Open Source software and help maintain this repository? Apply today!


🚀 Get started with Clerk

  1. Sign up for an account.
  2. Create an application in your Clerk Dashboard.
  3. 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:

sh
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.

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

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

Ferramentas disponíveis

  • 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:
    5. Updating a user's name, username, or other profile information
    6. Enabling or disabling a user account
    7. 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.

Use o MCP de Clerk com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Clerk, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Clerk como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Clerk.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "clerk": {
      "command": "npx",
      "args": [
        "-y",
        "@clerk/agent-toolkit"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Clerk, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Clerk.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Clerk para me ajudar nesta tarefa?
Clerk
Claro. Já li.
Veja o que encontrei usando Clerk.

Perguntas frequentes

Para que serve o servidor MCP Clerk?

Clerk é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Clerk com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Clerk com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Clerk com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Clerk conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Clerk ao TypingMind?

Clerk funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP Clerk oferece no TypingMind?

Clerk disponibiliza 6 ferramentas MCP que podem ser ativadas na página Plugins do TypingMind e usadas no chat ou atribuídas a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Clerk?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Clerk exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇