YAML Workflow

io.github.orieg由 GitHub 账号 orieg 发布v0.9.6更新于 Oct 24, 2026

Expose declarative YAML-defined workflows as MCP tools over stdio

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,把声明式 YAML 定义的工作流作为工具暴露给助手运行,支持 shell、Python、文件、模板、HTTP 和批处理步骤。

可以做什么
运行 YAML 定义的工作流及其步骤,包括 shell 命令、Python 代码、文件、模板、HTTP 和批处理任务,支持 Jinja2 模板与参数。用试运行预览、从持久化状态恢复失败的工作流,并使用重试和并行步骤。校验和列出工作流,并以 ASCII DAG 或 Mermaid 可视化。通过 imports 组合工作流,并监视文件变化自动重跑。
适用场景
适合把自动化、CI/CD、数据处理或 DevOps 流水线保存为受版本控制的 YAML 文件,并希望助手在本地触发、预览、校验或查看这些工作流,而无需调度器或数据库的场景。
运行要求
作为本地进程在用户机器上通过 stdio 运行;清单列出 PyPI 包 yaml-workflow,用 uvx 启动,README 说明 MCP 服务器需安装 mcp 附加组件。需要 Python。未声明认证、环境变量或请求头。
安装前请注意
工作流会执行真实的 shell 命令、Python 代码和 HTTP 请求,并可写入文件,因此运行会改动本机,也可能访问第三方服务。试运行只做预览。密钥校验会在缺少所需环境变量时立即失败,工作流可能依赖环境中的凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 YAML Workflow,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

YAML Workflow

[PyPI version] [Python versions] [CI] [codecov] [License: MIT]

A lightweight workflow engine for CI/CD pipelines, data processing, and DevOps automation. Define reproducible, version-controlled workflows in YAML — run them locally, in CI, or on any machine with Python installed.

Why yaml-workflow?

Most workflow tools require servers, databases, and complex infrastructure. yaml-workflow takes a GitOps approach — workflows are plain YAML files, version-controlled alongside your code:

yaml-workflowAirflow / Prefect / Dagster
Setuppip install yaml-workflowServer, database, scheduler, workers
ConfigurationPlain YAML filesPython DAGs + infrastructure config
Dependencies2 (PyYAML, Jinja2)50+ packages, Docker, PostgreSQL
Use caseLocal automation, scripts, CI/CD, data pipelinesEnterprise orchestration at scale
Learning curveMinutesHours to days
StateFile-based, resumableDatabase-backed

Choose yaml-workflow when you need:

  • Simple task automation without infrastructure overhead
  • Reproducible pipelines defined in version-controlled YAML
  • Batch processing with parallel execution
  • State persistence and workflow resume after failures
  • A lightweight alternative to shell scripts with better error handling
  • GitOps-friendly pipelines that live in your repo alongside the code
  • A single tool that runs the same pipeline locally and in CI

Features

  • YAML-driven workflow definition with Jinja2 templating
  • Multiple task types: shell, Python, file, template, HTTP, batch
  • Workflow composition via imports — reuse steps across workflows
  • Plugin system via entry points — pip install yaml-workflow-myplugin
  • Watch mode — --watch to re-run on file changes
  • Dry-run mode to preview without executing
  • Workflow visualization (ASCII branching DAG and Mermaid)
  • Parallel execution with configurable worker pools
  • State persistence and resume capability
  • Retry mechanisms with configurable strategies
  • Namespaced variables (args, env, steps, batch)
  • Flow control with custom step sequences and conditions
  • Extensible task system via @register_task decorator
  • Parallel step execution via depends_on — run independent steps concurrently
  • Secrets validation — fail fast if required environment variables are missing
  • Structured output (--format json) for CI integration and scripting
  • MCP server — expose workflows as AI agent tools (pip install yaml-workflow[mcp])
  • Web dashboard — monitor runs and trigger workflows (pip install yaml-workflow[serve])
  • GitHub Action — run workflows in CI with uses: orieg/[email protected]

Use Cases

  • CI/CD pipelines — multi-step build, test, deploy workflows in YAML
  • Data processing — batch ETL pipelines with retry and resume on failure
  • DevOps automation — infrastructure tasks with secrets management and notifications
  • AI/LLM pipelines — orchestrate API calls with auth, retry, and batch processing
  • Local automation — replace shell scripts with reproducible, parameterized workflows

Quick Start

bash
# Install (isolated CLI — recommended)pipx install yaml-workflow            # Core CLIpipx install 'yaml-workflow[all]'     # + web dashboard + MCP server
# Or with pippip install yaml-workflow
# Initialize example workflowsyaml-workflow init
# Run a workflow with parametersyaml-workflow run workflows/hello_world.yaml name=Alice

