
MCP 服务器,用于访问 OpenAI 的 ChatGPT API 及响应 API 进行对话管理
概览
这个MCP服务器允许你直接从Claude Desktop访问OpenAI的ChatGPT API。 📝 :我打造了一个能与其他AI对话的AI:揭开MCP炒作的神秘面纱 - 调用带有可自定义参数的 ChatGPT API - Aks Claude 和 ChatGPT 进行长时间对话!- 配置模型版本、温度及其他参数 - 使用网页搜索获取互联网最新信息 - 使用 OpenAI 的 Responses API 进行自动对话状态管理 - 使用您自己的 OpenAI API 密钥 通过Smithery自动安装Claude Desktop的ChatGPT服务器: - Python 3.10 或更高版本 - Claude 桌面应用程序 - OpenAI API 密钥 - 用于 Python 包管理的 UV 2. 搭建虚拟环境并使用 uv 安装依赖: 1. 按照以下说明配置Claude Desktop以使用该MCP服务器:MCP快速入门指南 2. 将以下配置添加到您的Claude Desktop配置文件中(根据需要调整路径):
概述(AI 翻译)
这个MCP服务器允许你直接从Claude Desktop访问OpenAI的ChatGPT API。
📝 阅读我为何创建这个项目:我打造了一个能与其他AI对话的AI:揭开MCP炒作的神秘面纱
特色
- 调用带有可自定义参数的 ChatGPT API
- Aks Claude 和 ChatGPT 在长时间讨论中互相交流!
- 配置模型版本、温度及其他参数
- 利用网络搜索获取互联网的最新信息
- 使用 OpenAI 的 Responses API 进行自动对话状态管理
- 使用您自己的OpenAI API密钥
设置说明
通过Smithery安装
通过Smithery自动安装Claude Desktop的ChatGPT服务器:
先决条件
- Python 3.10 或更高版本
- Claude桌面应用程序
- OpenAI API 密钥
- 用于 Python 包管理的 uv
安装
-
克隆此仓库:
-
搭建虚拟环境并使用 uv 安装依赖:
使用 Claude Desktop
-
按照以下说明配置 Claude Desktop 以使用该 MCP 服务器: MCP快速入门指南
-
将以下配置添加到您的Claude Desktop配置文件中(根据需要调整路径):
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP ChatGPT Server
This MCP server allows you to access OpenAI’s ChatGPT API directly from Claude Desktop.
📝 Read about why I built this project: I Built an AI That Talks to Other AIs: Demystifying the MCP Hype
Features
- Call the ChatGPT API with customisable parameters
- Aks Claude and ChatGPT to talk to each other in a long running discussion!
- Configure model versions, temperature, and other parameters
- Use web search to get up-to-date information from the internet
- Uses OpenAI’s Responses API for automatic conversation state management
- Use your own OpenAI API key
Setup Instructions
Installing via Smithery
To install ChatGPT Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @billster45/mcp-chatgpt-responses --client claude
Prerequisites
- Python 3.10 or higher
- Claude Desktop application
- OpenAI API key
- uv for Python package management
Installation
-
Clone this repository:
git clone https://github.com/billster45/mcp-chatgpt-responses.git cd mcp-chatgpt-responses -
Set up a virtual environment and install dependencies using uv:
uv venv.venv\\Scripts\\activateuv pip install -r requirements.txt
Using with Claude Desktop
-
Configure Claude Desktop to use this MCP server by following the instructions at: MCP Quickstart Guide
-
Add the following configuration to your Claude Desktop config file (adjust paths as needed):
{ "mcpServers": { "chatgpt": { "command": "uv", "args": [ "--directory", "\\path\\to\\mcp-chatgpt-responses", "run", "chatgpt_server.py" ], "env": { "OPENAI_API_KEY": "your-api-key-here", "DEFAULT_MODEL": "gpt-4o", "DEFAULT_TEMPERATURE": "0.7", "MAX_TOKENS": "1000" } } } } -
Restart Claude Desktop.
-
You can now use the ChatGPT API through Claude by asking questions that mention ChatGPT or that Claude might not be able to answer.
Available Tools
The MCP server provides the following tools:
安装
npx -y @smithery/cli install @billster45/mcp-chatgpt-responses --client claude配置
{
"mcpServers": {
"chatgpt": {
"command": "uv",
"args": [
"--directory",
"\\path\\to\\mcp-chatgpt-responses",
"run",
"chatgpt_server.py"
],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"DEFAULT_MODEL": "gpt-4o",
"DEFAULT_TEMPERATURE": "0.7",
"MAX_TOKENS": "1000"
}
}
}
}