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

# Cursor

> Add the Pipecorn MCP server to Cursor through mcp.json with your API key.

Cursor connects through `mcp-remote` and authenticates with your API key in
the `X-API-Key` header, the same way [Claude Code](/mcp/setup/claude-code)
does. Node.js is required.

<Steps>
  <Step title="Open the MCP settings">
    Go to **Cursor Settings → Tools & Integrations → MCP** and click
    **Add Custom MCP**. Cursor opens an `mcp.json` file: `.cursor/mcp.json`
    in the project for a project-level server, or `~/.cursor/mcp.json` for
    all projects.
  </Step>

  <Step title="Add the Pipecorn server">
    Paste the following, replacing `YOUR-API-KEY` with your
    [Pipecorn API key](/api-reference/API-key):

    ```json theme={null}
    {
      "mcpServers": {
        "pipecorn": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "https://mcp.pipecorn.com/mcp",
            "--header",
            "X-API-Key:${API_KEY}"
          ],
          "env": {
            "API_KEY": "YOUR-API-KEY"
          }
        }
      }
    }
    ```
  </Step>

  <Step title="Check the connection">
    Back in the MCP settings, the Pipecorn server should show a green status
    and list its tools. In chat, ask for something like "find the head of
    sales at Pipecorn" to try it.
  </Step>
</Steps>

<Note>
  Keep the key out of version control. Prefer the user-level
  `~/.cursor/mcp.json`, or add `.cursor/mcp.json` to `.gitignore` when the
  server is configured per project.
</Note>
