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

> ## Agent Instructions
> Unkey is two separate products. Compute builds, deploys, and runs apps behind a gateway. API Management issues API keys, enforces rate limits, manages identities and permissions, and reports usage. Say which product a page belongs to; a reader can use either without the other.
> Every Unkey API endpoint is an HTTP POST to https://api.unkey.com/v2/{service}.{procedure} with a root key in the Authorization: Bearer header. Root keys are workspace scoped.
> Error codes have the form err:{system}:{category}:{specific} and each has a page at /errors/{system}/{category}/{specific}.
> The word environment means production or preview in Compute. Rate limiting has four meanings on this site; the glossary lists them.

# Use Unkey with Cursor

> Add the Unkey MCP servers and docs to Cursor.

You need a root key for your assistant. See [Create a root key](/docs/platform/ai-coding/mcp-servers#create-a-root-key).

## Add the Unkey server

<Steps titleSize="h3">
  <Step title="Set your root key">
    Set `UNKEY_ROOT_KEY` in your shell profile or system environment, then restart Cursor so it picks up the variable.
  </Step>

  <Step title="Edit mcp.json">
    Open `~/.cursor/mcp.json` to use Unkey in every project, or `.cursor/mcp.json` in a project to use it there only. Add the server:

    ```json theme={"system"}
    {
      "mcpServers": {
        "unkey": {
          "url": "https://mcp.unkey.com/mcp/v2",
          "headers": {
            "Mcp-Unkey-V2-Bearer": "${env:UNKEY_ROOT_KEY}"
          }
        }
      }
    }
    ```

    For the Compute server, use `https://mcp.unkey.com/mcp/compute` as the URL.
  </Step>

  <Step title="Check the connection">
    Open **Customize** in the sidebar and check that **unkey** is listed and turned on. Then ask Cursor's agent something like "List my Unkey keyspaces."
  </Step>
</Steps>

If the server doesn't connect, open the Output panel, choose **MCP Logs**, and look for an authentication or connection error.

## Add the docs

On any docs page, open the menu next to **Copy page** and choose **Connect to Cursor**. Cursor opens and asks you to install the docs MCP server.

## Next steps

<Columns cols={2}>
  <Card title="Try some prompts" icon="message" href="/docs/platform/ai-coding/mcp-servers#try-it">
    Example requests for keys, analytics, and deployments.
  </Card>

  <Card title="Fix connection problems" icon="wrench" href="/docs/platform/ai-coding/mcp-servers#fix-connection-problems">
    What to check when the server doesn't connect.
  </Card>
</Columns>
