codex-quota-guard-mcp
The server is a local MCP quota guard that shares one adaptive ChatGPT quota snapshot across concurrent Codex tasks and advises when to start, defer, or checkpoint work.
Read a shared Codex quota snapshot with
quota_status, including primary/secondary lanes, plan type, refresh state, and monitor diagnostics.Preflight expensive jobs with
job_preflightto get an admission or defer decision based on the current quota path and job class.Create and retrieve resumable, redacted checkpoints with
checkpoint_createandcheckpoint_get.Defer until quota reset with
defer_until_reset, producing a resume time and heartbeat automation prompt.Attach and resume deferred automations via
defer_automation_attachandresume_prepare.Configure plan thresholds, passive learning, and optional monitor behavior; run a live diagnostic with
--doctor.
Monitors and guards shared Codex/ChatGPT plan quota by reading app-server rate limits, learning job costs, and providing preflight, checkpoint, and defer decisions so concurrent Codex tasks can coordinate around five-hour resets.
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., "@codex-quota-guard-mcpCheck the shared Codex quota before I start another long task."
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.
Codex Quota Guard MCP 0.6.0
Quota Guard is a local MCP server that reads the current Codex ChatGPT quota through the official codex app-server interface, admits bounded work segments, and stores redacted checkpoints for resume. It never creates a login, accepts an API key, or reads Codex authentication files.
Security and lifecycle guarantees
Only the current stable
account.type === "chatgpt"session is supported. API-key, Bedrock, signed-out, external-token and unstable identities returnCHATGPT_LOGIN_REQUIRED; no quota percentage is read or cached for them.One authenticated
127.0.0.1core owns SQLite and quota refresh for a Codex profile. Every Codex task gets only a small stdio connector.Connectors renew an in-memory lease every 20 seconds. A clean disconnect is observed immediately; a crashed connector expires after 60 seconds.
The core exits about five seconds after the last connector disappears and no request or scheduler dispatch is active. Pending defers do not keep it alive.
The five-minute early-recovery poll runs only when a connector is alive, a defer is waiting, and the current Codex task supplied a valid scheduler capability.
There is no Scheduled Task, service, daemon,
launchd,systemd,wscript, elevation request, Codex PID scan, browser login, or OAuth fallback.
Related MCP server: codex-mcp-swarm
Requirements
Node.js 22.13 or newer (Node 22 and 24 are CI-tested).
A current Codex installation signed in with ChatGPT.
PowerShell 7 (
pwsh) on Windows, used only to apply a private user DACL; elevation is not requested.
Windows 10/11 on physical hardware or in a VM is treated identically. Windows x64 uses x64 Node/Codex; Windows ARM64 uses native ARM64 binaries or Windows' own compatibility layer. The Guard never detects Parallels, VMware, UTM, or the macOS host.
Install
This package is private and is installed from its GitHub checkout, not npm:
npm ci
npm run check
node scripts/install.mjsThe installer preserves unrelated config.toml content, creates a private local bearer and runtime settings, and registers the absolute Node executable with dist/connector.js. It does not start a persistent process. Restart or reconnect Codex after installation so it opens the new connector.
On a Windows machine that also uses WSL, run the installer with Windows Node from pwsh; both Windows and WSL tasks then use the Windows-hosted core and the same Windows profile. Native Linux and native macOS each use their own local Node, Codex login and state. Do not share Windows login/state with a macOS host.
Uninstall
Remove only the MCP registration and stop an authenticated running v0.6 core:
node scripts/uninstall.mjsAlso delete the validated v0.6 private state directory:
node scripts/uninstall.mjs --purgeBoth modes preserve unrelated Codex configuration and write a configuration backup. The purge refuses paths outside the recognized Guard-owned directory.
MCP use
The public contract has eight tools:
quota_status: call near the beginning of long work.job_preflight: call once, with a stablejobId, before each substantial token-consuming segment.quota_profile,checkpoint_create,checkpoint_get,defer_until_reset,defer_automation_attach, andresume_preparesupport policy and controlled resume.
Do not call the Guard before every shell command, small file read, or trivial edit. No tool accepts credentials, a force-refresh flag, or a model name.
quota_status.monitor reports runtimeMode="shared-http", requiresLiveClientConnection=true, and lifecycleMode="codex-bound".
Verification
npm run check
npm run acceptance:install
npm run acceptance:shared
npm audit
npm pack --dry-runCI runs the full check, disposable installer acceptance, six-concurrent-connector singleton acceptance, and package dry run on Node 22/24 for Windows x64/ARM64, Ubuntu x64/ARM64, and macOS Intel/Apple Silicon.
Release acceptance is recorded by guest OS. A Windows VM is simply a Windows acceptance result; there are no hypervisor-specific branches.
See architecture, security, monitor behavior, Windows and WSL, MCP API, and troubleshooting.
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 Servers
- AlicenseNot gradedqualityAmaintenanceEnables Codex to orchestrate multi-agent coding by routing tasks to local Claude Code workers via CCSwitch, managing cost and model selection for planning, execution, and review.7MIT
- AlicenseAqualityDmaintenanceWraps OpenAI's Codex CLI with true parallel task execution, worktree isolation for conflict-free runs, and live monitoring of each task.616MIT
- AlicenseNot gradedqualityAmaintenanceCoordinates parallel AI coding agents by providing task ownership, scoped file locks, handoffs, and verification workflows.MIT
- AlicenseNot gradedqualityBmaintenanceA local, repository-scoped MCP coordination bridge that lets Claude Code and Codex work together in the same checkout via tasks, leases, and evidence-based completion, preventing conflicting edits and enabling bounded delegation.1MIT
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Coding agents from Claude Code, Cursor and Codex claim jobs and lock files on one shared board.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
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/valentine-89/codex-quota-guard-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server