Proxy that turns Cursor's free docs API into Claude Code fuel
A TypeScript bridge that lets you run Claude Code and Cursor IDE against Cursor's web docs free tier, with enough duct tape to keep long tool calls from collapsing.

What it does
cursor2api sits between your AI client and Cursor’s undocumented /api/chat endpoint, translating Anthropic Messages API and OpenAI Chat Completions requests into whatever Cursor’s docs page expects back. It ships with a web log viewer, token auth, and a small army of workarounds for truncation, refusals, and identity leaks.
The interesting bit
The README opens with “20260401 Cursor文档页仅剩gemini-3-flash (凉)” — roughly, “as of April 2026, Cursor docs only has Gemini 3 Flash, it’s dead.” The project is essentially a sophisticated workaround for a free tier that may already be a corpse. That context-pressure-inflation trick — lying about input_tokens so Claude Code compresses history earlier — is the kind of ugly-hack-turned-feature that keeps agentic coding sessions alive when the backend silently caps output.
Key highlights
- Dual protocol front: Anthropic
/v1/messagesand OpenAI/v1/chat/completions, plus a/v1/responsesshim for Cursor IDE Agent mode - Truncation recovery: semantic detection + auto-continuation for long
Write/Edittool calls, with configurable auto-retry limits - Context compression: three aggression levels, schema squashing (~135k → ~15k chars), and adaptive token budgets that reserve more headroom as tool count grows
- Identity laundering: 50+ refusal patterns, probe interception, and optional response sanitization to keep the model answering as “Claude”
- Vision fallback: local CPU OCR or external vision API proxy when the upstream doesn’t handle images
- Full-chain logging UI with SSE streaming, dark mode, and SQLite/JSONL persistence
Caveats
- The upstream free API appears to have degraded to Gemini 3 Flash as of the README’s April 2026 note; project viability is unclear
- Cursor IDE integration requires Cursor Pro membership and a public HTTPS domain; localhost won’t cut it
- Most anti-truncation features (context pressure inflation, adaptive budgets, smart tool-result truncation) are disabled by default and must be explicitly enabled
Verdict Worth a look if you’re already running Claude Code daily and want to squeeze mileage out of Cursor’s web tier — assuming that tier still breathes. Skip it if you have a real Anthropic API key and value stability over free-tier archaeology.