cursor-api docs
Run a local Windows daemon that exposes Cursor Composer through OpenAI-compatible and Anthropic-compatible API shapes for agent clients.
Client settings
Use these values in agent clients that support a custom local API endpoint.
http://127.0.0.1:6903/v1cursor-localcomposer-2.5composer-2.5-fast127.0.0.16903Quick start
Install the release bundle, store your Cursor key, then start the local daemon.
irm https://cursor-api-windows.mynameistito.com/install.ps1 | iexcursor-api key setcursor-api startcursor-api healthcursor-api urlAgent clients
Any client that can set an OpenAI-compatible base URL can point at the daemon.
Use cursor-local as the local API key and choose either Composer model name.
OPENAI_BASE_URL=http://127.0.0.1:6903/v1
OPENAI_API_KEY=cursor-local
OPENAI_MODEL=composer-2.5-fastThe CLI also includes an agent configuration command for supported clients, starting with OpenCode.
cursor-api configure agent opencodeRequest examples
The server accepts common agent request shapes and translates them through the same Composer path.
OpenAI-compatible
Use the same shape most OpenAI-compatible agents already emit. Set stream when your client expects server-sent events.
POST http://127.0.0.1:6903/v1/chat/completions
Authorization: Bearer cursor-local
Content-Type: application/json
{
"model": "composer-2.5-fast",
"messages": [
{ "role": "user", "content": "Inspect this repo and suggest a fix." }
],
"stream": true
}Anthropic-compatible
The local server also accepts the Anthropic Messages shape for Claude Code-style clients and translates it through the same Composer path.
POST http://127.0.0.1:6903/v1/messages
x-api-key: cursor-local
anthropic-version: 2023-06-01
Content-Type: application/json
{
"model": "composer-2.5",
"max_tokens": 1200,
"messages": [
{ "role": "user", "content": "Plan the next edit." }
]
}API surface
The daemon binds to loopback and exposes only the local /v1 surface.
/v1/modelsList composer-2.5 and composer-2.5-fast./v1/chat/completionsOpenAI chat completions./v1/responsesOpenAI Responses API shape./v1/messagesAnthropic Messages shape for Claude Code-style clients./v1/messages/count_tokensAnthropic token counting shape.Model choice
Use composer-2.5 when an agent needs a more thorough planning or editing pass.
Use composer-2.5-fast when you want quicker turn-taking for iterative agent work.
Runtime lifecycle
The release bundle keeps the Bun-compiled CLI and Node bridge separate.
%LOCALAPPDATA%\Programs\cursor-api\cursor-api.exe plus a bundled bridge directoryBackground daemon with PID state under AppDataNode runtime for local @cursor/sdk callsStop daemon, replace release files, preserve AppData configTroubleshooting
Use these checks before changing client configuration or reinstalling.
Run cursor-api key status, then cursor-api key set if needed.Run cursor-api status and confirm the client uses /v1 in the base URL.Use cursor-api port set <port>, then restart the daemon.Run cursor-api logs -f while reproducing the client request.Re-run cursor-api configure agent opencode after changing the port.Command reference
The CLI command surface is grouped by daemon control, configuration, and operations.
cursor-api startcursor-api stopcursor-api restartcursor-api statuscursor-api logs -fWhere data lives
User configuration lives under AppData and is preserved across release updates.
%LOCALAPPDATA%\Programs\cursor-api\%APPDATA%\cursor-api\settings.json%APPDATA%\cursor-api\api-key.enc%APPDATA%\cursor-api\run\%APPDATA%\cursor-api\logs\Credits and scope
cursor-api-cli-windows is independent and builds on prior MIT work.
standardagents/composer-api
OpenAI-compatible translation, Cursor API adapters, the local bridge, and the sidecar server design.
API for Cursor Windows port
Two-process architecture, bridge runtime constraints, agent config shapes, and local defaults.
@cursor/sdk
Official Cursor SDK used by the bundled Node bridge to drive Composer agents.
Cursor Composer models
Model names and capabilities are provided by Cursor. This project is independent.