Skip to main content
Glama

ChatGPT Web MCP

This repository is a Hermes-specific public derivative/staging repository based on the original project: Goudu666/chatgpt-web-mcp. The original MIT license and copyright notice are preserved in LICENSE.

An unofficial local MCP server that lets Codex and other MCP clients operate chatgpt.com through a dedicated persistent browser profile. It does not use the ChatGPT API, read a user's regular browser profile, or place login credentials in MCP configuration.

IMPORTANT

This project is not affiliated with or endorsed by OpenAI. It depends on the ChatGPT web UI, which may change without notice. Account permissions, region, and workspace policy may also affect behavior. Do not use this project to bypass access controls, usage limits, or safety systems.

Features

  • Create normal and temporary chats, select chat history, and work with ChatGPT Projects

  • List and select Projects, inspect/update instructions, create Projects, move conversations, and add Project sources with verification

  • Write prompts, upload explicitly selected files, send messages, and read responses

  • Discover models, reasoning levels, and answer tiers from the visible UI

  • Keep the dedicated browser and ChatGPT page open between MCP calls

  • Serialize browser control across MCP processes and apply conservative delays

  • Stop on rate-limit text or HTTP 429 without dismissing, retrying, or reloading

  • Route Pro requests through a configurable temporary identity probe and reuse a reliable result for the full lifetime of the same page session

  • Store only sanitized network error metadata

  • Discover and select ChatGPT Projects, read verified Project instructions, and manage Project sources with explicit identity checks

  • Persist a bounded operation journal to reconcile retries after timeouts or restarts

Related MCP server: WebChatMCP.js

Requirements

  • Node.js 20+

  • Google Chrome, Chromium, or Microsoft Edge

  • A local stdio MCP client such as Codex

  • A ChatGPT account that can be logged in manually

Common browser locations are detected on macOS, Windows, and Linux. Set CHATGPT_WEB_CHROME when auto-detection does not find your browser.

Install

git clone https://github.com/Goudu666/chatgpt-web-mcp.git
cd chatgpt-web-mcp
npm ci
npm run doctor
npm link

Log in through the dedicated browser:

chatgpt-web-mcp login

The browser profile is stored in ~/.chatgpt-web-mcp/chrome-profile by default. Never commit or share that directory.

Add the server to Codex:

codex mcp add chatgpt-web -- chatgpt-web-mcp serve
codex mcp get chatgpt-web

If the Codex process cannot resolve the linked command, use an absolute project path:

codex mcp add chatgpt-web -- node /absolute/path/to/chatgpt-web-mcp/src/index.js

See the official OpenAI MCP documentation for Codex MCP configuration concepts.

CLI

chatgpt-web-mcp serve    Start the stdio MCP server (default)
chatgpt-web-mcp login    Open the dedicated browser for manual login
chatgpt-web-mcp status   Inspect local browser state
chatgpt-web-mcp doctor   Check Node.js, browser detection, and local paths
chatgpt-web-mcp help     Show command help

Configurable routing policy

The bundled defaults preserve the original strict policy:

  • Normal requests use the Very High answer tier.

  • Pro requests first use a temporary Pro chat and ask What model are you?.

  • A GPT-5.6 Pro match allows a normal Pro chat.

  • A GPT-5.5 mini match falls back to the default tier.

  • Any other answer stops the route.

A reliable result does not expire while the same dedicated browser and ChatGPT page remain open. If either is closed, the result remains reusable for a three-hour grace period; the next Pro request after that period performs one new verification. Ending a normal MCP call only disconnects local control and does not start this timer. When the exact time of a manual close cannot be known, the grace period starts when the interrupted session is first detected.

These values can be changed without editing source code:

Variable

Default

CHATGPT_WEB_DEFAULT_TIER

Very High

CHATGPT_WEB_PRO_TIER

Pro

CHATGPT_WEB_PROBE_PROMPT

What model are you?

CHATGPT_WEB_PROBE_ACCEPT_ID

gpt-5.6-pro

CHATGPT_WEB_PROBE_FALLBACK_ID

gpt-5.5-mini

CHATGPT_WEB_PROBE_ACCEPT_PATTERN

GPT-5.6 Pro regular expression

CHATGPT_WEB_PROBE_FALLBACK_PATTERN

