Skip to main content
Glama

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

Documentation

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

  1. ChatGPT plans the work and calls ThriftyRelay's MCP tools through an OpenAI tunnel.

  2. tunnel-client on your machine passes each call to the local ThriftyRelay server.

  3. 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.

  4. ThriftyRelay records the request and returns the changed files and command output.

  5. 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-client executable

  • Linux: secret-tool with a Secret Service session and ss

  • macOS: 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 setup

On 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 start

Linux 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:

  1. Open ChatGPT Plugins, select the plus button, then Add custom MCP server.

  2. Enter ThriftyRelay as the name.

  3. Under Connection, select Tunnel and choose your tunnel, then select No authentication.

  4. 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=unregistered

Response

Meaning or next step

Starts with ThriftyRelay <version>: OK

ChatGPT reached the server.

codex=target-configured

A Codex workspace is configured. Try the small task below to check execution.

codex=disabled

Configure a Codex workspace with setup.

source=changed-restart-required

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.

WARNING

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

Setup

Start, stop, update, or uninstall

Operations

Choose models and quota actions

Settings

Submit and review Codex work

Delegation

Use global Skills

Skills

Configure access and write scopes

Admission

Investigate an unknown execution

Recovery

Understand implementation and contribute

Documentation index

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 tools
approval_stepApproval Step DetailC
Read-only

Internal approval card detail source. Returns one step body, capped for display.

Inputs: index (required), task_id (required).

approve_taskApprove TaskB
Destructive

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 HealthA
Read-only

Confirm this local MCP is reachable. Returns only brief connection status.

Inputs: no named parameters.

open_approvalOpen Approval CardA
Read-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 SettingsA
Read-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 ApprovalsA
Read-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 TaskA
Destructive

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 TaskA
Destructive

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

    B3.4/5.0

    Scored across 10 tools

    Disambiguation3/5

    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.

    Naming Consistency3/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables 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.
      28
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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 npm
      8
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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 npm
      MIT