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
Provider
Bill
Release date
Mar 21, 2025
Language
Python
Stats
5 stars

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.

Setup Instructions

Installing via Smithery

To install ChatGPT Server for Claude Desktop automatically:

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

Manual 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
    

Configuring Claude Desktop

  1. 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"
          }
        }
      }
    }
    
  2. Restart Claude Desktop.

Available Tools

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

Usage Examples

Basic ChatGPT Usage

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.

Using 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?

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

How It Works

This tool uses OpenAI's Responses API to automatically maintain conversation state on OpenAI's servers, which:

  • Simplifies code by letting OpenAI handle conversation history
  • Provides reliable context tracking
  • Maintains context across messages
  • Allows access to the latest information from the web with the search tool

How to add this MCP server to 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 > 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"
            ]
        }
    }
}

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

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