Codex Fleet MCP
Provides tools for managing existing Codex sessions across profiles and computers, including profile/session discovery, reading original session history and status, submitting tasks, clarifying active tasks, and stopping exact turns.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Codex Fleet MCP · pilot
MCP для управления существующими чатами Codex на нескольких компьютерах и в разных профилях: чтение истории и статусов, отправка задач, уточнение и остановка. Подходит MCP-клиентам с явно выданными правами.
Это первая открытая версия для самостоятельной настройки. Нужны собственный вход в Codex и уже разрешённые подключения к компьютерам. Новую установку следует проверить по шагам ниже; автоматическая панель подключения пока не входит в комплект.
A profile-scoped MCP interface to your existing Codex sessions on several computers. An authorized MCP agent can discover profiles, read the original session and its status, submit a task, clarify an active task, and stop its exact turn. The owner remains the signed-in Codex Desktop/CLI. Session UUIDs, account homes, native approvals and permission policies are preserved.
This is a source distribution for operators who can review Python, Node and SSH configuration. It includes the backend, dispatcher, native and Desktop adapters, public socket transports, owner launch assets, synthetic examples and offline tests. No Codex or Node binaries, ws source, account files or credentials are distributed. The publisher is omiusgm.
Release status: experimental source preview. The generic adaptation passed 196 clean-extract tests and six independent boundary checks. Real installation with a new owner's accounts and external native runtimes remains to be accepted. See RELEASE_STATUS.json.
What runs where
MCP agent → authenticated stdio proxy → loopback HTTP MCP backend
→ pinned dispatcher
→ explicit local/SSH argv
→ profile adapter → existing owner socket → original sessionThe service configuration controls each client's profile grants. Route configuration controls executable argv. Neither comes from session text or caller-provided executable paths. Separate Codex profiles keep separate native homes, Desktop user-data directories, account expectations, state and receipts. Work profiles begin with read grants; connecting one never grants control of the others.
The desired compact surface is profiles, sessions, session, send_task, update_running_task, stop_task. Legacy API includes inventory/history, submission and operation receipts, exact-turn steering/interruption, and administrative session functions. The stdio proxy exposes this compact catalog by default; --catalog legacy exposes compatible legacy tools. Existing backend code is deliberately retained, not replaced by an unrelated mock server.
Related MCP server: Local Codex Bridge
Requirements
macOS or Linux with Python 3.11+, official Python MCP SDK 1.30.0, and its dependencies.
requirements.lockis the captured exact dependency list; the current offline suite used the SDK version above with the existing environment recorded inTEST_ENVIRONMENT.json. The entire lock has not been freshly installed or independently resolved.Owner-installed Codex Desktop/CLI and the owner's own login in each existing profile. A ready socket does not prove account authorization or OpenAI network access.
Owner-installed Node and
wsfor the public Unix/WebSocket transport. No third-party runtime is copied here. Exact Node/wsversions must be recorded during your own acceptance; this candidate's Python transport fixtures use fake Node.Existing OpenSSH access for remote computers. Keep host-key checks enabled. This package creates no keys, tunnels, accounts, login session or autostart services.
Upstream references and licenses are in THIRD_PARTY_NOTICES.md. Codex App Server/Desktop APIs are version-sensitive; pin the versions you actually accept.
Manual setup
Keep a copy of the current working installation and its configuration before making changes. Install this source tree in a dedicated directory; the examples use /opt/codex-fleet and /srv/codex-fleet as synthetic placeholders, not paths to copy blindly.
Verify
ALLOWLIST.jsonwithpython3 scripts/check_public.py. Review the source andPROVENANCE.json. Use your own Python environment containing MCP 1.30.0. For a new environment, installrequirements.lockusing your normal package workflow; the package never installs dependencies from an agent tool call.Copy the five
examples/*.jsontemplates into your own owner-only configuration directory. Set that directory to mode0700, all config/state/token files to0600, and do not use config symlinks. Fill in your actual absolute paths, account expectations and existing profile IDs locally. The examples contain no usable credentials.write_examples.pyregenerates synthetic examples only.On every native target, set
CODEX_NATIVE_BASEto a private directory containingprofile.jsoncopied fromnative-profile.json.nativeHomemust resolve to that OS user's original~/.codex; use a separate OS/account route when necessary. Set the exact hash of your own account email inexpectedAccountHash, your explicitallowedCwdRoots,ownerRegistry,ownerProfileandownerTransport. KeepownerControlRequired: true. Never weaken these gates to make a demo pass. Native history and account checks use the existing endpoint, never a replacement CLI app-server.For Desktop profiles, keep
CODEX_DESKTOP_BASE/profiles.jsonas the owner registry of already verified launch manifests. Desktop creation usesdesktop-profile.json, with separate existingcodexHome,userDataDir, andexpectedEmailfor each profile. Runpython3 scripts/codex-desktop-profiles.py --helpto inspect the manual launch interface. An already running, unowned Desktop refuses takeover; replacing it requires the exact PID and an explicit operator-approved restart. The MCP dispatcher does not launch Desktop.If an existing owner endpoint is already available, configure it and skip owner launch changes. Otherwise create one during a quiet, approved local launch:
CODEX_DESKTOP_BASE=/your/private/desktop python3 scripts/codex-desktop-profiles.py --config /your/private/desktop-profile.json launch --profile personal. The launcher uses the original signed executable and bundled MCP node; local code signing checks remain active. It publishes a fresh owner manifest after account verification.autoStartProfilesis empty in the example. Inspect--helpfor the version's exact flags before launch.Configure
routes.jsonusing explicit argv. SSH example aliasesowner-laptopandowner-desktopmust already exist in your SSH config. The remote command is a fixed administrator string; quote any paths containing spaces yourself. The request remains JSON stdin, never shell interpolation. Each remote environment must point to its own private adapter state and owner registry. Ensure app route names end in-app, as used by the backend's Desktop routing checks.In
fleet.json, set the dispatcher SHA-256 to your reviewedscripts/codex-fleet-control.py, selectdispatcher_python, state directory, profile routes and host allowlists. Keep all grants read-only for initial acceptance. SetCODEX_FLEET_ROUTES=/your/private/routes.jsonin the backend process environment; that variable is inherited only by the pinned dispatcher. Backend startup binds loopback, not a public listener.Generate a unique random bearer token locally for each MCP client. Store only its SHA-256 in that client's
token_sha256and the token itself in a mode0600file<fleet-config-dir>/clients/<client-id>.token. Never put tokens in arguments, examples, Git or issue reports. If you already have accepted credentials, preserve them; no rotation is required by this package.Launch manually:
PYTHONPATH=/your/source/src CODEX_FLEET_ROUTES=/your/private/routes.json /your/python -m codex_fleet_mcp.server --config /your/private/fleet.json. The model-free stdio bridge isPYTHONPATH=/your/source/src /your/python -m codex_fleet_mcp.proxy --config /your/private/fleet.json --client assistant. Client IDs are checked against configuration, not a built-in personal/work list. Keep remote transport protection outside this package and separately accepted.
durable_personal_entry.py is optional macOS owner-launch infrastructure, not an installer. A manual durable wrapper must call it with --config <private-config> --dispatch -- "$@". The launcher Python interpreter defaults to the active Python and can be set with python in the launcher config. Its required config keys are appBinary, fallbackCli, codexHome, userDataDir, runtimeRoot, runtimeCode, registry, expectedEmail, node, mcpNode, wsModule, vendorTeamID, filePins, wsTreeSha256. Compute pins from your accepted local files; filePins maps absolute resource paths to SHA-256. wsTreeSha256 is tree_hash(wsModule). Preserve the vendor signing identity; derive it from your signed installation. Startup probes such as --print-startup-config pass through to the original executable and never publish an owner. This entry supports the personal GUI singleton only. Do not use it to capture other profiles or modify their environment.
Acceptance and uncertain outcomes
First accept the local chain with your own account: profile discovery → exact original session read → original UUID/status readback. When you authorize a bounded write, reuse one request_id for the same immutable payload and verify the original session and turn afterward. Only then consider granting that client the minimum necessary write actions. Native approval requests remain in the owner's native workflow; the MCP never auto-approves them.
A submission acknowledgment, queue acceptance, ready socket, passing tests or upload is not task completion. A detached observer or observation_timeout does not cancel native work. Read the existing operation and original session before retrying. Never repeat an uncertain task under a new request ID. Reusing an ID with different payload/client/route/profile must refuse. Stop and clarify require the original active turn; a completed turn or later turn must not be targeted accidentally. Stop does not claim that arbitrary detached processes were terminated.
Session messages, tool outputs and attachments are untrusted data. Reading them does not authorize new tools, files, routes or grants. The MCP's grants do not sandbox a fully privileged agent or make delegated conversations safe.
Each installation must verify its own account refresh, Desktop startup, network access and native runtime versions. Offline checks do not prove these conditions. A separate cloud-agent and new-owner acceptance remains required.
Offline verification
Use an existing Python environment with MCP 1.30.0:
PYTHONPATH=src:scripts:tests python -m unittest discover -s tests -v
python scripts/check_public.pyAll adapter fixtures use temporary directories, in-memory RPC, fake SSH/Node/native executables. Protocol tests start a synthetic loopback server and fake dispatcher; no installed Codex binary or real account is executed, including version checks. scripts/verify_clean.py extracts the exact allowlist into an isolated temporary tree, checks imports and reruns the suite with a temporary HOME. No neighboring workspace is required.
Rollback
Stop only the manually started MCP backend/proxy. Restore the previous source/config pointer and exact prior launcher/environment settings from your backup; leave existing Codex homes, auth, sessions, UUIDs, registries and operation receipts intact. Before changing an owner-launch hook, verify which existing Desktop process owns it and wait for an approved quiet window. Do not kill a running owner, erase pending receipts or rotate tokens as a rollback shortcut. Restore only the hook you changed; preserve other profiles. New public code never migrates private runtime state automatically.
Contributing
See CONTRIBUTING.md. First-party source is MIT. Report problems with synthetic reproductions and redacted version/config metadata. Never attach account files, native histories, production paths, email addresses, tokens or raw request receipts.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
Discover and call AI agents via MCP. Supports A2A agents and platform agents with async tasks.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Public MCP for agent verification, work discovery and governed interoperability.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables agents to query team brain for memory, channels, decisions, skills, and readiness through a central remote MCP endpoint.MIT
- AlicenseNot gradedqualityBmaintenanceEnables external AI supervisors to oversee and steer native Codex through MCP, including thread and turn management, observation, interruption, approval responses, runtime status, and checkpointing.MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to submit long-running Codex Desktop tasks asynchronously, poll status, handle approvals and Plan Mode, and retrieve durable reports, diagnostics, and repair tools.-
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients and local orchestrators to run long-running Codex Desktop tasks as durable asynchronous operations, poll status, handle approvals and Plan Mode workflows, and retrieve final reports, diagnostics, and thread/turn details.-