GPT-5.5 mini regular expression

CHATGPT_WEB_PRO_RECHECK_AFTER_CLOSE_MS

10800000 (3 hours)

See .env.example. The project does not automatically load .env; inject variables through the MCP client, shell, or operating system.

Conservative rate-limit policy

  • Page interactions: at least 1 second apart

  • High-level site actions: at least 5 seconds apart

  • Message sends: at least 30 seconds apart

  • Conversation changes: at least 30 seconds apart

  • Conversation changes after a completed answer: at least 30 seconds

  • First site action after clearing a breaker: 5 minutes

  • Independent history quiet period after a history rate limit: 5 minutes

The server does not automatically clear the breaker, dismiss rate-limit messages, retry failed requests, or close the persistent browser. Do not lower these defaults in a public contribution merely to make the server faster.

Privacy and limitations

  • Login state, runtime state, and sanitized diagnostics live under ~/.chatgpt-web-mcp by default.

  • Upload tools only accept explicit absolute file paths.

  • Diagnostics omit query strings, cookies, request and response bodies, and conversation identifiers.

  • Response waiting uses in-page mutation events rather than page polling.

  • Failed in-page navigation stops instead of repeatedly reloading ChatGPT.

  • The ChatGPT web UI is not a stable API and selectors may require maintenance.

  • A model's self-description is a routing signal, not cryptographic proof of the serving model.

Development

npm ci
npm test
npm run smoke
npm pack --dry-run

CI performs offline unit tests and package checks only. It never logs in to ChatGPT or sends live requests. See CONTRIBUTING.md and SECURITY.md.

License

MIT

Available Tools

33 tools
chatgpt_add_file_to_projectC

Thêm file vào Project Sources và chỉ thành công khi filename xuất hiện trong Sources.

Inputs: file (required), name, projectId, operationId.

chatgpt_answer_tier_statusA

读取输入框右侧能力滑杆的当前档位和可访问值域,例如“极高,第 4 项,共 5 项”。不会发送提示词。

Inputs: no named parameters.

chatgpt_browser_lifecycleA

读取专用 ChatGPT 浏览器的常驻状态。MCP 调用结束后浏览器会继续保持打开,后续调用直接接管,不重复进站。

Inputs: no named parameters.

chatgpt_capabilitiesA

一次读取当前模式、模型、思考强度、临时状态和少量可见历史摘要;用于确需综合预检时,避免连续调用多个状态工具。不会展开模型或思考强度子菜单。

Inputs: historyLimit.

chatgpt_circuit_breaker_statusA

只读取本地安全熔断和未确认生成任务状态,不访问 ChatGPT 网页。

Inputs: no named parameters.

chatgpt_clear_circuit_breakerA

仅在用户已经人工确认 ChatGPT 限流提示消失后,清除本地安全熔断。不会访问网页。

Inputs: confirmed (required).

chatgpt_close_browserA

明确关闭 ChatGPT MCP 的专用常驻浏览器。仅在用户明确要求关闭时调用。

Inputs: no named parameters.

chatgpt_create_projectB

Tạo ChatGPT Project mới và xác minh URL/projectId/title sau khi tạo.

Inputs: name (required), operationId, instructions.

chatgpt_get_latest_responseB

读取当前 ChatGPT 对话最近一条完整回复和对话状态。默认不为状态展示额外展开高级菜单。

Inputs: includeSettings.

chatgpt_list_historyA

列出 ChatGPT 侧栏当前加载的历史对话,可按标题筛选。返回 title、conversationId 和 URL。

Inputs: limit, query.

chatgpt_list_modelsA

按“当前档位→高级→模型”的页面层级,动态列出当前 ChatGPT 账号实际可用的模型。不要猜测模型名称。

Inputs: no named parameters.

chatgpt_list_modesA

列出 ChatGPT 新版页面顶部当前可用的模式,例如“聊天”和“工作”。

Inputs: no named parameters.

chatgpt_list_projectsA

列出 ChatGPT Projects 当前可见的项目名称和修改时间。只读取 Projects 页面,不创建或修改项目。

Inputs: no named parameters.

chatgpt_list_thinking_levelsA

按“当前档位→高级→思考强度”的页面层级,列出账号实际可用的思考强度。

Inputs: no named parameters.

chatgpt_move_conversation_to_projectC

Di chuyển conversation vào Project, sau đó xác minh membership.

Inputs: projectId, operationId, projectName, conversationId, +1 more.

chatgpt_network_diagnosticsA

读取本地脱敏网络异常记录。只包含时间、方法、脱敏路径、状态码和资源类型;不含查询参数、Cookie、请求体或响应体。

Inputs: limit.

chatgpt_new_chatB

创建新的普通或临时对话,并可同时选择模式、模型、思考强度和能力档位。

Inputs: mode, model, temporary, answerTier, +1 more.

chatgpt_probe_pro_identityA

执行 Pro 身份探针:同一浏览器和 ChatGPT 页面会话内始终复用同模式的可靠结果;页面或浏览器关闭后继续复用 3 小时,之后才重新验证。没有可用缓存时才新建临时对话、切到“Pro”、发送“你是什么模型?”并无限等待。返回原回答及配置的接受/回退/unknown 分类,不创建正常对话。

Inputs: mode, force.

chatgpt_project_instructionsA

Đọc instructions của Project; chỉ ghi khi truyền instructions và save=true, sau đó đọc lại xác minh.

Inputs: name, save, projectId, operationId, +1 more.

chatgpt_route_new_chatA

按可配置策略新建并发送:普通请求使用“极高”;明确请求 Pro 时先执行临时身份探针,命中“gpt-5.6-pro”才在正常对话继续使用“Pro”,命中“gpt-5.5-mini”则回退默认档位,其他回答停止。浏览器始终常驻。

Inputs: prompt (required), mode, wait, files, +3 more.

chatgpt_search_historyA

使用 ChatGPT 网页自带的“搜索聊天”界面查找历史对话,因此不受侧栏当前加载数量限制。返回 title、conversationId 和 URL。

Inputs: query (required), limit.

chatgpt_select_answer_tierA

选择输入框右侧的能力档位。当前支持精确选择配置的最高档“Pro”,并校验页面显示结果。

Inputs: answerTier (required).

chatgpt_select_historyA

通过 conversationId、ChatGPT /c/... URL 或唯一标题打开历史对话,并返回最近一条回答。优先使用 ID。

Inputs: url, title, conversationId.

chatgpt_select_modeA

选择 ChatGPT 新版页面顶部模式,例如“聊天”或“工作”,并校验选中状态。

Inputs: mode (required).

chatgpt_select_modelA

按“当前档位→高级→模型”选择当前对话使用的模型,并校验结果。

Inputs: model (required).

chatgpt_select_projectA

打开指定 ChatGPT Project,并通过项目 URL 和页面标题验证 projectId/name。不会创建、移动或上传内容。

Inputs: name, projectId.

chatgpt_select_thinking_levelA

选择 ChatGPT 网页当前对话的思考强度,并校验页面显示的结果。

Inputs: thinkingLevel (required).

chatgpt_send_messageB

组合工具:可新建或继续对话、选择模式/模型/思考强度/能力档位、切换临时对话、上传文件、写入提示词、发送并取得回答。能力档位为“Pro”或模型名称带 Pro 时自动无限等待;普通档位仍使用 timeoutMs。只有用户明确要求上传时才传 files。

Inputs: prompt (required), mode, wait, files, +7 more.

chatgpt_set_temporaryA

开启或关闭新对话的临时对话模式,并通过页面状态进行校验。切换可能会打开一个新对话。

Inputs: enabled (required).

chatgpt_statusA

检查专用浏览器、登录、当前对话、模式与临时对话状态。仅在诊断或确需状态时调用;正常发送无需预先调用。默认不展开高级菜单。

Inputs: includeSettings.

chatgpt_submit_promptA

发送当前输入框中的提示词,并可等待 ChatGPT 网页回答完成。当前能力档位为“Pro”或模型名称带 Pro 时自动无限等待,timeoutMs 仅用于普通档位。

Inputs: wait, timeoutMs, operationId.

chatgpt_upload_filesA

向当前 ChatGPT 对话上传用户明确授权的本地文件。路径必须是绝对路径。不会自动发送提示词。

Inputs: files (required).

chatgpt_write_promptA

把提示词准确写入 ChatGPT 网页输入框但不发送,适合先上传文件或让用户检查草稿。

Inputs: prompt (required), append.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 33 tools

    Disambiguation3/5

    Most tools are clearly paired as list/select or action/status, but there is meaningful overlap among status-oriented tools like chatgpt_status, chatgpt_capabilities, and chatgpt_browser_lifecycle, and among sending paths like chatgpt_submit_prompt, chatgpt_send_message, and chatgpt_route_new_chat. The descriptions help clarify intended usage, but agents could still easily select the wrong variant in those cases.

    Naming Consistency4/5

    The consistent chatgpt_ prefix and the dominant list_/select_/create_/get_ verb pattern make the set predictable. A few name-style deviations such as chatgpt_status, chatgpt_capabilities, chatgpt_answer_tier_status, and chatgpt_project_instructions are noun-like rather than verb-led, but they are minor and still readable.

    Tool Count2/5

    With 33 tools, the server exceeds the 25+ threshold and feels over-scoped. The count is inflated by multiple overlapping status checkers and several high-level combined variants that duplicate lower-level send/new-chat flows, making the surface heavier than necessary for its apparent purpose.

    Completeness4/5

    The core ChatGPT workflows are well covered: sending messages, reading responses, managing history, selecting modes/models/thinking levels, and working with projects. Notable gaps are the lack of delete/rename operations for conversations and projects, and no way to retrieve a full conversation transcript beyond the latest response, but these are workable gaps rather than fatal dead ends.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Clio MCP server for ChatGPT, Claude and any AI agent: search matters, log time entry, create task, add matter note, create calendar entry and list bills in your own Clio account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Clio yourself; Cotlet does not store your password and you need no Clio API key. About the official Clio API: Yes. Clio has a REST API, the Clio Manage API v4, with OAuth 2.0 (checked 6 Nov 2026). Setup and FAQ: https://cotlet.dev/integrations/clio-api-mcp-server

      https://cotlet.dev/mcp/v1/clio
    • SingleOps MCP server for ChatGPT, Claude and any AI agent: create lead, list proposals, schedule visit, list unpaid invoices and list jobs in your own SingleOps account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to SingleOps yourself; Cotlet does not store your password and you need no SingleOps API key. About the official SingleOps API: SingleOps has a Lead Entry API only: "It is not a general-purpose job-creation or read/write API, and there is no native Zapier integration". The token comes by email to support (checked 9 Nov 2026). Setup and FAQ: https://cotlet.dev/integrations/singleops-api-mcp-server

    • Plex MCP server for ChatGPT, Claude and any AI agent: search libraries, list library items, add to Watchlist, mark item watched, add to playlist, list collections, grant library access and revoke library access in your own Plex account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Plex yourself; Cotlet does not store your password and you need no Plex API key. About the official Plex API: Plex has a documented HTTP API for Plex Media Server and no official MCP server (checked 5 Nov 2026). The API covers libraries, playlists, collections and playback history on one server and needs an X-Plex-Token. Setup and FAQ: https://cotlet.dev/integrations/plex-api-mcp-server

      https://cotlet.dev/mcp/v1/plex
    • Chatwoot MCP server for ChatGPT, Claude and any AI agent: list conversations, reply to conversation, add private note, assign conversation, add labels and resolve or snooze conversation in your own Chatwoot account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Chatwoot yourself; Cotlet does not store your password and you need no Chatwoot API key. About the official Chatwoot API: Chatwoot has a full REST API, the Application API, and an official command-line client, but no official MCP server (checked 22 Oct 2026). The API covers conversations, messages, contacts, labels, teams and assignments with an access token from Profile Settings. Setup and FAQ: https://cotlet.dev/integrations/chatwoot-api-mcp-server

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables browser automation over MCP using a real Chrome browser with existing profile, supporting real tabs, downloads, cookies, and RPA workflows.
      166 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables 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.
      8
      3
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP clients to launch and drive isolated browser profiles—each with its own cookies, login state, fingerprint, and proxy—so agents can navigate, click, type, extract, screenshot, evaluate JS, manage tabs and cookies, and perform waits. Profile state persists across launches, letting authenticated workflows carry over between AI sessions.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables operating a dedicated signed-in ChatGPT browser session through MCP, including project-scoped conversations, minimized Windows browser operation, manual login recovery, and listing or downloading result files.
      MIT