The cursor provider dispatches tasks to Cursor — the AI-first code editor — using the @cursor/sdk TypeScript library.
Because @cursor/sdk uses gRPC (HTTP/2) which is incompatible with Bun's HTTP/2 implementation, the Bridge spawns a separate Node.js child process (cursor-sdk-runner.mjs) and communicates with it over stdin/stdout JSONL. The runner is embedded inside the Bridge binary and extracted automatically on first use — Node.js must be installed on the machine.
Provider name: cursor
Cursor uses an API key from the Cursor dashboard.
- Open https://cursor.com/settings → Integrations → API Keys
- Create a new key
- Set it as
CURSOR_API_KEY
CURSOR_API_KEY=crsr_...The Bridge needs Node.js to run the Cursor SDK runner subprocess.
Linux / macOS
# Using nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install --lts
node --version
# Or via package manager (Ubuntu/Debian)
sudo apt install nodejs npmWindows (PowerShell)
# Using winget
winget install OpenJS.NodeJS.LTS
# Or download from https://nodejs.org
node --versionThe runner does not require
npm install— the Bridge extracts a self-containedcursor-sdk-runner.mjsto/tmp/(Linux/macOS) or%TEMP%(Windows) on first run. On subsequent runs it always overwrites the cached file to prevent stale-runner issues after Bridge upgrades.
When running tasks, Cursor may create node_modules folders and a cursor-sdk-runner.js helper in the agent workspace. These are normal runtime artifacts and can be added to .gitignore if you track the workspace in git.
| Variable | Required | Default | Description |
|---|---|---|---|
CURSOR_API_KEY |
yes | — | Cursor API key from the dashboard |
CURSOR_TIMEOUT_MINUTES |
no | 10 |
Hard timeout per task |
AGENTS_FOLDER |
no | ~ |
Root directory where agent workspace folders are created |
Linux / macOS
PAIRING_TOKEN=your_pairing_token \
PROVIDERS=cursor \
CURSOR_API_KEY=crsr_0cc282b2715c51548c8d2572bc7a554465b7b7e108fe96e0c44e604ae9540ca4 \
./ctrlnode-bridge-linux-x64Windows (PowerShell)
$env:PAIRING_TOKEN = "your_pairing_token"
$env:PROVIDERS = "cursor"
$env:CURSOR_API_KEY = "crsr_..."
.\ctrlnode-bridge.exe.env file
PAIRING_TOKEN=your_pairing_token
PROVIDERS=cursor
CURSOR_API_KEY=crsr_...
AGENTS_FOLDER=/home/ubuntu- When a task is dispatched to a Cursor agent, the Bridge spawns a Node.js process running the embedded
cursor-sdk-runner.mjs. - The runner communicates with the Cursor SDK over gRPC and forwards messages to the Bridge over JSONL on stdout.
- Task output is streamed back to CTRL NODE in real time.
- On completion the Bridge writes an output markdown file and reports the final status.
PROVIDERS=cursor,claude-sdk
CURSOR_API_KEY=crsr_...
ANTHROPIC_API_KEY=sk-ant-...