Skip to main content
Glama

workflow-mcp

Turn the AI workflow templates in the workflow-templates repository into MCP-callable tools — any MCP client (WorkBuddy, Claude Desktop, Cursor, etc.) can directly list templates, inspect contracts, execute templates, and get structured results.

Architect of digital pipelines · Fourth building block: make all pipelines "plug-and-play"

What it can do

Tool

Description

list_templates

List all available templates in the repository (version / description / executable or not)

get_template_info

View the template's input/output JSON Schema and processing pipeline (DAG) overview

run_template

Execute a template synchronously: JSON in, structured data + report out

run_template_async

Async execution (recommended): returns task_id immediately, runs in the background

get_task_status

Poll async task status (running / done / error)

Example session:

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,返回指标 + 风险信号 + 报告

Why the async version is needed: clients like WorkBuddy / Claude Desktop impose request timeout limits on individual tool calls, while real template execution (multiple LLM calls) usually takes 1-2 minutes, so synchronous calls time out. The async version avoids this limitation.

Related MCP server: MCP Boilerplate

Architecture

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    │  模板仓库:契约 + 提示词 + 脚本(数据权威)
└───────────────────────┘

Key design decisions:

  • The template repository remains the single source of truth: adding or modifying templates only requires changing workflow-templates; this service needs zero changes

  • Automated review: run.py adds an --auto-review flag; when MCP executes automatically, it skips human interaction, and the output is marked with review_note for the caller to verify key figures

  • Execution isolation: each run writes a temporary input file (deleted after use), and output is persisted to the template's output/

Quick start

pip install -e .
python -m workflow_mcp.server                 # stdio(默认)
python -m workflow_mcp.server --transport streamable-http

Prerequisites: the workflow-templates repository is on this machine at E:\NEMB\workflow-templates (can be overridden with the WORKFLOW_TEMPLATES_HOME environment variable); the template's own .env (e.g., OpenRouter API key) is loaded by run.py itself.

End-to-end test (will actually run the financial report analysis template once):

python examples/client_test.py    # stdio 协议方式
python examples/inproc_test.py    # 进程内客户端方式(CI / 沙箱环境更稳)

Integrating with WorkBuddy

Merge examples/workbuddy_mcp.json into mcpServers in C:\Users\33033\.workbuddy\mcp.json, then click "Trust" on workflow-mcp in the connector management page to enable it. After that, you can simply say "run the financial report analysis template for me" in a conversation.

Relationship with the trio

Repository

Role

Position in the MCP ecosystem

workflow-templates

Template repository (content authority)

Wrapped as tools by workflow-mcp

workflow-mcp

Template executor (this service)

Brainpower pipeline MCP

digital-twin-mcp

Device data MCP

Device data pipeline MCP

factory-twin-viz

Visualization frontend

Consumes any MCP data

Roadmap

  • v0.1: list / get / run three tools + --auto-review (current)

  • v0.2: persist template outputs to a database (traceable results), concurrent execution queue, n8n template import

  • v0.3: combine with digital-twin-mcp into a "device health report" template (data pipeline × brainpower pipeline)

License

MIT License

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers