sub-bridge
v1.2.5
Published
MCP bridge to use ChatGPT Pro, Claude Max, etc. in Cursor via an OpenAI-compatible proxy
Maintainers
Readme
Sub Bridge
Use ChatGPT Pro/Max, Claude Max, etc. directly in Cursor via an MCP-managed OpenAI-compatible proxy.
Why Sub Bridge
- Subscriptions win: Claude Code and ChatGPT Max typically deliver 3x to 5x more tokens per dollar than usage pricing.
- Use existing subscriptions: keep what you already pay for and route usage into Cursor.
- Keep Cursor UX: chat, agents, and tools continue to work; autocomplete still needs a Cursor plan.
Quick Start
- Install the MCP server:
- Ask chat to connect ChatGPT Pro or Claude Max and login with your credentials locally and generate API Key for Cursor locally.
- Finish setup in Cursor (two steps side-by-side)
How it works
graph LR
A[Cursor] --> B[MCP server]
A --> C[Local OpenAI-compatible proxy]
B --> F[OpenAI OAuth]
B --> G[Claude OAuth]
C --> D[Claude APIs]
C --> E[OpenAI APIs]
subgraph SB[Sub-bridge]
B
C
endSub Bridge is an MCP server that includes OpenAI API proxy. It lets you login with Claude or ChatGPT and generate API keys for the proxy, which then set in Cursor Settings as an external provider.
The proxy uses Codex and Claude Code specific instructions that enables you to use Cursor with your local credentials.
API key format and parsing
Sub Bridge reads the Authorization: Bearer ... header and supports multiple tokens so you can route Cursor models to Claude while still passing an OpenAI or ChatGPT token.
Rules:
- Tokens are space-separated. Comma separation is supported as a fallback.
- A routed key contains mappings before the last
:and the API key after it. - A mapping is
cursor_model=claude_model, and multiple mappings are comma-separated. - A plain token (no
=) is treated as the default key. - If a token contains
#account_id, the suffix is used as the ChatGPT account id. - Model aliases
opus-4.5andsonnet-4.5expand to their full Claude model IDs. - If the default key is a JWT or has an account id, requests go to the ChatGPT backend; otherwise they go to the OpenAI API.
Examples:
Authorization: Bearer o3=opus-4.5,o3-mini=sonnet-4.5:sk-ant-xxx sk-openai-xxxRoutes o3 and o3-mini to Claude using sk-ant-xxx, while sk-openai-xxx becomes the default token.
Authorization: Bearer o3=opus-4.5:sk-ant-xxx,sk-openai-xxxComma fallback: splits into a routed Claude token plus a default token.
Authorization: Bearer sk-chatgpt-xxx#account_idSingle default token routed to the ChatGPT backend.
Known Limitations
- Image/file uploads in Cursor chat may not work due to a Cursor bug that validates API keys against OpenAI's servers even with a custom base URL. See #15 for details and workarounds.

