> ## Documentation Index
> Fetch the complete documentation index at: https://developers.klarity.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Register the Klarity MCP server in Cursor.

Cursor supports both install paths. The OAuth path is preferred — Cursor manages the token for you and there's no key handling.

## OAuth install (preferred)

In Cursor, open **Settings → Tools & MCP → New MCP Server** (or edit `.cursor/mcp.json` directly) and add the Klarity server:

```json theme={null}
{
  "mcpServers": {
    "klarity": {
      "type": "http",
      "url": "https://api.klarity.ai/mcp"
    }
  }
}
```

Save and reload MCP servers. Cursor detects that the server requires OAuth and shows a **Connect** button in the MCP panel. Click it — you'll be redirected to Klarity to sign in, and Cursor stores the resulting credentials for you.

## API key install

Use this for long-running background agents. Generate an API key from `Settings → MCP` in your Klarity workspace (see [Authentication](/authentication#api-key)) and add it as a Bearer header:

```json theme={null}
{
  "mcpServers": {
    "klarity": {
      "type": "http",
      "url": "https://api.klarity.ai/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}
```

Reload MCP servers from the settings panel. The Klarity tools should appear in the MCP tool list.

<Warning>
  Treat the API key like a password. Don't commit `.cursor/mcp.json` with a live key — use a global config (`~/.cursor/mcp.json`) or env-var reference instead. Rotate keys from `Settings → MCP` in Klarity if exposed.
</Warning>

## Verify

In a Cursor chat, ask:

```text theme={null}
Search Klarity for AI transformation opportunities across our processes — where could we build skills or deploy agents?
```

The assistant should call `search` and return process results from your workspace.
