openai-mcp
MCP server that bridges ChatGPT Plus/Pro to Claude Code, enabling chat, deep research, and image generation via your own account.
README
openai-mcp
Use your ChatGPT Plus or Pro subscription inside Claude Code, Codex, and any MCP client.
What it does
openai-mcp exposes 15 MCP tools that forward requests directly to ChatGPT's backend API. No proxy process. No separate account. Your token, your quota.
Works with Claude Code, Codex CLI, and any client that speaks the MCP protocol over stdio.
Install
pip install openai-mcp
Or with pipx for an isolated install:
pipx install openai-mcp
Setup
openai-mcp setup
The wizard will:
- Look for an existing Codex auth token at
~/.codex/auth.json - If not found, prompt you to paste a ChatGPT session token
- Save credentials to
~/.openai-mcp/token.json
Configure in Claude Code
Add the following to ~/.claude.json (under mcpServers):
{
"mcpServers": {
"openai": {
"type": "stdio",
"command": "openai-mcp",
"args": ["run", "--stdio"]
}
}
}
Restart Claude Code after saving. Tools appear under the openai namespace.
Tools
| Tool | What it does |
|---|---|
chat |
Chat with GPT-5.x, Pro models, o3, o3-pro |
deep_research |
Web-augmented search answer (~30 s) |
deep_research_heavy |
Long-form Deep Research via gpt-5-5-pro (5–30 min, uses monthly quota) |
account_status |
ChatGPT plan and enabled features |
list_models |
All models available to your account |
memory_list |
List ChatGPT memories (PII redacted) |
memory_search |
Search ChatGPT memories by keyword |
custom_instructions_get |
Retrieve your ChatGPT custom instructions |
list_codex_envs |
List Codex environments |
list_codex_tasks |
List recent Codex tasks |
list_custom_gpts |
List your custom GPTs |
list_conversations |
Recent ChatGPT conversations |
list_tasks |
Scheduled ChatGPT tasks |
list_apps |
Connected apps and connectors |
Architecture
Native Python implementation — no proxy. The server calls
/backend-api/conversation (SSE) directly using curl_cffi for TLS
impersonation. Vendored POW and Turnstile solvers handle the OpenAI Sentinel
challenge. See NOTICES for attribution.
~/.codex/auth.json (or ~/.openai-mcp/token.json)
|
openai-mcp (stdio MCP server)
|
curl_cffi → chatgpt.com /backend-api/conversation (SSE)
|
14 read tools + 1 heavy DR tool
Limitations
- Deep Research quota: 248 requests/month on Pro; lower on Plus.
- image_gen: stub is present but not yet wired to a working endpoint.
- memory_add: read-only — the write endpoint returns 405; tool is not registered.
- Requires an active ChatGPT Plus or Pro subscription.
Development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
License
MIT. See NOTICES for third-party attributions.
Acknowledgments
- lanqian528/chat2api — POW and Turnstile solver code (MIT)
- basketikun/chatgpt2api — survey of ChatGPT backend API patterns
- 7836246/cursor2api — survey of Cursor API patterns
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.