Skip to main content
Glama

omp-worker-mcp

非同期コーディングタスクとDAGワークフローをローカルのOh My Pi (OMP) CLIサブエージェントに委任するための永続的なModel Context Protocol (MCP)サーバー。

MIT License Node.js MCP Protocol

クイックスタート • 設定 • 利用可能なツール • 安全性と所有権の契約 • アップストリームの帰属と免責事項


主なハイライト

  • ⚡ 非同期委任実行: メインの会話セッションをブロックすることなく、重いコーディング、リファクタリング、探索タスクをバックグラウンドのOMPワーカーインスタンスにオフロードします。

  • 🔀 トポロジカルDAGオーケストレーション: 自動トポロジカルソート、並行性制御、依存関係の伝播を備えた、相互依存するバッチタスクを実行します。

  • 🛡️ ワークスペースパス分離: 明示的な書き込みパスの境界を強制し、並行タスク間でのファイル変更の重複を防ぎます。

  • 🔍 監視付き再開とエンベロープ: 中間ログをリアルタイムで検査し、構造化されたJSON結果エンベロープを抽出し、タスクを再試行または調整するための監視ガイダンスを提供します。


Related MCP server: claude-orchestrator

アップストリームの帰属と免責事項

  • 外部アップストリームCLI: このプロジェクトはMIT Licenseの下でリリースされているオープンソースツールであるOh My Pi (OMP)と連携します。

  • ユーザーの前提条件:

    • 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_WORKER_OMP_COMMAND

OMP CLIバイナリのパスまたは実行可能ファイル名。

omp

OMP_WORKER_OMP_PREFIX_ARGS

OMP CLI呼び出しの前に付加される引数のJSON配列。

[]

OMP_WORKER_STATE_DIR

ジョブ状態、試行、ログ、および成果物を保存するディレクトリ。

~/.codex/state/omp-worker

OMP_WORKER_BROWSER_RULES

タスクプロンプトに注入されるオプションのカスタムブラウザ自動化指示。

(なし)

クロスプラットフォーム環境の例

Windows (cmd / PowerShell)

set OMP_WORKER_OMP_COMMAND=omp
set OMP_WORKER_STATE_DIR=C:\Users\YourUser\.codex\state\omp-worker

macOS / Linux (bash / zsh)

export OMP_WORKER_OMP_COMMAND=/usr/local/bin/omp
export OMP_WORKER_STATE_DIR=/home/youruser/.codex/state/omp-worker

Codex 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ツール

ツール

目的

omp_run_compact

便利なツール: 単一のタスクを委任し、wait_seconds まで1ターンで完了を待ちます。

omp_delegate

コーディングタスク用の非同期バックグラウンドワーカーを起動し、即座にjob_idを返します。

omp_wait

実行中のバックグラウンドジョブが終了するまで待機するか、タイムアウトに達するまでポーリングします。

omp_result

ジョブの全試行履歴、ログ、出力、および解析された構造化エンベロープを取得します。

omp_continue

失敗またはブロックされたジョブに監視による修正/ガイダンスを送り、新しい試行を行います。

omp_cancel

実行中のジョブとその子プロセスのツリーを正常に終了します。

omp_run_batch_compact

並行/逐次のバッチタスクの依存関係グラフ(DAG)を起動し、完了を待ちます。

omp_wait_group

非同期バッチタスクグループの進行または完了を待ちます。

omp_cancel_group

バッチグループ内の実行中およびキュー内のすべてのタスクをキャンセルします。


タスクの安全性と所有権の契約

  1. 書き込みと読み取り専用の分離:

    • write タスクは、所有する具体的なファイルパスを宣言する必要があります。

    • read_only タスクは、ワークスペースの変更を厳密に禁止されています。

  2. DAGの重複検証:

    • 並行して実行されるタスクは、重複する書き込み境界を宣言できません。

    • 共有パスを変更するタスクは、明示的な線形DAG依存関係(depends_on)を宣言する必要があります。

  3. 構造化検証の契約:

    • 完了した各サブタスクは、構造化された検証の詳細と更新された成果物の説明を返すことが期待されます。


ライセンス

このプロジェクトはMIT Licenseの下でライセンスされています。

Available Tools

9 tools
omp_cancelStop OMP TaskA
DestructiveIdempotent

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 GroupA
DestructiveIdempotent

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

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)A
Destructive

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 ResultA
Read-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)A
Destructive

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)A
Destructive

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 TaskA
Read-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 GroupA
Read-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

    A4.3/5.0

    Scored across 9 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers