Skip to main content
Glama
ChatGPT Subscription MCP

ChatGPT Subscription MCP

by corith37

ChatGPT Subscription MCP

Ask OpenAI questions and generate or edit images from Claude Desktop, using your ChatGPT subscription through the official Codex local interface. No OpenAI API key required.

Claude launches the bridge and its Codex backend automatically. You do not need to keep ChatGPT, Codex Desktop, or a terminal window open. Your computer and Claude must remain running while a job finishes.

This is an unofficial local integration, not an OpenAI or Anthropic product. It provides Codex-backed conversations and built-in image generation; it does not expose every ChatGPT feature or existing ChatGPT web conversations. Plan eligibility, workspace controls, and normal Codex usage limits still apply.

Open source and community

All project-owned code is public under the MIT license: the MCP server, Claude setup helper, tests, extension manifest, build scripts, and CI. There is no private edition or separate proprietary bridge component. You can fork it, change it, and submit improvements.

Start with the contributor guide and roadmap. Use Discussions for questions and design ideas, Issues for reproducible bugs and feature proposals, and pull requests to contribute changes. Setup, clearer errors, image previews, and cross-platform testing are especially welcome.

The development guide maps the code and explains how to work without a subscription. The release guide documents how the downloadable extensions are built from public source. Third-party components keep their own licenses; OpenAI's hosted models and services are external dependencies and are not included in this project's license. See third-party notices.

Related MCP server: ccg-mcp

Install in Claude Desktop

Desktop extension

  1. Download the .mcpb matching your operating system and CPU architecture from Releases. Never install a Windows bundle on macOS or an x64 bundle on ARM.

  2. In Claude Desktop, open Settings → Desktop app → Extensions → Advanced settings → Install Extension. Older Claude versions place Extensions directly in Settings.

  3. Select the downloaded bundle. It includes the bridge and its pinned Codex runtime.

  4. Ask Claude: “Check chatgpt_status. If I need to sign in, call chatgpt_login and give me the login link.” Open the link and sign in with your ChatGPT account. Existing Codex ChatGPT sign-in is reused.

  5. Ask Claude to generate an image or ask OpenAI a question.

Claude must allow local desktop extensions, and its extension Node runtime must support Node 22 or later. There is no API key field. A custom extension is not the same as a remote connector: do not paste localhost into Claude's web connector dialog.

If no release bundle matches your platform, install from source below. Bundles are unsigned custom extensions, not reviewed directory listings.

From source: Windows, macOS, Linux MCP clients

Install Node.js 22 or later and Git, then:

git clone https://github.com/corith37/chatgpt-subscription-mcp.git
cd chatgpt-subscription-mcp
npm ci
npm run doctor

If doctor reports that ChatGPT sign-in is required:

npm run login

Then install the Claude Desktop configuration:

npm run setup

Fully quit and reopen Claude Desktop. Setup preserves other MCP servers and preferences, backs up changed files, and uses absolute paths. On Windows it handles both the ordinary and Microsoft Store Claude config locations. Re-running setup is safe. Keep the cloned folder in place; rerun setup after moving it.

To select a config explicitly:

npm run setup -- --config /absolute/path/to/claude_desktop_config.json

On Windows PowerShell, use npm.cmd if your execution policy blocks npm.ps1. Claude Desktop availability and local extension support vary by OS; the server itself also works with other local MCP clients on Linux.

Other MCP clients / Claude Code

Configure a local stdio server:

{
  "mcpServers": {
    "chatgpt-subscription": {
      "command": "/absolute/path/to/node",
      "args": ["/absolute/path/to/chatgpt-subscription-mcp/src/cli.js"]
    }
  }
}

Windows JSON paths need escaped backslashes (or forward slashes). Run the Node entry directly, rather than npm start, to keep stdout free of npm messages. Claude Code can register this same command using its local MCP configuration. This project does not provide a public HTTP server or a claude.ai/mobile remote connector.

Use it

Examples to ask Claude:

  • “Ask OpenAI to critique this product idea, then compare its answer with yours.”

  • “Generate a square watercolor illustration of a fox reading beside a window.”

  • “Edit C:/Users/me/Pictures/portrait.png: replace the background with a pale blue studio backdrop.”

  • “Continue that OpenAI conversation and ask for three alternatives.”

  • “Cancel the image job that is still running.”

Tool

Purpose

chatgpt_status

Check login, models, limits, and data location

chatgpt_login

Start the official browser login and return its URL

chatgpt_ask

Submit a question or conversation follow-up

chatgpt_generate_image

