chatgpt-mcp
Provides integration with ChatGPT (OpenAI) to enable handing off tasks from Cursor to a ChatGPT Web worker, with tools to create tasks, retrieve task context, submit results, and fetch completed results.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chatgpt-mcpAsk ChatGPT to review this code for potential bugs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chatgpt-mcp
Delegate selected Cursor tasks to a dedicated ChatGPT Web worker and receive the result through MCP — without copying prompts or scraping the ChatGPT DOM.
Developer preview
0.6.0— not production.
macOS supported · Ubuntu desktop experimental · Windows not supported.
Clients: Cursor E2E · Claude Code / other MCP hosts — experimental (manual poll bytaskId).
Unofficial — not affiliated with OpenAI or Cursor.
Demo (recording pending): end-to-end GIF checklist → docs/assets/README.md. Target path: docs/assets/handoff-demo.gif.
When to use it
Architecture or security review
Current web research with live sources
Independent second opinion on a design or patch
Hard debugging after the first approach stalls
Not for: unattended production automation, sensitive data over public no-auth tunnels, or trivial coding you can finish in Cursor alone.
Related MCP server: chrome-mcp-server
Quick Start
Prerequisites
Node.js 22.14+ (built-in
node:sqlite; required for npm OIDC release toolchain)Google Chrome / Chromium with CDP on a dedicated profile (Chrome 136+ will not debug Default)
ChatGPT Developer Mode + MCP write (plan/workspace permitting)
Linux experimental: graphical session (
DISPLAY/WAYLAND_DISPLAY); not WSL/headless
1. Install
./scripts/install.sh # npm ci/install + build + setup + optional npm linkOr step-by-step from a source checkout:
npm install
npm run build
npm run setup # repo .env + ~/.chatgpt-mcp + workers.json + MCP JSONFor an installed package, gptmcp setup bootstraps only user-scoped state and prints MCP JSON; it does not write a .env into your current directory.
Copy the printed JSON into ~/.cursor/mcp.json, then reload Cursor MCP.
npm link is best-effort (install still succeeds if global prefix is not writable). Fallback from a source checkout: npm run gptmcp -- … or node dist/gptmcp.js … (avoid npx gptmcp, which may resolve a published registry version).
Package install is also supported after publish:
npm install -g chatgpt-mcp
gptmcp setup
gptmcp startThe published package includes the runtime lifecycle scripts required by gptmcp start; developer/test scripts remain source-checkout only.
2. Connect ChatGPT + assign worker
Prefer OpenAI Secure MCP Tunnel. Full steps: docs/connect-chatgpt.md.
Worker chats are managed via the ops dashboard / gptmcp worker add (registry: $CHATGPT_MCP_HOME/data/workers.json). You do not need to hand-edit CHATGPT_WORKER_URL for the default A1-S path.
3. Start the stack
gptmcp start # CDP + status-api + remote-mcp + broker
gptmcp open # ops dashboard → Assign URL / New chat
gptmcp status # exit 0 = healthyDaily workflow: gptmcp start → gptmcp open. When something breaks: gptmcp doctor → gptmcp recover.
make / npm scripts remain for developers and CI — see gptmcp help. Shell completion is generated from CLI metadata: gptmcp completion fish or gptmcp completion bash.
4. First handoff
In Cursor (with MCP loaded and worker READY):
handoff sang ChatGPT: Summarize the architecture of this repo in 5 bullets.Or say /chatgpt-mcp / chạy task ChatGPT: …. The agent calls handoff_create_task and ends the turn (no status-poll loop). User-level Cursor hooks (~/.cursor/hooks/chatgpt-mcp-*.sh) plus this repo’s stop hook long-poll and resume for handoff_get_result.
Expected: gptmcp status shows worker READY; after the handoff, handoff_get_result returns ChatGPT’s answer (not a scraped DOM dump).
Other workspaces: keep the user skill/rule (~/.cursor/skills/chatgpt-mcp, ~/.cursor/rules/chatgpt-mcp.mdc) and the user hooks above so every Cursor chat gets inject + stop/resume without polling.
How it works
flowchart LR
C["Cursor agent"] -->|create task| Q["Local SQLite queue"]
Q -->|task ID only| B["CDP worker"]
B -->|types task ID| W["ChatGPT worker"]
W -->|MCP get / submit| M["Local MCP server"]
M --> Q
Q -->|result| CCDP is used only to enter the opaque task ID; task content and the final result travel through MCP.
Client support: Cursor is the supported end-to-end client (stop hook + session injection). The stdio MCP tools are host-neutral (taskId authoritative; optional clientSessionId). Claude Code and other MCP hosts can connect experimentally and must poll/fetch by taskId until a native adapter exists — do not claim “works with all coding agents.”
Deep dive: docs/architecture.md · docs/spec.md
Support and limitations
Surface | Status |
macOS + Google Chrome | Supported |
Ubuntu desktop + Google Chrome stable | Experimental (not Snap/WSL/headless) |
Windows / WSL / headless | Not supported |
One user, one dedicated Chrome profile, one worker chat, one concurrent handoff
No login / CAPTCHA / approval automation; ChatGPT UI changes can break selectors
Do not tunnel
:8787(status/worker). Only expose/mcpon:8790MCP SDK pin:
@modelcontextprotocol/sdk@1.30.0— compatibility pin, not a “latest-spec SOTA” claim
Legacy Chrome profile
If you already use ~/chrome-chatgpt-debug:
export CHATGPT_CDP_USER_DATA_DIR=~/chrome-chatgpt-debugThe launcher also auto-prefers that directory when it exists and $CHATGPT_MCP_HOME/chrome-profile does not. Profiles are not copied automatically — close Chrome before switching.
Security and privacy
Tasks and results live in local SQLite under
$CHATGPT_MCP_HOME(default~/.chatgpt-mcp)Dedicated Chrome profile — never your daily Default profile
Prefer Secure MCP Tunnel for private code; public no-auth tunnels are evaluation-only
Worker types only
TASK_ID=…; it does not scrape ChatGPT answers from the DOMYou must manually approve MCP write tools in the worker conversation
Do not hand off secrets, credentials, or regulated data unless you accept the browser + tunnel trust boundary
See SECURITY.md.
Configuration
See .env.example. Critical variables:
Variable | Default / notes |
|
|
|
|
|
|
| Legacy single-worker fallback; not required for default A1-S onboarding |
|
|
|
|
|
|
|
|
|
|
Troubleshooting
Symptom | Fix |
CDP not ready / Chrome ignored debug port | Use |
| Log into ChatGPT in the CDP window |
Worker not | One |
ChatGPT cannot call tools | Secure Tunnel / connector setup; approve write tools — docs/connect-chatgpt.md |
Write / approval blocked | Enable Developer Mode + MCP write for your plan/workspace |
Task | Often ChatGPT still generating or late submit — docs/timeouts.md, not always a missing Allow click |
Diagnostic: gptmcp doctor
Reliability and benchmarks
Maintainer transport canary: 10/10 consecutive PASS (method: npm run e2e:reliability). Full ≥18/20 gate optional.
A/B quality suite is frozen at docs/benchmark/ (bench-v1, T1–T5). Scores are pending — README will not claim uplift until results.md is filled. Onboarding timing protocol: docs/onboarding-timing.md.
Documentation
Roadmap — versions & exit criteria (SSOT)
Ops dashboard —
gptmcp open/http://127.0.0.1:8787/dashboard/Chat rotation — max-per-chat +
gptmcp worker rotateConnect ChatGPT — Secure Tunnel, Developer Mode
Timeouts and late submit —
TIMED_OUTvs MCP approve
MCP tools (reference)
Tool | Caller | Purpose |
| Cursor | Create a handoff task |
| Cursor | Fetch completed result |
| Both | Poll task status |
| ChatGPT | Fetch task context |
| ChatGPT | Submit reasoning result |
Command | Role |
| Public ops UX (preferred) |
| Worker registry + rotation |
| User bootstrap / source-checkout bootstrap + Cursor MCP JSON |
| Cursor stdio MCP |
| ChatGPT HTTP MCP |
| Transport canary (CI/dev) |
Contributing
See CONTRIBUTING.md. Issues: github.com/trankhanh040147/chatgpt-mcp/issues.
CI
Pull requests run Quality (Node 24 — unit check + tarball smoke), Compat (Node 22.14), and Dependency Review. Live ChatGPT E2E stays on a dedicated self-hosted Mac.
Release: Actions → Release workflow → pick patch/minor/major → Live E2E gate → auto tag → npm approval → publish. No manual tag push.
npm run check:unit # typecheck + unit tests
npm run verify # check:unit + build
npm pack && npm run package:smokeLicense
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Shared memory for AI coding agents. Save once, reuse from Cursor, Claude Code, Codex.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThe simplest way to bridge and collaborate across AI Agent sessions like Claude Code, Codex, Gemini, or Cursor. It allows your agents to combine their strengths to solve your most difficult tasks without leaving their current context.3866MIT
- AlicenseNot gradedqualityDmaintenanceBridges Chrome DevTools with Cursor AI to enable debugging and monitoring, including console logs, network requests, screenshots, and element inspection.324MIT
- AlicenseBqualityCmaintenanceBridges Claude Code CLI with Cursor IDE to use your existing Claude subscription without separate API costs.13MIT
- FlicenseNot gradedqualityBmaintenanceProvides web search and local document RAG using Ollama, enabling privacy-preserving AI assistance in Cursor IDE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/trankhanh040147/chatgpt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server