Tool

Run Claude Code CLI using your Cursor subscription backend

cursor-bridge is a Rust binary that runs Claude Code CLI using your Cursor subscription backend through automatic proxy management.

Works with cursorclaudeanthropic

91
Spark score
out of 100
Updated 6 days ago
Version 0.2.0
Models
claude

Add to Favorites

Why it matters

Enable developers with existing Cursor subscriptions to use Claude Code's agent capabilities (file editing, shell commands, tool use) without paying separately for Anthropic API credits, by routing all requests through Cursor's included Auto model.

Outcomes

What it gets done

01

Automatically extract Cursor auth tokens from macOS keychain or environment variables

02

Spawn a local HTTP proxy that translates Anthropic API calls to Cursor agent CLI requests

03

Launch Claude Code CLI sessions with zero manual configuration or environment setup

04

Clean up proxy processes and ports automatically when the coding session ends

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/hkc5-cursor-bridge | bash

Overview

Cursor Bridge

cursor-bridge is a Rust binary that runs Claude Code CLI using your Cursor subscription's backend. It automatically starts a local HTTP proxy on a random port, reads your Cursor auth token (from macOS keychain or CURSOR_TOKEN env var), spawns the claude CLI with correct environment variables, translates Anthropic API calls to Cursor agent CLI requests, and cleans up on exit. Use cursor-bridge when you have a Cursor subscription and want Claude Code's agent capabilities (file editing, shell commands, tool use) running through your Cursor backend. The source states that Cursor's Auto model is included with your subscription as free and unlimited with no extra per-token cost.

What it does

cursor-bridge is a single Rust binary that lets you run Claude Code CLI using your existing Cursor subscription's backend. It automatically starts a local HTTP proxy, authenticates using your Cursor token, spawns the Claude Code CLI with the correct environment variables, and cleans up when you exit - all without manual configuration.

When to use - and when NOT to

Use cursor-bridge when you already pay for a Cursor subscription and want to leverage Claude Code's agent capabilities (file editing, shell commands, tool use) through your Cursor backend. According to the source, "You have a Cursor subscription. You want to use Claude Code (the CLI). Cursor's Auto model is included with your subscription - free, unlimited, no extra per-token cost."

Do NOT use cursor-bridge if you need workspace sandboxing (the agent runs in your current directory without isolation) or if you require multi-account rotation (only single account is currently supported).

Inputs and outputs

You provide prompts either interactively, as command-line arguments, or via pipe mode:

cursor-bridge                         # interactive session
cursor-bridge "refactor this file"    # one-shot prompt
cursor-bridge -p "list files"         # pipe mode

The tool outputs Claude Code CLI responses powered by your Cursor backend. Behind the scenes, it handles the entire proxy lifecycle:

cursor-bridge (Rust binary)
  ├── Starts a local HTTP proxy on a random port
  ├── Reads your Cursor auth token from macOS keychain (or CURSOR_TOKEN env var on Linux)
  ├── Spawns `claude` with env vars pointing at the proxy
  ├── Proxy translates Anthropic API calls → Cursor agent CLI
  └── Cleans up on exit

Integrations

Cursor: Requires Cursor subscription with the agent CLI authenticated (agent login). The tool reads your Cursor auth token from macOS keychain automatically or from the CURSOR_TOKEN environment variable on Linux.

Claude Code CLI: Requires the claude binary in your PATH. Install via curl -O https://claude-code.anthropic.com/claude && chmod +x claude.

Platform support: macOS and Linux. macOS users get automatic token retrieval from keychain; Linux users must set the CURSOR_TOKEN environment variable.

Who it's for

cursor-bridge is for developers with Cursor subscriptions who want to run Claude Code CLI through their Cursor backend. Unlike existing Node.js proxy solutions (cursor-api-proxy, cursor-composer-in-claude, cursor-proxy) that run as background daemons requiring manual port management and environment variable configuration, cursor-bridge is a single command that manages the entire proxy lifecycle internally. It's a ~780 KB statically compiled Rust binary versus 60+ MB Node.js runtimes with npm dependencies. Install once with cargo install cursor-bridge or download the binary from releases, then simply run cursor-bridge - no daemon management, no port conflicts, no cleanup required.

Source README

cursor-bridge

One binary. Claude Code on Cursor's backend. Zero config.

Crates.io
License
Stars
CI
Platform

Why does this exist?

You have a Cursor subscription. You want to use Claude Code (the CLI).
Cursor's Auto model is included with your subscription - free, unlimited, no extra per-token cost.

Without cursor-bridge, you'd pay separately for Anthropic API credits or a Claude Pro plan.
With cursor-bridge, you just run cursor-bridge and it works - Claude Code runs on your Cursor backend.

Use cases:

  • You're already paying for Cursor → get Claude Code for free on top
  • You want Claude Code's agent capabilities (file editing, shell commands, tool use) without Anthropic billing
  • Cursor's Auto model is free and unlimited with subscription - Claude Code becomes effectively free to run
cursor-bridge                         # interactive session
cursor-bridge "refactor this file"    # one-shot prompt
cursor-bridge -p "list files"         # pipe mode

That's it. No proxy management. No env vars. Everything automatic.

How it works

cursor-bridge (Rust binary)
  ├── Starts a local HTTP proxy on a random port
  ├── Reads your Cursor auth token from macOS keychain (or CURSOR_TOKEN env var on Linux)
  ├── Spawns `claude` with env vars pointing at the proxy
  ├── Proxy translates Anthropic API calls → Cursor agent CLI
  └── Cleans up on exit

You don't see the proxy. You don't manage it. It's there and gone.

Install

# Prerequisites
# - Cursor installed with `agent` CLI authenticated (`agent login`)
# - Claude Code installed (`curl -O https://claude-code.anthropic.com/claude && chmod +x claude`)

cargo install cursor-bridge

# Then just use it
cursor-bridge

Or download a binary from Releases.

Requirements

  • macOS or Linux
  • Cursor subscription (with agent CLI in PATH)
  • Claude Code CLI (claude in PATH)
  • macOS: token auto-read from keychain
  • Linux: set CURSOR_TOKEN env var (no keychain fallback)

How it differs from other proxies

All other solutions are background servers you manage. cursor-bridge is a command you run.

Existing proxies (cursor-api-proxy, cursor-composer-in-claude, cursor-proxy) are Node.js servers that live in your process list, occupy a port, and need manual env var wiring. They don't ship with Claude Code - they sit between you and it, adding ceremony.

cursor-bridge is the opposite. There is nothing to start, stop, or configure. It is the session:

The old way cursor-bridge
Start a proxy daemon, note the port, set env vars, then run claude Run cursor-bridge - done
Background process that outlives your session Lives and dies with your terminal
Pick a port, pray it doesn't clash Random port, zero conflicts
npm install + npx + Node.js runtime (60+ MB) One Rust binary, ~780 KB, statically compiled
Multiple npm packages, peer deps, version mismatches cargo install or download. One binary. Nothing else.

No daemon. No npm install. No env vars. No port hunting. No cleanup. Just a single binary that works.

cursor-bridge replaces claude entirely - it manages the proxy lifecycle internally, spawns the CLI, and cleans up after itself when you're done.

Caveats

  • Linux: requires CURSOR_TOKEN env var (no keychain support).
  • No workspace sandboxing - the agent runs in your current directory.
  • Single account - no multi-account rotation (yet).

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.