Delegation Worker MCP
This MCP server exposes a Delegation Worker control plane for configuring providers, managing secrets, and running Codex-backed worker tasks.
Open the Worker control panel (
worker_panel) to choose provider, model, reasoning, access, and verification settings.Read session and worker state (
delegation_status,session_mode_get,worker_profile_get,worker_catalog,worker_status,codex_status).Start, wait for, steer, extend, respond to, cancel, and monitor worker tasks (
worker_start,worker_wait,worker_steer,worker_extend,worker_respond,worker_cancel).Switch between NATIVE and WORKER session modes (
session_mode_set).Manage OpenAI-compatible providers: save, delete, refresh catalogs, probe compatibility, and override reasoning metadata (
provider_save,provider_delete,provider_refresh,provider_probe,provider_model_override).Install/update only the namespaced Codex
delegation_worker_gatewayprovider without changing official top-level selectors (codex_install).Store API keys encrypted locally; read APIs never return secrets.
Discover models and reasoning controls dynamically, with conservative unknown-capability handling.
Provides integration with OpenAI-compatible model providers and the official Codex app-server, enabling delegated worker execution through a local gateway while preserving official ChatGPT authentication. Supports dynamic model discovery, reasoning controls, and encrypted API key storage.
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., "@Delegation Worker MCP start a worker to add tests for the parser and report back"
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.
Delegation Worker MCP
A universal Worker control plane exposed through MCP. The project keeps host integrations thin: a host such as Codex Official App Server Web only needs to connect this MCP server and render its MCP App. Worker model/provider configuration, secret storage, dynamic model capability discovery, Codex worker execution, progress, steering and cancellation live here.
What v0.1 implements
MCP tools for Worker lifecycle:
worker_start,worker_status,worker_wait,worker_steer,worker_cancel.A compact MCP App at
ui://delegation-worker/controlfor selecting provider, model, reasoning control, access level and automatic verification.App-only provider management: arbitrary OpenAI-compatible base URL + API key, not hard-coded to New API.
AES-256-GCM local secret vault. API keys are never returned by read APIs.
Dynamic
/v1/modelsdiscovery and per-(provider, model)reasoning metadata normalization.No model-name guessing. If the upstream does not advertise reasoning controls, the UI exposes only
Autounless an operator override is configured.A local Responses-compatible gateway that can route many upstream providers and fall back to Chat Completions when Responses is not supported.
Codex-native model discovery for Worker route aliases: the gateway exposes a real Codex
ModelsResponse, projects explicit/probed third-party tool capability intoModelInfo, and keeps unknown capabilities conservative instead of guessing from model names.Active compatibility probes distinguish native Responses, ordinary function tools (including the wire shape used by MCP tools), and custom/freeform tools required for native
apply_patch.A Codex adapter that installs one namespaced provider (
delegation_worker_gateway) without changing the user's top-level official model/provider selectors.Third-party workers run as independent official Codex App Server threads, so they can use the Codex workspace/tool harness while official ChatGPT authentication remains separate.
Worker status reports a compatibility grade.
full-candidatemeans native Responses plus function and custom/freeform tool schemas were actively accepted; archive-grade parity still requires the real target seal to prove actual tool execution.
Related MCP server: Codex Agent Orchestrator MCP
Product boundary
Codex Web / ChatGPT / OpenClaw / Hermes host
|
| MCP tools + MCP App
v
Delegation Worker MCP
- provider profiles
- secret vault
- model capability registry
- worker lifecycle
- runtime adapters
|
Codex adapter (v0.1)
|
official codex app-server
|
delegation_worker_gateway
|
third-party model providerCodex-Official-App-Server-Web does not need Worker-specific APIs. It can treat this project as an MCP server. A lightweight /worker or @Worker launcher can invoke the worker_panel tool and let the existing MCP Apps Host render the returned UI resource.
Reasoning controls
Reasoning is model-specific. The registry can normalize:
effort scales (
low,medium,high, ...);on/off thinking;
adaptive modes;
budget-style controls.
The source is always retained (upstream_metadata, operator_override, or unknown). Unknown capability means Auto only.
Run
Requirements:
Node.js 20+
codexinstalled for Codex worker execution
npm test
npm run check
node mcp/server.mjsThe MCP server uses newline-delimited JSON-RPC over stdio. It also owns a loopback-only local model gateway on 127.0.0.1:8791 by default. Override with DWMCP_GATEWAY_PORT.
Data is stored under:
~/.local/share/delegation-worker-mcpOverride with DWMCP_DATA_DIR.
Connect to Codex
Add this MCP server through the normal Codex MCP configuration/plugin surface, pointing the command at:
scripts/run-mcp.shThen open the worker_panel MCP App. On first use, choose Connect Codex. The app-only codex_install operation adds only the namespaced delegation_worker_gateway provider to ~/.codex/config.toml; it does not replace the official provider/model selectors or touch ChatGPT OAuth state.
Provider setup
The compact panel asks for only:
provider name;
API base URL;
API key.
On save, the project calls the provider model catalog, records the models and their explicit metadata, and stores the key encrypted locally. The first adapter supports OpenAI-compatible services such as New API and other compatible gateways. The provider adapter boundary is intentionally separate so native Anthropic/Gemini-style transports can be added without changing MCP or UI contracts.
Security notes
Provider configuration tools are marked MCP App-only where supported by the host, so models do not receive secret-management tools in their normal tool surface.
API keys are encrypted at rest with a local 256-bit AES-GCM master key and never returned by provider reads.
The local model gateway requires its own random bearer token.
Worker model/access/reasoning selection is saved by the human-facing panel.
worker_startdoes not accept arbitrary provider/model/access parameters, preventing a model from self-upgrading its configured permissions.danger-full-accessis therefore an operator-selected Worker profile setting, not a model-controlled argument.
Current adapter scope
v0.1 fully implements the generic OpenAI-compatible path plus the Codex runtime adapter. Direct native Anthropic/Gemini transports are extension points rather than silently emulated. Providers reachable through an OpenAI-compatible gateway work without New API-specific assumptions.
Available Tools
21 toolscodex_installA
Install/update only the namespaced Delegation Worker provider without changing official top-level model/provider selectors.
Inputs: no named parameters.
codex_statusARead-only
Read whether the namespaced Delegation Worker Codex provider is installed.
Inputs: no named parameters.
delegation_statusARead-only
Read current session mode, redacted Worker profile, active Worker progress and Codex connection status. NATIVE means Delegation Worker is dormant for this session.
Inputs: no named parameters.
provider_deleteB
Delete a provider profile and its encrypted credential reference.
Inputs: id (required).
provider_model_overrideC
Advanced operator override for reasoning capability when upstream metadata is absent. Provenance remains operator_override.
Inputs: modelId (required), providerId (required), override.
provider_probeBRead-only
Probe whether a configured provider/model accepts Responses or requires Chat Completions compatibility.
Inputs: id (required), modelId.
provider_refreshCRead-only
Refresh one provider model catalog and explicit reasoning metadata.
Inputs: id (required).
provider_saveB
Create/update a provider profile and test its model catalog. API keys are encrypted locally and never returned.
Inputs: name (required), baseUrl (required), id, apiKey, +3 more.
session_mode_getARead-only
Read whether the current session is NATIVE or WORKER mode.
Inputs: no named parameters.
session_mode_setA
Set NATIVE or WORKER mode for the current session. Switching to NATIVE cancels active Workers for this session.
Inputs: mode (required).
worker_cancelB
Immediately interrupt and cancel an active Worker owned by the current supervisor session.
Inputs: taskId (required), reason.
worker_catalogARead-only
Read configured providers, discovered models, and explicitly advertised per-model reasoning controls. Secrets are never returned.
Inputs: refresh.
worker_extendB
Manually renew an active Worker lease within the operator-configured hard runtime limit. Automatic bounded renewal is enabled by default.
Inputs: taskId (required), reason, extraMs.
worker_panelWorkerBRead-only
Open the Delegation Worker control panel for the current host session.
Inputs: no named parameters.
worker_profile_getARead-only
Read the operator-selected Worker model, reasoning, access and supervision settings for the current session.
Inputs: no named parameters.
worker_profile_setC
Save the human-selected Worker provider/model/reasoning/access settings for the current session.
Inputs: modelId (required), providerId (required), access, leaseMs, +4 more.
worker_respondA
Answer or reject a pending official Codex server request surfaced by worker_status. Pass the exact pending requestId and the official response object expected by that request.
Inputs: taskId (required), reason, reject, response, +1 more.
worker_startB
Start the operator-configured Worker for this session. Provider, model, reasoning, access and renewal policy are intentionally not arguments; the human Worker panel owns them.
Inputs: task (required), cwd.
worker_statusBRead-only
Read a Worker task including current phase, plan, latest action, heartbeat/progress evidence, lease, pending Codex interaction, verifier and result.
Inputs: taskId (required).
worker_steerC
Give an active Worker a precise direction change through official Codex turn/steer.
Inputs: taskId (required), direction (required).
worker_waitBRead-only
Wait for a Worker task to finish or until the bounded wait window elapses.
Inputs: taskId (required), waitMs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Several read-status tools overlap: delegation_status aggregates session mode, profile, progress, and Codex state, duplicating session_mode_get, worker_profile_get, and codex_status. worker_status vs delegation_status and worker_catalog vs worker_profile_get also have fuzzy boundaries, though descriptions help somewhat.
Most tools follow a consistent prefix_noun/prefix_noun_verb snake_case pattern (worker_*, provider_*, codex_*, session_*). The outlier is delegation_status, which breaks the prefix convention and stands apart from the otherwise predictable scheme.
21 tools is on the heavy end for a delegation-worker server, and the surface feels bloated with multiple status/getter variants. It is defensible given the multi-domain scope (session, worker, provider, codex), but sits at the borderline-heavy range.
The surface covers session modes, full worker lifecycle (start/steer/extend/respond/status/wait/cancel), provider management (save/delete/refresh/probe/override), profile get/set, and Codex install/status. Minor gap: no explicit provider-list tool, though worker_catalog partly covers it.
Related MCP Connectors
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA local-first control plane for AI agent tools, providing policy enforcement, spend caps, rate limiting, and audit trails for MCP servers.49 PyPI1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA local MCP control plane for Codex that manages task queues, dynamic roles, and side-panel team collaboration with persistence, dependency gating, and structured reporting.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Codex to delegate bounded work to external LLMs through role-based MCP tools, with worker health checks and audit logging.MIT
- AlicenseNot gradedqualityAmaintenanceMCP control plane for Claude Code, Codex, Cursor, and OpenCode. Supports opt-in quota-aware rotation across multiple native Claude Code or Codex subscription accounts of the same harness, with isolated credentials, separate quotas, and bounded task handoffs.525MIT