ChatGPT Web MCP
Sends prompts into a conversation of the user's own chatgpt.com account (new chat or an existing conversation by ID/URL), with optional image and document attachments, and returns the full answer, the chat URL, the conversation ID, the model that answered and timings, plus any images or files ChatGPT generated. Additional tools list the available model slugs, read the last messages of a chat (including chats started in the browser), download a chat's generated images and files to disk, and verify that a conversation is reachable without sending anything.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ChatGPT Web MCP
Ask ChatGPT from your coding agent. The agent sends a prompt, with screenshots and files if needed, into a conversation of your own chatgpt.com account and gets back the answer and the images ChatGPT made: no browser window, no API key, no copy and paste.
Claude Code · Codex · any MCP client with stdio · Node.js 22+ · zero dependencies
Install with your agent · Manual setup · Tools · Sign-in · Good to know · Troubleshooting
you › ask ChatGPT for three layout options for the settings screen, then compare them with ours
agent › chatgpt_send(text: "…brief…")
→ answer, https://chatgpt.com/c/…, conversation_id
agent › chatgpt_send(conversation: "<conversation_id>", text: "make option 2 denser",
files: ["/abs/path/current-screen.png"], download_dir: "/abs/path/references")
→ answer + the generated mockup saved as /abs/path/references/Settings mockup-1a2b3c.pngThe chat is a normal ChatGPT conversation: open the returned link in your browser and continue it there, or hand
the agent a https://chatgpt.com/c/… link of a chat you started and let it read or continue that one.
Install with your agent
Paste this into Claude Code, Codex or another coding agent:
Install ChatGPT Web MCP from https://github.com/nekh4ett/chatgpt-web-mcp — read its
AGENTS.md, follow the steps for the client we are using, and show me what the readiness check printed.
The agent checks Node.js and your ChatGPT sign-in, registers the server and verifies it. The steps it follows are in
skills/chatgpt-web-mcp/SKILL.md, which also works as an
Agent Skill in clients that support skills.
Related MCP server: AgentBridge
Manual setup
First check that your sign-in works. Nothing is installed and nothing is sent to a chat:
npx -y github:nekh4ett/chatgpt-web-mcp --checkReady · N models · … means you can register the server. Not ready · … says what is missing: see Sign-in.
claude mcp add --scope user chatgpt-web -- npx -y github:nekh4ett/chatgpt-web-mcp
claude mcp get chatgpt-webcodex mcp add chatgpt-web -- npx -y github:nekh4ett/chatgpt-web-mcp
codex mcp get chatgpt-webCodex stops an MCP tool call after 60 s by default. For answers that take longer, add a limit to the entry it
created in ~/.codex/config.toml:
[mcp_servers.chatgpt-web]
tool_timeout_sec = 1800Add a stdio server to the client's MCP configuration:
{
"mcpServers": {
"chatgpt-web": {
"command": "npx",
"args": ["-y", "github:nekh4ett/chatgpt-web-mcp"]
}
}
}git clone https://github.com/nekh4ett/chatgpt-web-mcp.git
node chatgpt-web-mcp/src/chatgpt-mcp.cjs --check
claude mcp add --scope user chatgpt-web -- node "$PWD/chatgpt-web-mcp/src/chatgpt-mcp.cjs"There is nothing to build and no npm install: the server is two files that use only Node.js built-ins.
Start a new session after registering: MCP servers load when a session starts.
Tools
Tool | Arguments | What you get |
|
| The full answer, the chat URL, |
|
| The last messages of a chat with roles and ids, and the ids of attached or generated images and files. Works for chats you started in the browser too. |
|
| Saves images and files of a chat to disk and returns the paths. Without |
| — | The model slugs your account can use. |
|
| Confirms the chat is reachable and shows its last message. Sends nothing. |
Sign-in
The server uses your own ChatGPT access token and looks for it in this order:
The environment variable
CHATGPT_ACCESS_TOKEN.The file
~/.codex/auth.json(or$CODEX_HOME/auth.json), which Codex CLI writes when you sign in with a ChatGPT account:npm install -g @openai/codex codex login # choose "Sign in with ChatGPT"
Codex keeps that token fresh while you use it. If the check says the token expired, run codex login again.
A Codex login with an API key has no ChatGPT token and does not work here.
The token stays on your machine. The server reads it for each request and sends it to chatgpt.com only. It writes
no files, collects no telemetry and has no dependencies you would have to trust.
Good to know
It is your account. Every send appears in your ChatGPT history, follows your account's data settings and counts against your plan's limits.
Images and files go both ways. Attach local images (png, jpg, gif, webp: the model sees them) and documents (pdf, md, txt, csv, docx and others) with
files. Images ChatGPT generates and files attached in a chat are saved to disk withdownload_dirorchatgpt_download. Not covered yet: files that ChatGPT writes in its code sandbox (sandbox:/…links) and tool calling.Unofficial. The server talks to the same backend as the ChatGPT web app and follows its handshake. When ChatGPT changes that handshake, sends fail with 403 until this repository is updated. There is no guarantee it keeps working, and automated use may be restricted by OpenAI's terms for your account: decide for yourself whether that is acceptable for your use.
Long answers.
chatgpt_sendwaits up to 300 s by default; passtimeout_secondsup to 1800 for slow models. After a timeout, read the chat before sending again: the message may have landed.
This is an independent project. It is not affiliated with or endorsed by OpenAI. ChatGPT is a product of OpenAI.
Troubleshooting
Symptom | What to do |
| Run |
| Codex is signed in with an API key. Run |
| The token expired or was revoked. Run |
| ChatGPT changed its handshake or blocked the request. Update to the latest version; if it still fails, open an issue. |
The | Check the client's MCP list ( |
| Check that |
Remove it with claude mcp remove --scope user chatgpt-web or codex mcp remove chatgpt-web.
Contributing
Issues and pull requests are welcome. For a bug, include your operating system, Node.js version, MCP client and
the error text. Never post a token, an auth.json or a private conversation link.
Changes keep the server dependency-free. Before opening a pull request, run node src/chatgpt-mcp.cjs --check and
one real chatgpt_send into a fresh chat. Rules for agents working on this repository are in AGENTS.md.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
- AlicenseBqualityFmaintenanceMCP server that drives chatgpt.com via web UI automation using a session token, enabling long-running tasks, deep research, and image generation.9133 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables local coding agents to send prompts to a user-authorized ChatGPT webpage through a browser extension and retrieve the final answer via MCP.1Apache 2.0
- AlicenseAqualityBmaintenanceEnables MCP clients to drive ChatGPT's web interface through a built-in persistent browser, requiring only a single manual login. Prompts are sent through temporary incognito chats and the captured answer text is returned as tool results, along with live model listing, login/status probing, and optional HTTP transport.83Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI agents and IDEs to send prompts to an active ChatGPT web session and retrieve the completed response without needing an API key.1MIT