Codex MCP Server
Hands coding tasks, code reviews and web searches from an MCP client to the OpenAI Codex CLI
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
Opens the app, which asks before it adds the server.
claude mcp add claude-chatgpt-tool -- npx -y claude-chatgpt-mcp{
"mcpServers": {
"claude-chatgpt-tool": {
"command": "npx",
"args": [
"-y",
"claude-chatgpt-mcp"
]
}
}
}{
"mcpServers": {
"claude-chatgpt-tool": {
"command": "npx",
"args": [
"-y",
"claude-chatgpt-mcp"
]
}
}
}{
"servers": {
"claude-chatgpt-tool": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"claude-chatgpt-mcp"
]
}
}
}[mcp_servers.claude-chatgpt-tool]
command = "npx"
args = ["-y", "claude-chatgpt-mcp"]gemini mcp add --scope user claude-chatgpt-tool npx -- -y claude-chatgpt-mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
git clone https://github.com/syedazharmbnr1/claude-chatgpt-mcp.git
cd claude-chatgpt-mcp
bun installclaude mcp add claude-chatgpt-tool -- bun run '<ABSOLUTE_PATH_TO_CLONE>/index.ts'{
"mcpServers": {
"claude-chatgpt-tool": {
"command": "bun",
"args": [
"run",
"<ABSOLUTE_PATH_TO_CLONE>/index.ts"
]
}
}
}{
"mcpServers": {
"claude-chatgpt-tool": {
"command": "bun",
"args": [
"run",
"<ABSOLUTE_PATH_TO_CLONE>/index.ts"
]
}
}
}{
"servers": {
"claude-chatgpt-tool": {
"type": "stdio",
"command": "bun",
"args": [
"run",
"<ABSOLUTE_PATH_TO_CLONE>/index.ts"
]
}
}
}[mcp_servers.claude-chatgpt-tool]
command = "bun"
args = ["run", "<ABSOLUTE_PATH_TO_CLONE>/index.ts"]gemini mcp add --scope user claude-chatgpt-tool bun -- run '<ABSOLUTE_PATH_TO_CLONE>/index.ts'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.
| Runtime | Node.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.
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.
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.
chatgpt