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

# Cursor

> Adding a HeyMCP tunnel to Cursor's mcp.json.

Cursor configures remote MCP servers through a JSON file.

## Where the file lives

| Scope        | Path                                   |
| ------------ | -------------------------------------- |
| This project | `.cursor/mcp.json` in the project root |
| Everywhere   | `~/.cursor/mcp.json`                   |

A tunnel URL is usually project-specific, so the project file is normally the
right one.

## Add the connector

```bash theme={null}
heymcp share localhost:8000
```

Then, in `.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "heymcp": {
      "url": "https://amber-jetty.t.heymcp.dev/mcp"
    }
  }
}
```

Remote servers use `url` rather than `command`. That's the whole difference from
a local stdio server.

## With a bearer token

If you shared with [`--bearer`](/security/authentication):

```json theme={null}
{
  "mcpServers": {
    "heymcp": {
      "url": "https://amber-jetty.t.heymcp.dev/mcp",
      "headers": {
        "Authorization": "Bearer s3cret"
      }
    }
  }
}
```

<Warning>
  `.cursor/mcp.json` in a project root is a file people commit. Don't put a real
  token in one that's tracked — either add it to `.gitignore`, or reference an
  environment variable with `${env:HEYMCP_BEARER}` instead of hard-coding it.
</Warning>

## Check it connected

Cursor's MCP settings list each configured server with its status and lets you
toggle them on and off. Your HeyMCP inspector is the better check though — you
should see `INIT`, `NOTIF` and `LIST` rows fingerprinted as Cursor.

<h2 id="its-not-showing-up">
  It's not showing up
</h2>

<AccordionGroup>
  <Accordion title="The server doesn't appear in Cursor at all">
    JSON syntax error, or the file is in the wrong place. `.cursor/mcp.json`
    has a leading dot, and it goes in the project root, not in `.vscode/`.
  </Accordion>

  <Accordion title="Nothing in the HeyMCP inspector">
    Cursor never reached the edge. Check the URL and that `heymcp share` is
    still running.
  </Accordion>

  <Accordion title="401 in the inspector">
    Your `headers` block is missing or the token doesn't match what you passed
    to `--bearer`.
  </Accordion>
</AccordionGroup>
