gpt-subagents-subscription
Allows AI agents to interact with ChatGPT using a ChatGPT subscription (OAuth), providing tools to ask GPT models, check subscription quota, and retrieve orchestration patterns.
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., "@gpt-subagents-subscriptionCheck my remaining ChatGPT quota"
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.
gpt-subagents-subscription
An unofficial MCP server that exposes GPT "subagent" tools backed by your ChatGPT subscription
(via "Sign in with ChatGPT" OAuth) instead of a pay-per-use API key. Sibling to
gpt-subagents-api (which uses the official API key), and
it ships the same orchestration patterns system.
⚠️ Read this first
This project talks to undocumented OpenAI endpoints (
auth.openai.com+chatgpt.com/backend-api/codex) — the same ones Codex CLI's "Sign in with ChatGPT" uses — and reuses Codex's public OAuthclient_id.
Not affiliated with or endorsed by OpenAI.
It may violate OpenAI's Terms of Service and could get your account rate-limited or banned.
The endpoints are unpublished and can change or break at any time.
Use entirely at your own risk. The official, stable path is an API key — see
gpt-subagents-api.
Related MCP server: MCP Server with OpenAI Integration
Tools
Tool | What it does |
| Ask a GPT model via your ChatGPT subscription. You pick |
| Remaining ChatGPT/Codex subscription quota |
| Orchestration patterns for driving the model well (see below) |
⚠️ These models can be confidently wrong. Treat output as a hypothesis and verify against real files, docs, and tests — the orchestration patterns exist largely to make that automatic.
Orchestration patterns
Patterns are reusable playbooks (Markdown in patterns/) that describe how to drive
the expert tools — splitting work, bundling context, calling the expert, verifying its output
against ground truth, and aggregating. They're exposed via list_patterns (catalog) and
get_pattern("<name>") (full text), read from disk at call time (no rebuild to add one), and the
server's instructions nudge the agent to consult them before non-trivial expert work.
name | what it does |
Wrap the GPT expert in verifying Claude subagents so the orchestrator only ever sees parallel, context-cheap, ground-truth-checked conclusions. |
A rendered diagram lives at patterns/html/two-layer-cross-model-expert.html. See patterns/README.md to add your own.
Setup
Requires Node 18+ and an active ChatGPT subscription.
npm install
npm run build
npm run login # prints a sign-in URL to open; sign in with ChatGPT (one-time)npm run login runs an OAuth flow on http://localhost:1455/auth/callback and stores tokens at
~/.gpt-subagents-subscription/auth.json (mode 0600, never committed). Run
npm run login -- --logout to clear them.
Register with Claude Code
claude mcp add gpt-subagents-subscription -- node /absolute/path/to/gpt-subagents-subscription/dist/server.jsHow it works
npm run login→ PKCE OAuth againstauth.openai.com→ tokens stored locally.The MCP server reads and auto-refreshes those tokens.
Tool calls POST to
chatgpt.com/backend-api/codex/responseswithAuthorization: Bearer+ChatGPT-Account-Id, using the Responses API schema.
Security
Tokens live outside the repo (
~/.gpt-subagents-subscription/) and are gitignored everywhere.No credentials are committed;
.env.exampleholds only optional model overrides.This project never reads your existing
~/.codex/auth.json— it mints its own tokens.Local agent/editor state (
.mempalace/,.claude/,CLAUDE.local.md, IDE folders) is gitignored.
Credits / prior art
Reverse-engineering of the ChatGPT subscription flow is documented by the community, e.g. EvanZhouDev/openai-oauth and various write-ups.
License
ISC
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.
Latest Blog Posts
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/Wally-Ahmed/gpt-subagents-subscription'
If you have feedback or need assistance with the MCP directory API, please join our Discord server