Generate or edit an image, optionally with local references

chatgpt_job

Poll a job and retrieve text, images, and a conversation ID

chatgpt_cancel

Request cancellation

chatgpt_read_image

Retrieve a generated image by its job and image IDs

Submission tools return immediately with job_id. Claude should call chatgpt_job with wait_seconds: 20 until completed, failed, cancelled, or interrupted. Image generation can take several minutes. Polling does not submit the prompt again. One generation runs at a time, with up to 16 queued requests per bridge process.

Pass conversation_id from a previous job to continue it. Conversations and completed job results survive a restart. A restart interrupts in-flight jobs; they are never silently retried. Cancellation cannot refund usage already consumed.

Image requests accept up to four local PNG/JPEG/WebP references, each up to 20 MiB. References must already exist on the same computer as the bridge: an attachment inside Claude is not necessarily a local file path. Describe desired size, transparency, composition, and edits in the prompt; these are model instructions, not guaranteed API parameters. Generated images up to 4 MiB are returned inline. Larger images are saved locally, with their full paths returned.

How it works

flowchart LR
    C[Claude Desktop] -->|local MCP stdio| B[Node bridge]
    B -->|local app-server JSON-RPC| X[Bundled Codex CLI]
    X -->|ChatGPT sign-in| O[OpenAI subscription services]
    O --> X
    X -->|text and image bytes| B
    B -->|job result and inline image| C

The bridge uses the documented Codex app-server interface and native imageGeneration events. It does not scrape chatgpt.com, automate a hidden browser, extract cookies, copy access tokens, or fall back to billable API calls. The backend owns sign-in and token refresh. See the design and feasibility notes for the options considered and remaining limitations.

Settings and local data

Environment variable

Default / behavior

CHATGPT_MCP_DATA_DIR

~/.chatgpt-subscription-mcp; use an absolute path

CHATGPT_MCP_MODEL

Account default from model/list; optional override

CHATGPT_MCP_CODEX_PATH

Bundled Codex; optional absolute native executable path

CODEX_HOME

Codex default ~/.codex; controls its sign-in and state location

Setup carries these explicit environment settings into the Claude configuration. Do not put API keys or passwords there. The source install uses the pinned @openai/codex dependency and does not upgrade or replace your globally installed CLI.

The data directory contains completed responses, image files, copied reference inputs, job metadata, and bridge-to-Codex conversation mappings. Codex separately retains its normal conversation/authentication state. Treat both directories as private. Data is not automatically deleted; close the bridge before removing its local data directory. Deleting it does not delete Codex's own saved conversations. Uninstalling the extension or removing its config entry stops future use; it does not log you out of other Codex clients.

Troubleshooting

Symptom

Next step

No tools in Claude

Fully quit/reopen Claude, check local extension policy and logs, run npm run doctor

Not signed in / API-key login detected

Use chatgpt_login or npm run login with ChatGPT sign-in

Model unavailable

Run doctor; remove a stale model override; update the bridge for a newer pinned runtime

No image returned

Read the job error; account eligibility, service refusals, and limits still apply

Job stays running

Poll the same ID; cancel if needed; the bridge times out after ten minutes

interrupted after restart

Review available results; explicitly submit a new request if desired

Reference image unavailable

Supply an absolute path to a local image the bridge can read

Image exceeds inline size

Open the returned local path; the original file is retained

Login link stops working

Keep Claude open, request a fresh login link, and complete it on this computer

Development and verification

npm ci
npm test
npm audit
npm run bundle

Tests use a fake backend and a real MCP stdio client; they require no account. CI tests Node 22/24 on Windows, macOS, and Linux. npm run bundle creates a platform-specific .mcpb and SHA-256 checksum under dist/. Bundling never includes your login, generated images, or local configuration.

Optional live checks consume your plan limits:

npm run smoke
npm run smoke -- --image --edit

On 2026-10-26, the full live flow was verified on Windows x64 with ChatGPT Plus and Codex 0.164.0: text, conversation continuation, image generation, image retrieval, and editing a reference image. Other platforms are covered by automated CI, but a passing unit test does not establish live account eligibility. Upstream app-server behavior is version-dependent and experimental; dependencies are pinned and the lockfile is committed.

See SECURITY.md, CONTRIBUTING.md, and third-party notices. The bridge is MIT licensed; bundled components retain their own licenses.

Available Tools

7 tools
chatgpt_askA

Ask the subscription-backed OpenAI assistant a question or continue its conversation. Uses plan limits. Returns a background job; poll chatgpt_job for the answer.

