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

# Cursor

> One-click install or paste the MCP config into mcp.json. About two minutes, authenticated with an API key.

Cursor authenticates to xysq with a bearer token: a long-lived API key you generate once. Each tool gets its own key so you can revoke them independently. Takes about two minutes.

<Steps>
  <Step title="Generate your API key">
    Open the Cursor connect guide in [app.xysq.ai](https://app.xysq.ai) (**Connect → Cursor**) and click **Generate**. The full value is shown exactly once; copy it now or revoke and regenerate later.

    <Tip>You can regenerate any time. The new key replaces the old one; anywhere you've already pasted the old key will need updating.</Tip>
  </Step>

  <Step title="Copy your MCP config">
    Cursor reads MCP servers from a JSON file. This config tells Cursor where xysq lives and how to authenticate:

    ```json theme={"dark"}
    {
      "mcpServers": {
        "xysq": {
          "url": "https://api.xysq.ai/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
    ```

    Prefer one-click? The in-app guide has a button that opens Cursor and installs xysq automatically, no JSON editing.
  </Step>

  <Step title="Paste into mcp.json">
    Open Cursor's MCP config file, paste the JSON, and save. If a `mcpServers` block already exists, add the `xysq` entry inside it (don't duplicate the outer block).

    | OS            | Location                         |
    | ------------- | -------------------------------- |
    | macOS / Linux | `~/.cursor/mcp.json`             |
    | Windows       | `%USERPROFILE%\.cursor\mcp.json` |

    <Tip>If the file doesn't exist yet, create it and paste the full JSON from the previous step.</Tip>

    **Global vs project-scoped:** the path above is the **global** config (xysq available in every workspace). For project-only access, use `.cursor/mcp.json` inside the repo root instead. Same JSON shape.
  </Step>

  <Step title="Verify the connection">
    Open the **Agent** panel in Cursor and ask it to do something with xysq, for example:

    ```text theme={"dark"}
    Connect to xysq and pull my context.
    ```

    The in-app guide watches for the first call from Cursor and marks the connection verified.

    <Tip>If you're switching between Cursor windows, the agent might cache an old MCP config. Restart Cursor once if the connection doesn't show up within a minute.</Tip>
  </Step>
</Steps>
