omp-worker-mcp
omp-worker-mcp
持久化模型上下文协议(MCP)服务器,用于将异步编码任务和 DAG 工作流委托给本地 Oh My Pi(OMP)CLI 子代理。
快速开始 • 配置 • 可用工具 • 安全契约 • 上游归属与免责声明
核心亮点
⚡ 异步委托执行:将繁重的编码、重构和探索任务卸载到后台 OMP worker 实例,而不会阻塞您的主对话会话。
🔀 拓扑 DAG 编排:通过自动拓扑排序、并发控制和依赖传播来执行相互依赖的批量任务。
🛡️ 工作区路径隔离:强制执行显式写入路径边界,防止并发任务之间重叠的文件修改。
🔍 监督恢复与信封:实时检查中间日志,提取结构化 JSON 结果信封,并提供监督指导以重试或调整任务。
Related MCP server: claude-orchestrator
上游归属与免责声明
外部上游 CLI:本项目与 Oh My Pi (OMP) 交互,后者是根据 MIT License 发布的开源工具。
用户先决条件:
Node.js >= 22.0.0。
用户必须自行安装并配置本地 OMP CLI 实例。
用户有责任遵守适用于其环境的 OMP CLI 许可证和条款。
功能特性
异步委托执行:启动独立的子代理编码任务,而不会阻塞主对话会话。
DAG 与批量编排:通过拓扑依赖排序、并发限制和自动依赖传播来运行相互依赖的批量任务。
严格的任务安全与所有权:内置验证检查可防止多个并发任务写入重叠的文件路径或在同一工作区内冲突。
持续监督与反馈:检查中间输出、流式日志、检索结构化 JSON 信封,并提供监督反馈以继续或重试尝试。
跨平台设计:专为 Windows、macOS 和 Linux 上的本地 Node.js 环境设计;请验证 OMP CLI 在您平台上的可用性。
安装与快速开始
# 1. Clone the repository
git clone https://github.com/divenire990/omp-worker-mcp.git
cd omp-worker-mcp
# 2. Install dependencies
npm ci
# 3. Build TypeScript to dist/
npm run build
# 4. Run test suite
npm test配置
配置通过环境变量管理(或直接在您的 MCP 客户端中配置)。
变量 | 描述 | 默认值 |
| OMP CLI 二进制的路径或可执行文件名称。 |
|
| 前置到 OMP CLI 调用的参数 JSON 数组。 |
|
| 用于存储作业状态、尝试、日志和工件的目录。 |
|
| 可选的自定义浏览器自动化指令,注入到任务提示中。 | (无) |
跨平台环境示例
Windows (cmd / PowerShell)
set OMP_WORKER_OMP_COMMAND=omp
set OMP_WORKER_STATE_DIR=C:\Users\YourUser\.codex\state\omp-workermacOS / Linux (bash / zsh)
export OMP_WORKER_OMP_COMMAND=/usr/local/bin/omp
export OMP_WORKER_STATE_DIR=/home/youruser/.codex/state/omp-workerCodex MCP 客户端配置示例
将服务器添加到您的 Codex MCP 配置中(例如在 config.toml 中):
Windows 示例
[mcp_servers.omp-worker]
command = "node"
args = ["C:/path/to/omp-worker-mcp/dist/index.js"]
[mcp_servers.omp-worker.env]
OMP_WORKER_OMP_COMMAND = "omp"
OMP_WORKER_STATE_DIR = "C:/Users/YourUser/.codex/state/omp-worker"macOS / Linux 示例
[mcp_servers.omp-worker]
command = "node"
args = ["/path/to/omp-worker-mcp/dist/index.js"]
[mcp_servers.omp-worker.env]
OMP_WORKER_OMP_COMMAND = "/usr/local/bin/omp"
OMP_WORKER_STATE_DIR = "/home/youruser/.codex/state/omp-worker"可用 MCP 工具
工具 | 用途 |
| 便捷工具:委托单个任务并在一次交互中最多等待 |
| 为编码任务生成异步后台 worker,并立即返回 |
| 等待运行中的后台作业完成,或轮询直至超时。 |
| 获取作业的完整尝试历史、日志、输出以及解析后的结构化信封。 |
| 将监督更正/指导反馈到失败或阻塞的作业中,以进行新的尝试。 |
| 优雅地终止正在运行的作业及其子进程树。 |
| 生成并行/顺序批量任务的依赖图(DAG)并等待完成。 |
| 等待异步批量任务组取得进展或完成。 |
| 取消批处理组内所有正在运行和排队的任务。 |
任务安全与所有权契约
写入与只读隔离:
write任务必须声明它们拥有的具体文件路径。read_only任务严格限制不得修改工作区。
DAG 重叠验证:
并行运行的任务不能声明重叠的写入边界。
修改共享路径的任务必须声明显式的线性 DAG 依赖(
depends_on)。
结构化验证契约:
每个完成的子任务都应返回结构化验证详情和更新后的工件描述。
许可证
本项目基于 MIT License 许可。
Available Tools
9 toolsomp_cancelStop OMP TaskADestructiveIdempotent
Request immediate cancellation of one exact delegated OMP job. The detached runner owns the OMP child PID and terminates that process tree safely. Call this immediately when the user asks to stop; do not inspect PIDs or manually kill processes first.
Inputs: job_id (required), reason. Returns: error, job_id, status, attempt, +7 more
omp_cancel_groupCancel Batch Task GroupADestructiveIdempotent
Request immediate cancellation of a running batch task group and its child tasks. Writes a cancellation request that the detached group coordinator handles safely. Call this immediately when the user asks to stop a batch.
Inputs: group_id (required), reason. Returns: tasks, status, summary, group_id, +6 more
omp_continueSend Supervisory Feedback to Same OMP SessionADestructive
Resume the same OMP session with targeted supervisory feedback to correct specific acceptance defects without starting a fresh task from scratch. Bounded to remaining attempts within max_attempts.
Inputs: job_id (required), feedback (required), timeout_minutes. Returns: error, job_id, status, attempt, +7 more
omp_delegateDelegate Complete Task to OMP (Low-level)ADestructive
Low-level background delegation entrypoint. Transfers ownership of an execution task to OMP and returns immediately with job_id. Prefer omp_run_compact for standard workflows to avoid separate delegate/wait round trips.
Inputs: cwd (required), goal (required), acceptance, max_attempts, +2 more. Returns: error, job_id, status, attempt, +7 more
omp_resultInspect Complete OMP Task ResultARead-onlyIdempotent
Retrieve full details of a terminal OMP job, including finalResponse and attempt logs. Call this only when minimal acceptance check fails, high-risk operations occurred, or the user explicitly asks for full inspection; do not call this after every successful compact run.
Inputs: job_id (required). Returns: cwd, goal, error, job_id, +11 more
omp_run_batch_compactRun Batch OMP Tasks with DAG and Compact Aggregated Result (Preferred for Multi-task)ADestructive
Submits a decomposed group of OMP tasks to execute concurrently in the server-side bounded rolling pool (max_parallel 1-10) using a detached group runner. Enforces dependency DAG and write-ownership safety, waits up to wait_seconds (0-240, default 60s) for batch completion, and returns stable compact aggregated results. If still running when deadline elapses, returns group_id and minimal progress counts for subsequent omp_wait_group.
Inputs: cwd (required), tasks (required), max_parallel, wait_seconds, +4 more. Returns: tasks, status, summary, group_id, +6 more
omp_run_compactRun OMP Task with Compact Result (Preferred for Single Task)ADestructive
Preferred entrypoint for single substantive execution tasks. Creates a delegated OMP task, launches the detached runner, and waits up to wait_seconds (default 60s) for completion in a single MCP call. If finished, returns a compact summary, artifacts, verification, and details_path without dumping the full final response. If still running at the deadline, returns job_id and status running for subsequent omp_wait.
Inputs: cwd (required), goal (required), acceptance, max_attempts, +3 more. Returns: error, job_id, status, attempt, +7 more
omp_waitWait for OMP TaskARead-onlyIdempotent
Wait for an existing OMP job to reach a terminal status, polling up to wait_seconds (default 30s, max 60s). Returns the current status and summary once terminal or when the wait deadline elapses. Avoid polling in a tight loop.
Inputs: job_id (required), wait_seconds. Returns: error, job_id, status, attempt, +7 more
omp_wait_groupWait for Batch Task GroupARead-onlyIdempotent
Wait for an existing OMP task group to reach a terminal status, polling up to wait_seconds (0-240, default 60s). If completed, returns full aggregated compact results in original input order. If still running when deadline elapses, returns minimal progress counts without leaking task summaries.
Inputs: group_id (required), wait_seconds. Returns: tasks, status, summary, group_id, +6 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: batch vs single, delegate vs wait vs cancel vs result retrieval vs continue. No two tools overlap in function—omp_run_compact and omp_delegate differ by synchronous vs asynchronous, and omp_wait_group vs omp_wait serve batch vs single jobs.
All tools follow a consistent `omp_<verb>[_<noun>]` pattern where the verb describes the action (run, wait, cancel, result, continue) and optional noun specifies the target (batch, group, compact). Perfectly predictable and uniform.
9 tools precisely cover the lifecycle of both single and batch task execution: submission, waiting, cancellation, result retrieval, and continuation. No tool is superfluous, and the count is tight for the complexity of the domain.
The tool surface covers every stage of task management: submission (run/delegate), monitoring (wait), cancellation (cancel), post-hoc inspection (result), and iterative correction (continue). No obvious gaps—both single and batch workflows are fully supported.
Maintenance
Related MCP Connectors
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Task manager for AI agents. Orchestrate agents to achieve large goals in unified control plane.
AI work orchestration for plans, tasks, teams, and coding-agent dispatch.
Design, build and run teams of AI agents with checked handoffs between them.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables orchestrating external AI-agent CLIs like Codex to execute project development tasks through an async task system with objective verification and automated failure rework loops.8182 npm11Apache 2.0
- AlicenseAqualityBmaintenanceEnables Cursor's main agent to delegate development tasks to Claude CLI subagents via MCP, supporting synchronous, asynchronous, and parallel task execution with monitoring and control.7ISC
- AlicenseCqualityBmaintenanceEnables multiple CLI-based AI agents to collaborate as a coordinated team through shared task queues, shared memory, and a message bus, with DAG orchestration, rate-limit avoidance, parallel dispatching, and long-task management.633MIT
- FlicenseNot gradedqualityAmaintenanceEnables a primary AI assistant to delegate tasks in parallel to specialized local CLI-based AI sub-agents, share project context, and synthesize their responses through a single MCP interface.-