Example workflow (hello_world.yaml):

yaml
name: Hello Worlddescription: A simple greeting workflow
params:  name:    type: string    default: World
steps:  - name: create_greeting    task: template    inputs:      template: "Hello, {{ args.name }}!"      output_file: greeting.txt
  - name: show_greeting    task: shell    inputs:      command: cat greeting.txt

Visualize workflows

bash
yaml-workflow visualize workflows/data_pipeline.yaml
  Workflow: Data Pipeline
  ┌─────────────────┐  │  detect_format  │  │   python_code   │  └─────────────────┘           │           ▼  ┌────────────────┐  ┌────────────────┐  ┌────────────────┐  ┌────────────────┐  │  process_json  │  │  process_csv   │  │  process_xml   │  │ handle_unknown │  │     shell      │  │     shell      │  │     shell      │  │     shell      │  └────────────────┘  └────────────────┘  └────────────────┘  └────────────────┘           │           ▼  ┌─────────────────┐  │ generate_report │  │   python_code   │  └─────────────────┘

Adjacent conditional steps are automatically grouped as branches. Use --format mermaid to export for docs or GitHub rendering.

Dry-run mode

Preview what a workflow would do without executing anything:

bash
yaml-workflow run workflows/hello_world.yaml name=Alice --dry-run
[DRY-RUN] Workflow: Hello World[DRY-RUN] Steps: 2 to execute
  [DRY-RUN] Step 'create_greeting' — task: template — WOULD EXECUTE    template: Hello, Alice!    output_file: greeting.txt  [DRY-RUN] Step 'show_greeting' — task: shell — WOULD EXECUTE    command: cat greeting.txt
[DRY-RUN] Complete. 2 step(s) would execute, 0 would be skipped.[DRY-RUN] No files were written. No tasks were executed.

Workflow composition

Reuse steps across workflows with imports:

yaml
# main.yamlimports:  - ./shared/logging_steps.yaml  - ./shared/common_params.yaml
steps:  - name: my_step    task: shell    inputs:      command: echo "runs after imported steps"

Imported steps are prepended. Imported params provide defaults that the main workflow can override. Supports transitive imports with circular detection.

Parallel Steps

Run independent steps concurrently with depends_on:

yaml
steps:  - name: fetch_api    task: http.request    inputs: {url: "https://api.example.com/data"}
  - name: fetch_db    task: python_code    inputs:      code: "result = query_database()"
  - name: merge    task: python_code    depends_on: [fetch_api, fetch_db]    inputs:      code: |        api_data = steps["fetch_api"]["result"]        db_data = steps["fetch_db"]["result"]        result = {"merged": True}

Watch mode

Automatically re-run on file changes during development:

bash
yaml-workflow run workflows/hello_world.yaml name=Alice --watch

Monitors the workflow file and all imported files. Press Ctrl+C to stop.

GitHub Actions

Run workflows in CI with the yaml-workflow action:

yaml
- name: Run pipeline  uses: orieg/[email protected]  id: pipeline  with:    workflow: workflows/deploy.yaml    params: |      env=production      version=1.2.0    format: json
- name: Use results  run: echo '${{ steps.pipeline.outputs.result }}'

Docker & Kubernetes

Run anywhere without installing Python:

bash
# Run a workflow in Dockerdocker run --rm -v $(pwd)/workflows:/app/workflows \  ghcr.io/orieg/yaml-workflow run /app/workflows/pipeline.yaml
# Start the web dashboarddocker run -p 8080:8080 -v $(pwd)/workflows:/app/workflows \  ghcr.io/orieg/yaml-workflow

Deploy on Kubernetes with the Helm chart:

bash
helm install my-workflows ./helm/yaml-workflow \  --set-file workflows.files.pipeline\\.yaml=workflows/pipeline.yaml

Compatible with ArgoCD (GitOps) and Argo Workflows. See the Kubernetes guide.

More commands

bash
# List available workflowsyaml-workflow list
# Validate a workflow (with JSON output for CI)yaml-workflow validate workflows/hello_world.yaml --format json
# Resume a failed workflowyaml-workflow run workflows/hello_world.yaml --resume
# Structured output for scriptingyaml-workflow run workflows/pipeline.yaml --format json --output results.json

Documentation

Full documentation is available at orieg.github.io/yaml-workflow.

Contributing

Contributions are welcome! See the Contributing Guide for development setup and guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

来源:README.md,提交 b87ac21

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.9.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分