# Cursor

> Connect Cursor to the Neurouter MCP gateway through mcp.json with OAuth sign-in or an API key from an environment variable.

Source: https://neurouter.com/integrations/cursor · Last updated: 2026-11-24

Cursor reads MCP servers from `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project).

## Sign in with OAuth

```json
{
  "mcpServers": {
    "neurouter": {
      "url": "https://mcp.example.com/mcp"
    }
  }
}
```

Cursor discovers Neurouter's authorization server and opens a browser for you to sign in and approve access. You can revoke it from the agent's *Authorized apps* tab in the portal.

## Use an API key

Keep the key in an environment variable and reference it with Cursor's `${env:…}` interpolation:

```json
{
  "mcpServers": {
    "neurouter": {
      "url": "https://mcp.example.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:NEUROUTER_API_KEY}"
      }
    }
  }
}
```

Don't commit keys into a project's `.cursor/mcp.json`.

## Notes

- Cursor sees Neurouter's `search_tools` and `call_tool` meta-tools and finds tools on demand.
- Calls to tools that require [approval](https://neurouter.com/docs/approvals) wait for an approver.

Format checked against [Cursor's MCP documentation](https://cursor.com/docs/context/mcp). The portal's *Connect a client* page generates this snippet with your URL.
