This MCP server lets you access OpenAI's ChatGPT API directly from Claude Desktop, enabling conversations between Claude and ChatGPT, with features like web search integration and customizable parameters.
To install ChatGPT Server for Claude Desktop automatically:
npx -y @smithery/cli install @billster45/mcp-chatgpt-responses --client claude
Clone the repository:
git clone https://github.com/billster45/mcp-chatgpt-responses.git
cd mcp-chatgpt-responses
Set up a virtual environment and install dependencies:
uv venv
.venv\Scripts\activate
uv pip install -r requirements.txt
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.
The MCP server provides these tools:
ask_chatgpt(prompt, model, temperature, max_output_tokens, response_id) - Send a prompt to ChatGPT and get a response
ask_chatgpt_with_web_search(prompt, model, temperature, max_output_tokens, response_id) - Send a prompt to ChatGPT with web search enabled for up-to-date information
Ask ChatGPT a question:
Use the ask_chatgpt tool to answer: What is the best way to learn Python?
Have a conversation between Claude and ChatGPT:
Use the ask_chatgpt tool to have a two way conversation between you and ChatGPT about the topic that is most important to you.
For questions requiring up-to-date information:
Use the ask_chatgpt_with_web_search tool to answer: What are the latest developments in quantum computing?
Create a weather-based itinerary:
Use the ask_chatgpt_with_web_search tool to find the weather tomorrow in New York, then based on that weather and what it returns, keep using the tool to build up a great day out for someone who loves food and parks
This tool uses OpenAI's Responses API to automatically maintain conversation state on OpenAI's servers, which:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.