Claude ChatGPT MCP Tool

Sends prompts to the ChatGPT desktop app on a Mac and reads back its replies and conversation list

By Azhar (individual) TypeScript Local · stdio AI and ML

26 popularity score ★ 791 ↓ 164/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add claude-chatgpt-tool -- npx -y claude-chatgpt-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "claude-chatgpt-tool": {
      "command": "npx",
      "args": [
        "-y",
        "claude-chatgpt-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "claude-chatgpt-tool": {
      "command": "npx",
      "args": [
        "-y",
        "claude-chatgpt-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "claude-chatgpt-tool": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "claude-chatgpt-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.claude-chatgpt-tool]
command = "npx"
args = ["-y", "claude-chatgpt-mcp"]
Gemini CLITerminal
gemini mcp add --scope user claude-chatgpt-tool npx -- -y claude-chatgpt-mcp
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

FirstTerminal
git clone https://github.com/syedazharmbnr1/claude-chatgpt-mcp.git
cd claude-chatgpt-mcp
bun install
Claude CodeTerminal
claude mcp add claude-chatgpt-tool -- bun run '<ABSOLUTE_PATH_TO_CLONE>/index.ts'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "claude-chatgpt-tool": {
      "command": "bun",
      "args": [
        "run",
        "<ABSOLUTE_PATH_TO_CLONE>/index.ts"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "claude-chatgpt-tool": {
      "command": "bun",
      "args": [
        "run",
        "<ABSOLUTE_PATH_TO_CLONE>/index.ts"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "claude-chatgpt-tool": {
      "type": "stdio",
      "command": "bun",
      "args": [
        "run",
        "<ABSOLUTE_PATH_TO_CLONE>/index.ts"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.claude-chatgpt-tool]
command = "bun"
args = ["run", "<ABSOLUTE_PATH_TO_CLONE>/index.ts"]
Gemini CLITerminal
gemini mcp add --scope user claude-chatgpt-tool bun -- run '<ABSOLUTE_PATH_TO_CLONE>/index.ts'

What it does

Claude ChatGPT MCP Tool is a local stdio server that bridges an MCP client such as Claude Desktop to OpenAI's ChatGPT desktop app on macOS. It has no API key and makes no calls to OpenAI's API: it drives the ChatGPT app's window through AppleScript and macOS accessibility, so whatever account and model the app is signed into is the one that answers.

It exposes a single tool, `chatgpt`, with two operations. `ask` brings ChatGPT to the front, clears the input box, pastes the prompt through the clipboard, presses return and then polls the window until the reply text stops changing, giving up after 120 seconds (a cap set in index.ts, not mentioned in the README). An optional `conversation_id` tries to click a sidebar entry of that name before typing. `get_conversations` reads the titles shown in the app's sidebar.

The code also shows what the README leaves out: before pasting, it saves the current clipboard contents and puts them back afterwards, and if the ChatGPT app is not running it tries to launch it and waits two seconds. Replies are scraped from on-screen text, so the server trims interface labels and logs a warning when a reply looks cut off.

What it needs

RuntimeNode.js 18+

macOS (the README lists Apple silicon M1/M2/M3) with the ChatGPT desktop app installed and signed in. Node.js 18 or later for the npx way (the package's engines field); Bun for running index.ts from a clone. The process that launches it (Claude Desktop, Terminal or iTerm) needs Accessibility permission under Privacy & Security, and macOS may prompt for automation access on first use.

Limits

macOS and the ChatGPT desktop app only; no Windows, Linux or API mode. It clicks and types into the app's interface, so ChatGPT layout changes can break it, and replies are scraped from screen text, which may carry stray interface text or be cut off. `ask` waits up to 120 seconds. A `conversation_id` matching no sidebar button is silently ignored and the prompt goes to the open chat. While running it takes focus, select-all-deletes the input box and briefly overwrites the clipboard. Only double quotes in prompts are escaped before they enter the AppleScript. The README calls the repository a fork of an earlier implementation.

Who it suits

Suits a Mac user with a ChatGPT subscription who wants Claude to get a second opinion from ChatGPT, or look up past ChatGPT chats, without an OpenAI API key or per-token billing. It is a poor fit for unattended or server use, for anyone off macOS, or where reliability matters: it needs the app open on screen and depends on the app's interface staying the same. For programmatic access to OpenAI models, a server that calls the OpenAI API with a key is the sturdier choice.

Tools 1

chatgpt
Runs one of two operations on the ChatGPT app: `ask` sends a prompt (optionally into a named conversation) and returns the reply; `get_conversations` lists sidebar chat titles

Similar servers