ThriftyRelay
Relays coding work from ChatGPT to a local Codex CLI session over an OpenAI tunnel, using the user's ChatGPT sign-in and Codex plan limits. Checks five-hour and weekly Codex quota before each request, records Codex request IDs so unchanged resends return the original task, and returns changed files and command output as evidence for ChatGPT to review.
Click on "Deploy 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., "@ThriftyRelay Add a new API endpoint to handle user profile updates and write unit tests for it."
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.
ThriftyRelay
ThriftyRelay is a local MCP server that lets ChatGPT hand coding work to Codex on your own machine. Codex uses your ChatGPT sign-in and your plan's Codex limits, without separate API billing.
日本語 | English
ThriftyRelay is maintained by Roseu and is not affiliated with OpenAI. The npm package is not published; install it from a clone as shown below. Before 1.0, a minor release may include breaking changes; check the changelog before updating.
Checks five-hour and weekly limits before each new request. By default, ChatGPT asks for approval when either remaining limit falls to or below its threshold.
Records Codex request IDs. An unchanged resend returns the original task.
Retains unknown write outcomes for review and recovery.
How it works
ChatGPT plans the work and calls ThriftyRelay's MCP tools through an OpenAI tunnel.
tunnel-clienton your machine passes each call to the local ThriftyRelay server.ThriftyRelay checks admission, and the quota limits for Codex work, then runs the step: Codex for coding work, or a direct file read or command.
ThriftyRelay records the request and returns the changed files and command output.
ChatGPT reviews that evidence and decides whether the work is done.
Related MCP server: ChatGPT Codex Bridge
Requirements
Node.js 22 or later, npm, and Git
A Codex CLI sign-in with a ChatGPT account
An OpenAI tunnel ID, a tunnel API key for that tunnel, and a
tunnel-clientexecutableLinux:
secret-toolwith a Secret Service session andssmacOS: the login Keychain and
lsof
Setup covers where to get each item and how to choose a workspace. Platform status shows what has been tested on each system.
Quick start
Install
git clone https://github.com/Roseu7/Thrifty-Relay.git
cd Thrifty-Relay
npm ci
npm install -g .npm install -g . links the thriftyrelay command to this clone, so keep the clone where it is.
npm may warn that the thrifty-relay install script was not allowed; npm ci has already run it.
Run setup from the directory you want Codex to work in; setup offers it as the workspace.
Windows
thriftyrelay setupOn an existing Windows installation, setup can stop and replace the running task, so check for running work first as described in operations.
Linux and macOS
thriftyrelay setup
thriftyrelay startLinux and macOS setup saves the configuration and does not start anything; start runs it in the background, and thriftyrelay stop stops it.
Setup explains the startup modes and what setup verifies.
Connect ChatGPT
Keep ThriftyRelay running, then add it to ChatGPT on the web:
Open ChatGPT Plugins, select the plus button, then Add custom MCP server.
Enter
ThriftyRelayas the name.Under Connection, select Tunnel and choose your tunnel, then select No authentication.
Confirm the risk warning, select Create as a plugin, and install the plugin.
Setup covers each step, plan and workspace permissions, and what to check if the tunnel does not appear.
Try it
Start a new conversation, type @, select ThriftyRelay, and ask it to call health.
A healthy reply looks like this:
ThriftyRelay <version>: OK; Windows; file/shell tools available (26 internal tools); build=<build>; source=current; codex=target-configured; writers=coordinated; scratch=configured; enforcement=unregisteredResponse | Meaning or next step |
Starts with | ChatGPT reached the server. |
| A Codex workspace is configured. Try the small task below to check execution. |
| Configure a Codex workspace with setup. |
| Source files changed after startup. Follow the restart procedure before sending work. |
Then give Codex a small task that does not change anything, for example: ask Codex to list the files in the workspace and explain what the project does.
Without a registeredadmission policy, Codex uses danger-full-access under the account running ThriftyRelay.
The policy selects the Codex worker's sandbox.
Working-directory and write-scope checks control request admission; the worker sandbox controls filesystem access. If a write ends with an unknown outcome, follow recovery instead of resending it.
Skills
The startup catalog lists global Codex Skills from ~/.codex/skills.
See Skills for selection, disabling entries with enabled = false, and handling their contents as untrusted data within the existing permissions.
Documentation
Goal | Guide |
Install and connect | |
Start, stop, update, or uninstall | |
Choose models and quota actions | |
Submit and review Codex work | |
Use global Skills | |
Configure access and write scopes | |
Investigate an unknown execution | |
Understand implementation and contribute |
Development
npm ci, node scripts/check-syntax.mjs, and npm test run the offline checks.
CONTRIBUTING.md lists the per-area test commands.
Contributing
Bug reports, documentation fixes, and focused changes are welcome. Report vulnerabilities privately as described in SECURITY.md, and see CHANGELOG.md for changes.
License
MIT License. Dependency licenses are in THIRD_PARTY_NOTICES.md.
Available Tools
10 toolsapproval_stepApproval Step DetailCRead-only
Internal approval card detail source. Returns one step body, capped for display.
Inputs: index (required), task_id (required).
approve_taskApprove TaskBDestructive
Internal approval card action. Spends one window for exactly the submission the card displayed and starts it asynchronously; the task id stays the one the card was opened with.
Inputs: minutes (required), task_id (required).
decline_taskDecline TaskA
Internal approval card action. Ends the submission without running it and without spending a window. The task id is kept in the approval record the same way a decline is inspected afterwards.
Inputs: task_id (required).
healthRemote HealthARead-only
Confirm this local MCP is reachable. Returns only brief connection status.
Inputs: no named parameters.
open_approvalOpen Approval CardARead-only
Show the approval card for a pending task. Use only when remote_task answered APPROVAL_REQUIRED with a task id; never proactively. Nothing executes from this call; the user approves in the card.
Inputs: task_id (required).
open_settingsOpen SettingsARead-only
Only use when user explicitly asks to open/view settings UI. Never call proactively. Returns all nine safe settings and opens the optional MCP Apps view when the host supports it. The view saves language, model preferences, maximum concurrent Codex agents, review policy, and the four quota threshold/action settings.
Inputs: no named parameters.
pending_approvalsPending ApprovalsARead-only
Internal approval card data source. With task_id it returns that submission or its terminal state; without it, the current pending list.
Inputs: task_id.
remote_inspectWait for Remote TaskADestructive
After submitting async work, call with task_id only. Waits up to 120s and returns immediately on completion. Finished Codex tasks include answer/review/usage; do not fetch them again. If still running, call again with the same ID without progress polling or repeated commentary. wait_ms=0 is an immediate diagnostic snapshot. step_index retrieves specific stored output. Exposed read/call images return as MCP image content; text character limits apply only to text, with image limits of 8 MiB/4 images per task. action=cancel requests task cancellation immediately; ending a wait never cancels the task. Never resubmit unknown writes.
Inputs: task_id (required), action, wait_ms, max_chars, +1 more.
remote_taskRun Remote TaskADestructive
Run work on the user's PC. Steps run in order in one call; batch related work to keep tool cards few. Do direct work yourself: read or search to look at files, edit, write, or patch for focused changes, run for commands, code for several reads at once, and call for any other Desktop Commander tool. Use one codex step for investigation or changes across several files. It needs execution=async; then call remote_inspect with only its task_id to wait for the answer, review, and usage. A step cannot see an earlier step's result in the same call. When a file's content decides the next step, read it in one call and act in the next. execution=sync waits for the steps; execution=async returns a task ID. Use async for codex and for commands that may run longer than about a minute. When an administrator has registered an admission policy, run, call, and code steps, and paths outside the workspace or marked sensitive, need the user's approval: remote_task answers APPROVAL_REQUIRED with a task_id, then call open_approval and wait with remote_inspect. Each field's description covers the rest, including quota approval and request_id reuse. For relevant tasks, use the Codex Skills catalog from MCP instructions and read only selected SKILL.md files. If the catalog is not visible, use a run step with: node /app/src/skills/catalog.mjs; discover once per relevant task, not for unrelated chat.
Inputs: steps (required), scratch, execution, stop_on_error, +2 more.
settings_updateSave SettingsB
Internal settings form submission. Accepts only the nine user-facing settings fields, including independent 5h and 1w quota thresholds and warn/block actions.
Inputs: language, baseModel, upperModel, reviewPolicy, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools target distinct actions, but the five approval-related tools (open_approval, pending_approvals, approve_task, decline_task, approval_step) form a dense cluster with overlapping 'internal card' roles, and remote_task is a broad mega-tool. Descriptions provide usage cues, so an agent can usually pick correctly, but the boundaries are not crisp.
All names use snake_case, but ordering and verb style vary: remote_task (adjective+noun), remote_inspect (adjective+verb), approval_step (noun+noun), settings_update (noun+verb), pending_approvals (adjective+noun). The pattern is readable but not predictable.
Ten tools fit the well-scoped 3-15 range, and each maps to a workflow stage. However, five of ten are approval-card internals, making the set feel heavier than the core remote-execution purpose requires.
The surface covers connectivity, task submission, async inspection/cancel, approvals, and settings, so core workflows are complete. Minor gaps include no explicit task history/list beyond pending approvals, but agents can work around this via remote_inspect and pending_approvals.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables ChatGPT to work directly on local projects by reading files, editing code, running tests and commands, inspecting Git state, and managing durable workflows, with optional delegation to local Codex agents for complex tasks.28MIT
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT to securely inspect local Codex projects, read session history, and dispatch confirmed tasks to the Codex CLI through a local MCP bridge.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT to read and edit local project files, inspect Git changes, and run approved development scripts through a secure MCP tunnel, with optional Codex Desktop integration.94 npm8Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT conversations to directly inspect local workspaces and delegate coding tasks to a local Codex agent, with controlled concurrency, reusable sessions, and task/usage tracking.603 npmMIT