workflow-mcp
workflow-mcp
workflow-templates リポジトリ内の AI ワークフローテンプレートを MCP 呼び出し可能ツール に変換します。あらゆる MCP クライアント(WorkBuddy、Claude Desktop、Cursor など)がテンプレートの一覧表示、契約の確認、テンプレートの実行、構造化された結果の取得を直接行えます。
デジタルパイプラインの建築家 · 第4の積み木:すべてのパイプラインを「プラグアンドプレイ」にする
できること
ツール | 説明 |
| リポジトリ内の利用可能な全テンプレートを一覧表示(バージョン / 説明 / 実行可能かどうか) |
| テンプレートの入出力 JSON Schema と処理パイプライン(DAG)の概要を表示 |
| テンプレートを同期実行:JSON 入力、構造化データ + レポート出力 |
| 非同期実行(推奨):即座に task_id を返し、バックグラウンドで実行 |
| 非同期タスクの状態をポーリング(running / done / error) |
サンプルセッション:
1. list_templates → 发现 financial-report-analysis
2. get_template_info(模板id) → 拿到输入契约(需要 company_name / report_path / report_type)
3. run_template_async(模板id, json) → {task_id, status: running}
4. get_task_status(task_id) → 轮询至 done,返回指标 + 风险信号 + 报告なぜ非同期版が必要か:WorkBuddy / Claude Desktop などのクライアントは単一のツール呼び出しにリクエストタイムアウト制限があり、テンプレートの実際の実行(複数回の LLM 呼び出し)には通常 1〜2 分かかるため、同期呼び出しはタイムアウトします。非同期版はこの制限を回避します。
Related MCP server: MCP Boilerplate
アーキテクチャ
MCP 客户端(WorkBuddy / Claude Desktop / ...)
│ stdio / streamable-http
┌───────▼───────────────┐
│ server.py (FastMCP) │ list / get / run 三个工具
└───────┬───────────────┘
┌───────▼───────────────┐
│ templates_registry.py │ 扫描 workflow-templates,读取契约元数据
│ runner.py │ 子进程执行模板 run.py(--auto-review 自动化复核)
└───────┬───────────────┘
│
┌───────▼───────────────┐
│ workflow-templates │ 模板仓库:契约 + 提示词 + 脚本(数据权威)
└───────────────────────┘主要設計:
テンプレートリポジトリが単一の真実の情報源を維持:テンプレートの追加/変更は workflow-templates を変更するだけで、本サービスの変更は不要
自動レビュー:
run.pyに--auto-reviewパラメータを追加。MCP が自動実行する際に人間の操作をスキップし、出力にreview_noteマークを付けて、呼び出し側が重要な数値を検証する実行の分離:実行のたびに一時入力ファイル(使用後削除)を書き込み、出力はテンプレートの
output/に保存
クイックスタート
pip install -e .
python -m workflow_mcp.server # stdio(默认)
python -m workflow_mcp.server --transport streamable-http前提依存:workflow-templates リポジトリがローカル E:\NEMB\workflow-templates にある(環境変数 WORKFLOW_TEMPLATES_HOME で上書き可能)。テンプレート付属の .env(例:OpenRouter キー)は run.py が自動的に読み込みます。
エンドツーエンドテスト(実際に財務分析テンプレートを1回実行します):
python examples/client_test.py # stdio 协议方式
python examples/inproc_test.py # 进程内客户端方式(CI / 沙箱环境更稳)WorkBuddy への接続
examples/workbuddy_mcp.json を C:\Users\33033\.workbuddy\mcp.json の mcpServers にマージし、コネクタ管理ページで workflow-mcp を「信頼」して有効にします。その後、会話で「財務分析テンプレートを実行して」と直接言うことができます。
三つ組との関係
リポジトリ | 役割 | MCP エコシステムでの位置 |
workflow-templates | テンプレートリポジトリ(コンテンツの権威) | workflow-mcp によってツールとしてラップされる |
workflow-mcp | テンプレート実行器(本サービス) | 知的労働パイプライン MCP |
digital-twin-mcp | デバイスデータ MCP | デバイスデータパイプライン MCP |
factory-twin-viz | 可視化フロントエンド | 任意の MCP データを消費 |
ロードマップ
v0.1:list / get / run の3ツール + --auto-review(現在)
v0.2:テンプレート出力のデータベース保存(結果の追跡可能)、並行実行キュー、n8n 版テンプレートのインポート
v0.3:digital-twin-mcp と組み合わせて「デバイス健全性レポート」テンプレート(データパイプライン × 知的パイプライン)
ライセンス
MIT License
Available Tools
5 toolsget_task_statusGet Task StatusA
查询异步任务状态:running / done / error;done 时返回完整结果(同 run_template 返回结构)。
Inputs: task_id (required). Returns: object
get_template_infoGet Template InfoC
查看模板的契约:输入/输出 JSON Schema、处理流水线(DAG)概要。
Inputs: template_id (required). Returns: object
list_templatesList TemplatesA
列出 workflow-templates 仓库中所有可用的工作流模板(含版本、描述、是否可执行)。
Inputs: no named parameters. Returns: result
run_templateRun TemplateA
执行指定工作流模板。input_json 为符合该模板输入契约的 JSON 字符串(如财报分析模板需 company_name / report_path / report_type)。
返回:success、data(结构化输出,含 human_review_required 标记)、report(报告文本)、artifacts(落盘路径)。 注意:自动化执行会标记 review_note,请调用方核验关键数字。 长耗时模板(如含多次 LLM 调用)在带请求超时限制的客户端下请改用 run_template_async。
Inputs: input_json (required), template_id (required). Returns: object
run_template_asyncRun Template AsyncA
异步执行指定模板:立即返回 task_id,执行在后台进行,用 get_task_status 轮询结果。
适用场景:WorkBuddy / Claude Desktop 等客户端对单次工具调用有请求超时限制, 而模板真实执行(多次 LLM 调用)可能超过该限制。
Inputs: input_json (required), template_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct operation: list_templates (enumerate), get_template_info (inspect contract), run_template (sync execute), run_template_async (async execute), get_task_status (poll). The sync/async pair is clearly differentiated by explicit timeout guidance in the descriptions, so no realistic misselection.
All names follow a clean verb_noun snake_case pattern (list/get/run/get). Minor inconsistency: list_templates uses a plural noun while get_template_info uses singular, and 'info'/'status' suffixes differ slightly, but this is readable and predictable.
Five tools is well-scoped for a template-consumer/executor server, with each tool earning its place (discovery, inspection, sync exec, async exec, polling). No redundant or filler tools.
Covers the full discover-inspect-execute-monitor lifecycle, including an async path for long-running templates. Minor gap: no cancel/abort operation for a running async task, which could strand agents waiting on a hung task.
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server implementation that standardizes how AI applications access tools and context, providing a central hub that manages tool discovery, execution, and context management with a simplified configuration system.13-
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.12MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that advertises tools with JSON schemas and executes tool calls safely, enabling AI agents to perform actions on real systems.-