cursor-byok is a local model gateway that lets you connect Cursor to custom model APIs you configure and manage.
The tool solves the problem of being locked into Cursor's built-in model options by running a local service that intercepts Cursor's requests and routes them through your own API endpoints. It supports OpenAI- and Anthropic-compatible services, allowing you to specify custom endpoints, model IDs, API keys, and request parameters. The gateway preserves Cursor's agent capabilities including tool calling, Skills, and MCP support, handling protocol adaptation and conversation state management on your machine while API keys remain stored locally.
You should adopt this tool if you want to use alternative model providers with Cursor beyond what the platform natively supports, or if you need fine-grained control over model configuration and request parameters. It suits projects where you have access to specific model APIs through your own accounts or organizational arrangements. The tool is cross-platform, running on macOS, Windows, and Linux. The README emphasizes that cursor-byok is independent and not affiliated with Cursor, and that while the tool itself is free and open source, the model APIs you connect may charge for usage.
The project shows active development with regular updates to support new features and maintain compatibility. The maintainers provide comprehensive documentation including a user guide and Chinese-language documentation. The tool includes a dashboard for model management, connection benchmarking to measure performance metrics like time to first token and generation speed, and session tracking for token usage and cache hit rates. The codebase is written in Rust and distributed as prebuilt binaries for multiple platforms, reducing setup friction for end users.