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

# Cursor provider

> Bridge provider cursor — Cursor SDK via Node.js runner

Provider id: **`cursor`** · CtrlNode agent type: **`Cursor`**

Runs **Cursor** through `@cursor/sdk`. Because the SDK uses gRPC/HTTP2, the Bridge extracts a **Node.js runner** (`cursor-sdk-runner.mjs`) to a temp directory and communicates over JSONL on stdin/stdout.

## When to use it

* You have a **Cursor API key** and want Cursor agents to execute CtrlNode tasks
* The Bridge host can run **Node.js LTS** alongside the Bridge binary

## Prerequisites

### Node.js

```bash theme={null}
node --version   # LTS recommended
```

Windows: `winget install OpenJS.NodeJS.LTS`

### Cursor API key

1. Open [cursor.com/settings](https://cursor.com/settings) → **Integrations** → **API Keys**
2. Create a key
3. Set:

```env theme={null}
CURSOR_API_KEY=crsr_...
```

## Environment variables

| Variable                 | Required | Default | Description    |
| ------------------------ | -------- | ------- | -------------- |
| `CURSOR_API_KEY`         | **Yes**  | —       | Cursor API key |
| `CURSOR_TIMEOUT_MINUTES` | No       | `10`    | Task timeout   |
| `BASE_PATH`              | No       | Home    | Workspace root |

## Example `.env`

```env theme={null}
PAIRING_TOKEN=...
PROVIDERS=cursor
CURSOR_API_KEY=crsr_...
```

## CtrlNode setup

1. Project agent type **Cursor**
2. Register agents in **Team**
3. Keep Node.js available to the same user as `ctrlnode`

<Note>
  The runner is embedded in the Bridge binary and refreshed on upgrade. You do not install `@cursor/sdk` manually on the host.
</Note>

## Workspace artifacts

Cursor may create `node_modules` or helper files under the agent workspace during a run. Add them to `.gitignore` if the workspace is a git repo.

## Troubleshooting

| Issue                               | Fix                                    |
| ----------------------------------- | -------------------------------------- |
| `cursor_api_key_missing` at startup | Set `CURSOR_API_KEY`                   |
| Runner fails immediately            | Install Node.js; verify `node` on PATH |
| 401 on dispatch                     | Regenerate API key in Cursor settings  |
| Task routed to wrong provider       | Agent type must be `Cursor`            |

[← All providers](/bridge/providers)
