cursor-byok is a local implementation of Cursor's backend.


cursor-byok is an open-source local model gateway for Cursor. It runs a service on your machine that connects Cursor to the model APIs you configure, routes model requests through your own providers, and preserves Cursor Agent capabilities such as tool calling, Skills, and MCP.
You can connect OpenAI- and Anthropic-compatible services, customize endpoints, model IDs, API keys, and request parameters, and use model channels beyond the options built into the platform.
[!IMPORTANT] cursor-byok is free and open source, but the model APIs you connect may charge for usage. This is an independent project and is not affiliated with or endorsed by Cursor or its developers.
For complete installation steps, system configuration, and troubleshooting, see the User Guide.
Model configurations support both OpenAI and Anthropic API protocols. Each model channel can independently define its context window, maximum output tokens, reasoning effort, custom headers, and additional request parameters.

Cursor client
│
│ Agent requests and tool results
▼
cursor-byok local service
│
│ OpenAI- / Anthropic-compatible requests
▼
Your model API
cursor-byok handles protocol adaptation, model request forwarding, tool-call coordination, and conversation state on your machine. API keys and application settings are stored locally; requests are still sent to the model provider you configure.
Many Agent products bundle their tool capabilities with a fixed set of models, subscriptions, and billing options, leaving users limited to the channels offered by the platform.
cursor-byok is built to return model choice to the user. Developers can make full use of the APIs and credits they already have, choose the models and providers that fit their needs, and self-host related services when required.
The project will continue to improve model compatibility, Agent tooling, local runtime stability, and the self-hosting experience while exploring support for more IDE, chat, and Agent workflows.
See the release roadmap for plans and progress.
1095916242, 1094411438, 1095918002, 1094419321Issues and pull requests are welcome. See the Contributing Guide for prerequisites, build commands, project structure, and contribution guidelines.
This project is open source under the MIT License.
Rust
72.6%
TypeScript
13.8%
Go
7.5%
SCSS
2.5%
JavaScript
2.0%
cursor-byok is a local implementation of Cursor's backend.


cursor-byok is an open-source local model gateway for Cursor. It runs a service on your machine that connects Cursor to the model APIs you configure, routes model requests through your own providers, and preserves Cursor Agent capabilities such as tool calling, Skills, and MCP.
You can connect OpenAI- and Anthropic-compatible services, customize endpoints, model IDs, API keys, and request parameters, and use model channels beyond the options built into the platform.
[!IMPORTANT] cursor-byok is free and open source, but the model APIs you connect may charge for usage. This is an independent project and is not affiliated with or endorsed by Cursor or its developers.
For complete installation steps, system configuration, and troubleshooting, see the User Guide.
Model configurations support both OpenAI and Anthropic API protocols. Each model channel can independently define its context window, maximum output tokens, reasoning effort, custom headers, and additional request parameters.

Cursor client
│
│ Agent requests and tool results
▼
cursor-byok local service
│
│ OpenAI- / Anthropic-compatible requests
▼
Your model API
cursor-byok handles protocol adaptation, model request forwarding, tool-call coordination, and conversation state on your machine. API keys and application settings are stored locally; requests are still sent to the model provider you configure.
Many Agent products bundle their tool capabilities with a fixed set of models, subscriptions, and billing options, leaving users limited to the channels offered by the platform.
cursor-byok is built to return model choice to the user. Developers can make full use of the APIs and credits they already have, choose the models and providers that fit their needs, and self-host related services when required.
The project will continue to improve model compatibility, Agent tooling, local runtime stability, and the self-hosting experience while exploring support for more IDE, chat, and Agent workflows.
See the release roadmap for plans and progress.
1095916242, 1094411438, 1095918002, 1094419321Issues and pull requests are welcome. See the Contributing Guide for prerequisites, build commands, project structure, and contribution guidelines.
This project is open source under the MIT License.
Rust
72.6%
TypeScript
13.8%
Go
7.5%
SCSS
2.5%
JavaScript
2.0%