ChatGPT Responses MCP server

Bridges Claude Desktop with ChatGPT API, enabling direct access to standard ChatGPT interactions and web search-enabled queries with conversation continuity through response IDs.
Back to servers
Setup instructions
Provider
Bill
Release date
Mar 21, 2025
Language
Python
Stats
10 stars

This MCP server provides a bridge between Claude Desktop and OpenAI's ChatGPT API, enabling conversations between different AI models and access to the latest information through web search capabilities. It allows Claude to directly utilize ChatGPT's responses in seamless interactions.

Installation Options

Quick Installation via Smithery

The fastest way to install the ChatGPT Server for Claude Desktop is through Smithery:

npx -y @smithery/cli install @billster45/mcp-chatgpt-responses --client claude

Manual Installation

Prerequisites

Before installing manually, ensure you have:

Step-by-Step Installation

  1. Clone the repository:

    git clone https://github.com/billster45/mcp-chatgpt-responses.git
    cd mcp-chatgpt-responses
    
  2. Set up a virtual environment and install dependencies:

    uv venv
    
    .venv\Scripts\activate
    
    uv pip install -r requirements.txt
    

Configuration

To configure Claude Desktop to use this MCP server:

  1. Locate your Claude Desktop configuration file by following the MCP Quickstart Guide

  2. 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"
          }
        }
      }
    }
    
  3. Replace "your-api-key-here" with your actual OpenAI API key

  4. Restart Claude Desktop

Using the ChatGPT Server

The MCP server provides two main tools:

Basic ChatGPT Queries

To ask ChatGPT a simple question through Claude:

Use the ask_chatgpt tool to answer: What is the best way to learn Python?

Enabling Web Search

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?

Advanced Usage Examples

Create a conversation between Claude and ChatGPT

For a two-way conversation between both AI models:

Use the ask_chatgpt tool to have a two way conversation between you and ChatGPT about the topic that is most important to you.

Build a weather-based itinerary with web search

Use ChatGPT's web search capabilities in an agentic way:

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

Tool Parameters

Both tools accept the following parameters:

  • prompt: The text to send to ChatGPT
  • model: ChatGPT model to use (defaults to value in config)
  • temperature: Controls randomness (0.0-2.0, defaults to value in config)
  • max_output_tokens: Maximum response length (defaults to value in config)
  • response_id: Used to maintain conversation state across messages

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "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"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "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"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "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"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later