| Method | When to use |
|---|---|
| OAuth | Preferred. Use in any client that supports MCP OAuth (Claude, ChatGPT, Claude Code via the plugin, Codex via codex mcp login, Cursor via the Connect button, Gemini CLI via /mcp auth). |
| API key | Use when you need a long-lived headless connection, or for custom and automated setups where the OAuth flow isn’t a fit. |
Enable the MCP in your workspace
Whichever auth method your client uses, the very first step is to turn the MCP on for the workspace you want to expose. Sign-in and Bearer-token connections will both fail until this is done.Pick the workspace to expose
Select the workspace you want your assistant to read from. This is the workspace the MCP will be enabled for.
OAuth
When the client supports MCP OAuth, you don’t handle any credentials yourself. The first time the assistant calls a Klarity tool, the client redirects you to sign in to Klarity. After that, the client manages the token. Per-client setup is covered in the Install pages.Your organization may need to approve the Klarity connector or app before users can sign in. Contact your Klarity workspace admin if the OAuth redirect fails.
API key
API key auth uses a long-lived secret that you generate in Klarity and pass to the MCP server as aBearer token. Use this for any custom or headless setup, or when a client doesn’t yet support MCP OAuth.
Generate a key
Make sure you’ve completed Enable the MCP in your workspace first — keys are scoped to the workspace you selected there.Create the key
Name it after the client you’re connecting (e.g.,
Claude Code – laptop, Cursor – work). Set an expiration and click Create.Pass the key to your client
Each client expects the key in a different place. The full request always carries:Keep keys safe
Switching workspaces
Each connection is scoped to a single Klarity workspace. If you belong to more than one, how you switch depends on your authentication method.OAuth
Disconnect the Klarity connection in your client and reconnect. The reconnect flow shows a workspace picker, so you choose the workspace at sign-in.API key
API keys are bound to the workspace they were generated in — an existing key cannot be pointed at a different workspace.Enable the MCP in the other workspace
If you haven’t already, complete Enable the MCP in your workspace for the workspace you want to switch to.

