openai-mcp
openai-mcp
在 Claude Code、Codex 以及任何 MCP 客户端中使用您的 ChatGPT Plus 或 Pro 订阅。
功能简介
openai-mcp 提供了 15 个 MCP 工具,可将请求直接转发至 ChatGPT 的后端 API。 无需代理进程,无需额外账户。使用您自己的令牌,消耗您自己的配额。
适用于 Claude Code、Codex CLI 以及任何支持通过 stdio 使用 MCP 协议的客户端。
Related MCP server: claude-max-mcp
安装
pip install openai-mcp或者使用 pipx 进行隔离安装:
pipx install openai-mcp设置
openai-mcp setup设置向导将执行以下操作:
查找
~/.codex/auth.json中现有的 Codex 认证令牌如果未找到,将提示您粘贴 ChatGPT 会话令牌
将凭据保存至
~/.openai-mcp/token.json
在 Claude Code 中配置
将以下内容添加到 ~/.claude.json(在 mcpServers 下):
{
"mcpServers": {
"openai": {
"type": "stdio",
"command": "openai-mcp",
"args": ["run", "--stdio"]
}
}
}保存后重启 Claude Code。工具将出现在 openai 命名空间下。
工具
工具 | 功能 |
| 与 GPT-5.x、Pro 模型、o3、o3-pro 聊天 |
| 网络增强搜索回答(约 30 秒) |
| 通过 gpt-5-5-pro 进行长篇深度研究(5–30 分钟,消耗月度配额) |
| ChatGPT 计划及已启用的功能 |
| 您账户可用的所有模型 |
| 列出 ChatGPT 记忆(已屏蔽个人隐私信息) |
| 按关键词搜索 ChatGPT 记忆 |
| 获取您的 ChatGPT 自定义指令 |
| 列出 Codex 环境 |
| 列出最近的 Codex 任务 |
| 列出您的自定义 GPTs |
| 最近的 ChatGPT 对话 |
| 已计划的 ChatGPT 任务 |
| 已连接的应用程序和连接器 |
架构
原生 Python 实现——无代理。服务器使用 curl_cffi 进行 TLS 模拟,直接调用 /backend-api/conversation (SSE)。内置的 POW 和 Turnstile 求解器用于处理 OpenAI Sentinel 挑战。归属信息请参阅 NOTICES。
~/.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限制
深度研究配额: Pro 用户每月 248 次请求;Plus 用户配额较低。
image_gen: 存根已存在,但尚未连接到可用的端点。
memory_add: 只读——写入端点返回 405;工具未注册。
需要有效的 ChatGPT Plus 或 Pro 订阅。
开发
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest许可证
致谢
lanqian528/chat2api — POW 和 Turnstile 求解器代码 (MIT)
basketikun/chatgpt2api — ChatGPT 后端 API 模式调研
7836246/cursor2api — Cursor API 模式调研
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnterprise-grade MCP server integrating Claude AI capabilities, enabling AI-powered conversations, file operations, and system tools via the Model Context Protocol.1Apache 2.0
- AlicenseAqualityCmaintenanceAn MCP server that enables any AI agent to call Claude using your existing Max/Pro subscription via OAuth, avoiding additional API billing.11MIT
- FlicenseBqualityDmaintenanceMCP server that proxies GPT API calls for Claude Code, supporting multiple GPT models with both standard and streaming responses.2
- AlicenseAqualityDmaintenanceMCP server that integrates OpenClaw AI assistant with Claude Code, enabling chat, task management, messaging, memory, alerts, agent spawning, and web search through configurable tools.12156MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/robotlearning123/gpt2agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server