π¦ ClawHub
MCP Workflow
by @slemo54
Workflow automation using MCP (Model Context Protocol) patterns inspired by Jason Zhou
TERMINAL
clawhub install mcp-workflowπ About This Skill
name: mcp-workflow description: Workflow automation using MCP (Model Context Protocol) patterns inspired by Jason Zhou version: 1.0.0 author: OpenClaw
MCP Workflow Skill
Quick Reference
# Start MCP Server
node scripts/mcp-server.jsRun a workflow
./scripts/workflow-engine.sh run [--input ]List available workflows
./scripts/workflow-engine.sh listCreate new workflow from template
./scripts/workflow-engine.sh create --from Validate workflow
./scripts/workflow-engine.sh validate
Overview
This skill implements workflow automation using the Model Context Protocol (MCP), enabling:
Workflow Patterns
1. Prompt Chain Pattern
plan β generate β execute β validate
2. Dynamic Prompt Pattern
context β adapt β generate β output
3. Resource Embedding Pattern
resource://{type}/{id} β load β embed β process
4. External Trigger Pattern
trigger β validate β dispatch β execute
Built-in Templates
| Template | Description | Use Case |
|----------|-------------|----------|
| meal-planner | Weekly meal planning | Nutrition, shopping lists |
| code-review | Automated code review | PR analysis, quality checks |
| weekly-report | Status report generation | Team updates, metrics |
| documentation-generator | Doc generation | API docs, changelogs |
MCP Server Features
Resources
file://{path} - File system accessmemory://{key} - Memory storageconfig://{section} - Configuration valuesTools
workflow.run - Execute workflowworkflow.list - List workflowsworkflow.validate - Validate workflow JSONprompt.render - Render prompt templatePrompts
chain:plan - Planning promptchain:generate - Generation promptchain:review - Review promptExample Usage
Meal Planner Workflow
./scripts/workflow-engine.sh run meal-planner \
--input '{"diet":"vegetarian","days":7,"budget":50}'
Code Review Workflow
./scripts/workflow-engine.sh run code-review \
--input '{"repo":"myapp","pr":123}'
Weekly Report
./scripts/workflow-engine.sh run weekly-report \
--input '{"project":"dashboard","week":"2024-W01"}'
Best Practices
1. Workflow Design
2. Prompt Engineering
3. Resource Management
4. Cross-Server Coordination
Configuration
Create ~/.openclaw/mcp-workflow.json:
{
"servers": [
{
"name": "local",
"command": "node scripts/mcp-server.js",
"env": {}
}
],
"workflowsDir": "./workflows",
"templatesDir": "./scripts/templates",
"defaultTimeout": 30000
}
Integration with OpenClaw
Use in your OpenClaw session:
# Load the skill
openclaw skill load mcp-workflowRun workflow
openclaw workflow run meal-planner --input '{"days":5}'
References
βοΈ Configuration
Create ~/.openclaw/mcp-workflow.json:
{
"servers": [
{
"name": "local",
"command": "node scripts/mcp-server.js",
"env": {}
}
],
"workflowsDir": "./workflows",
"templatesDir": "./scripts/templates",
"defaultTimeout": 30000
}