cursor2api  by 7836246

Proxy service for Cursor API, enabling OpenAI/Anthropic clients

Created 3 months ago
1,753 stars

Top 24.0% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a proxy service that converts Cursor's AI chat interface, specifically Claude Code, to be compatible with the OpenAI/Anthropic Messages API. It addresses Cursor's AI limitations by restoring full IDE operation capabilities, enabling advanced tool usage and multi-modal features, thereby empowering developers to maximize Cursor's AI potential.

How It Works

cursor2api acts as an intermediary, translating Anthropic Messages API requests from Claude Code into Cursor's internal /api/chat format. Its core innovation is a "Cognitive Reframing" prompt injection strategy. Instead of fighting Cursor's AI's restricted "Documentation Assistant" persona, it frames requests as generating API documentation examples. This psychological manipulation bypasses built-in filters, restoring full tool execution permissions. The service also simulates Chrome TLS fingerprints and employs multi-layer defenses against AI refusals and identity probes, ensuring consistent Claude identity.

Quick Start & Requirements

  • Install: npm install
  • Configure: Edit config.yaml (e.g., cursor_model, fingerprint.user_agent, vision.enabled, vision.mode).
  • Run: npm run dev
  • Usage: export ANTHROPIC_BASE_URL=http://localhost:3010 with claude CLI.
    • Note: Primarily tested and effective with Claude Code; other clients are not fully validated.

Highlighted Details

  • Full Anthropic Messages API Compatibility: Supports streaming/non-streaming /v1/messages.
  • Multi-modal Vision: Integrates local CPU OCR for zero-config image text extraction or supports external vision APIs.
  • Unrestricted Tool Support: Bypasses Cursor's tool whitelist for all MCP and custom tools.
  • Robust Identity Protection: Multi-layer defenses (context cleaning, response interception, output sanitization) maintain Claude's identity and suppress refusals.
  • Chrome TLS Fingerprint Simulation: Mimics browser headers.

Maintenance & Community

Recent updates (March 6, 2026) focus on vision preprocessing, OpenAI API defense, and non-tool scenario reframing. No community links or contributor details are provided.

Licensing & Compatibility

  • License: MIT.
  • Compatibility Notes: For learning/research/debugging only. Commercial use, large-scale abuse, or illegal activities are prohibited. Users assume all responsibility for potential account bans or legal consequences.

Limitations & Caveats

Effectiveness primarily verified with Claude Code; other clients may not function as expected. Use carries a risk of account bans or restrictions. The project is unofficial and disclaims liability for user-induced issues.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
20
Issues (30d)
102
Star History
1,143 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.