Inputs: prompt (required), model, conversation_id, reference_images.

chatgpt_cancelA
Idempotent

Cancel a queued or running generation. Usage already consumed is not refunded. Poll the job to confirm terminal status.

Inputs: job_id (required).

chatgpt_generate_imageA

Generate a real image, or edit reference images, with built-in OpenAI image generation using ChatGPT subscription limits. Describe size, composition, transparency and edits in the prompt. Returns a background job; poll chatgpt_job. No image is promised until the job completes.

Inputs: prompt (required), model, conversation_id, reference_images.

chatgpt_jobA
Read-only

Retrieve a generation job, response text, conversation ID, and image paths. Completed small images are returned inline. Poll running jobs; do not resubmit the original request.

Inputs: job_id (required), wait_seconds, include_images.

chatgpt_loginA

Begin ChatGPT browser sign-in when the user asks to connect their account. Returns a URL for the user to open; never ask for a password or token in chat.

Inputs: no named parameters.

chatgpt_read_imageA
Read-only

Return a previously generated image inline using job and image IDs. Only reads images produced by this bridge, up to 4 MiB per image.

Inputs: job_id (required), image_id (required).

chatgpt_statusA
Read-only

Check subscription login, available text models, usage limits, and bridge setup without generating content.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool targets a distinct phase of the bridge workflow: status, login, cancel, ask, generate_image, job polling, and read_image. The only mild overlap is between chatgpt_job (returns job metadata, text, and image paths) and chatgpt_read_image (returns an image inline), but the descriptions clearly delineate their purposes.

    Naming Consistency4/5

    All tools share the chatgpt_ prefix and snake_case formatting, which is highly predictable. The only minor deviation is that some names are action verbs (ask, generate_image, read_image) while others are nouns (status, job), but the convention remains readable and consistent overall.

    Tool Count5/5

    Seven tools is well-scoped for a subscription bridge, covering authentication, generation, polling, cancellation, and image retrieval without bloat or obvious redundancy.

    Completeness4/5

    The surface covers the full core lifecycle: login, status checks, content generation (text and image), job polling, cancellation, and image retrieval. Minor gaps exist, such as no explicit logout or conversation-listing/management tool, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Midjourney MCP server for ChatGPT, Claude and any AI agent: create images, vary creation, upscale creation, animate image, extend video, search creations, add to folder and download creation in your own Midjourney account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Midjourney yourself; Cotlet does not store your password and you need no Midjourney API key. About the official Midjourney API: Midjourney has no public API (checked 5 Nov 2026). Its Community Guidelines say it provides none, apart from rare explicit exceptions, and you create on midjourney.com or in Discord. Setup and FAQ: https://cotlet.dev/integrations/midjourney-api-mcp-server

    • Nextcloud MCP server for ChatGPT, Claude and any AI agent: upload file, share file, create calendar event, add contact, create Deck card and search files in your own Nextcloud account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Nextcloud yourself; Cotlet does not store your password and you need no Nextcloud API key. About the official Nextcloud API: Yes. Every Nextcloud instance has WebDAV for files, CalDAV for calendars, CardDAV for contacts, an OCS Share API and a Deck API, and they accept an app password (checked 16 Oct 2026). Setup and FAQ: https://cotlet.dev/integrations/nextcloud-api-mcp-server

    • Substack MCP server for ChatGPT, Claude and any AI agent: create post, schedule post, publish Note, reply to Notes, send direct message, moderate comments, list subscribers and get post stats in your own Substack account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Substack yourself; Cotlet does not store your password and you need no Substack API key. About the official Substack API: Substack has only a limited API (checked 11 Oct 2026). Its Developer API looks up public creator profiles after approval, and there is no public API to write posts or Notes, manage subscribers or send email. Setup and FAQ: https://cotlet.dev/integrations/substack-api-mcp-server

    • Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server

      https://cotlet.dev/mcp/v1/discord

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables Claude to directly invoke OpenAI's chat models (GPT-4o, GPT-4o-mini, o1-preview, o1-mini) through a Model Context Protocol integration, allowing users to query and compare responses from different AI models within Claude Desktop.
      1
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      An unofficial bridge that lets Claude Code control local macOS applications through an existing OpenAI Computer Use installation by launching the signed Codex client and translating MCP compatibility.
      68 npm
      14
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Code to generate and edit images with GPT Image by relaying prompts through a local Codex CLI signed in with a ChatGPT plan, saving results to disk and returning them inline with no OpenAI API key required.
      20 npm
      1
      MIT