Workflows Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.5.0更新於 Oct 29, 2026

Store, query, and create YAML workflow playbooks for LLM agents.

概覽

AI 產生的概覽

本機 MCP 伺服器,從檔案目錄儲存、列出、讀取、建立與刪除供 LLM 代理使用的版本化 YAML 工作流程腳本。

可以做什麼
  • 依關鍵字、分類與標籤篩選列出永久工作流程,可選擇顯示每個工作流程用到的 server/tool 組合
  • 依名稱與選用的 semver 版本取得完整工作流程定義,並附上資料庫的全域指示
  • 在分類目錄下以 YAML 檔案建立永久工作流程,包含名稱、版本、描述、作者與步驟
  • 建立暫存草稿工作流程,可被讀取但不會出現在清單中
  • 在使用者確認解析出的名稱、版本與檔案後刪除永久工作流程或草稿
  • 透過防抖的檔案系統監看器自動偵測 YAML 檔案的修改
適用情境
適合希望代理跨工作階段重複使用由 MCP server/tool 呼叫組成的多步驟腳本、把這些腳本以可讀且可納入版本控管的 YAML 保存在磁碟上,並臨時起草一次性工作流程而不弄亂永久資料庫的情境。
執行需求
在本機執行,支援 stdio(或 Streamable HTTP)。需要 Bun v1.4.0 以上或 Node.js v24 以上,可透過 npx、bunx 或 Docker 安裝。需要一個本機 YAML 工作流程目錄,由 WORKFLOWS_DIR 指定(預設 ./workflows-yaml)。不需要 API 金鑰。選用設定包括 GLOBAL_INSTRUCTIONS_PATH、WATCHER_DEBOUNCE_MS、MCP_TRANSPORT_TYPE、MCP_HTTP_PORT、MCP_AUTH_MODE 與 MCP_LOG_LEVEL。
安裝前請注意
伺服器會寫入與刪除所設定工作流程目錄中的檔案,請把 WORKFLOWS_DIR 指向願意被修改的目錄。刪除需要用戶端支援 elicitation 確認,否則無法刪除任何內容。HTTP 部署時應設定 MCP_REQUEST_STATE_KEY 以密封確認狀態,並注意無狀態工作階段模式會被拒絕。啟用 LOG_TOOL_FAILURE_PAYLOADS 會記錄失敗呼叫的參數與結果,自由文字值中的密鑰不會被遮蔽。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Workflows Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@cyanheads/workflows-mcp-server

Store, query, and create YAML workflow playbooks for LLM agents via MCP. STDIO or Streamable HTTP.

5 Tools


Overview

A declarative workflow library for LLM agents, backed by local YAML files. Store, list, and retrieve named, versioned multi-step playbooks — each a sequence of MCP server/tool calls — for permanent reuse or one-shot temporary runs. Edits to the YAML files are picked up automatically.

Tools

ToolDescription
workflow_listList all permanent workflows in the index, with optional keyword, category, and tag filters.
workflow_getRetrieve a complete workflow definition by name, with the library's global instructions included.
workflow_createWrite a new permanent workflow YAML to the library.
workflow_create_tempWrite a temporary workflow draft, indexed but excluded from list results, kept until deleted.
workflow_deleteRemove a permanent workflow or a temporary draft by name and optional version, after the user confirms the resolved target.

Capability reference

workflow_list tool

  • Optional query (name and description), category (substring), and tags (all must match) filters, case-insensitive; temporary drafts are never listed
  • Sorted by name, then highest version first; an empty result carries a notice echoing the applied filters
  • includeTools: true adds each workflow's unique server/tool pairs

workflow_get tool

  • name plus an optional semver version; omit version for the highest available, drafts included
  • Returns the full workflow, its source (permanent or temp), and globalInstructions from global_instructions.md (null when absent); fails with not_found or version_not_found
  • Template placeholders such as {{input.foo}} come back verbatim — the server never interpolates them

workflow_create tool

  • name, semver version, description, author, category, and steps (plus optional tags); stored as one file per name@version under categories/<category>/, with created and updated dates stamped
  • Returns the key (name@version) and filePath; fails with already_exists when a permanent workflow or a draft holds the key, invalid_input, or write_failed

workflow_create_temp tool

  • The workflow_create fields minus category; stored under temp/, retrievable with workflow_get, never listed, and kept until workflow_delete removes it
  • status is created, or overwritten when it replaced the draft of the same key (keeping that draft's created_date); a key held by a permanent workflow fails with already_exists

workflow_delete tool

  • name plus an optional version (omitted: the highest across permanent workflows and drafts); the user confirms the resolved name@version, source, and file before anything is deleted, so a client without elicitation cannot delete
  • Returns the deleted workflow's source, plus a notice when another file declaring the same key now takes its place; fails with cancelled, confirmation_invalid (a prompt never issued, already answered, older than 10 minutes, or issued to another caller), target_changed (the file or its content changed after the user saw it), or not_found

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

Workflow library:

  • YAML files under categories/ and temp/ are validated at index time; an invalid file is skipped and logged, never crashes the server
  • In-memory index keyed by name@version, read from each file's content rather than its name and kept fresh by a debounced recursive watcher; a permanent workflow outranks a draft with the same key
  • Versions are canonical semver everywhere: a leading v, surrounding whitespace, and build metadata are dropped, so v1.0.0+build.5 is stored, keyed, and looked up as 1.0.0
  • Creates and deletes run one at a time, so each existence check holds until its write lands; filenames carry a hash of name@version, so keys whose slugs coincide never share a file
  • An _index.json snapshot is written on every rebuild for external tooling and debugging

Agent-friendly output:

  • Discriminated output — source: "permanent" | "temp" on every workflow_get response and typed reason codes (not_found, version_not_found, already_exists, cancelled, confirmation_invalid, target_changed, index_unavailable, …) on failures, so callers branch on data instead of parsing error strings
  • No extra round trip — workflow_get always returns globalInstructions alongside the workflow definition in the same response
  • Response shaping — workflow_list's optional includeTools flag pre-derives the unique server/tool pairs used by a workflow, and an empty result echoes the applied filters with a broadening hint instead of returning nothing

Getting started

No API keys required. The server reads from a local workflows-yaml/ directory by default.

Add the following to your MCP client configuration file:

json
{  "mcpServers": {    "workflows-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/workflows-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "WORKFLOWS_DIR": "/absolute/path/to/your/workflows-yaml"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "workflows-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/workflows-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "WORKFLOWS_DIR": "/absolute/path/to/your/workflows-yaml"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "workflows-mcp-server": {      "type": "stdio",      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "MCP_TRANSPORT_TYPE=stdio",        "-v", "/absolute/path/to/your/workflows-yaml:/workflows-yaml",        "-e", "WORKFLOWS_DIR=/workflows-yaml",        "ghcr.io/cyanheads/workflows-mcp-server:latest"      ]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http# Server listens at http://localhost:3010/mcp

Seed workflows

The repository ships a workflows-yaml/ directory with example workflows organized under categories/. These are ready to use as a starting point. The workflows-yaml/global_instructions.md file contains instructions the server includes in every workflow_get response (the globalInstructions field) — edit it to set global guidance for your agent.

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • A local directory containing YAML workflow files (or use the bundled workflows-yaml/ seed).

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/workflows-mcp-server.git
  1. Navigate into the directory:
sh
cd workflows-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment:
sh
cp .env.example .env# edit .env if needed — most settings have defaults

Configuration

VariableDescriptionDefault
WORKFLOWS_DIRAbsolute or relative path to the workflows root directory../workflows-yaml
GLOBAL_INSTRUCTIONS_PATHPath to the global instructions markdown file. Derives from WORKFLOWS_DIR when not set.<WORKFLOWS_DIR>/global_instructions.md
WATCHER_DEBOUNCE_MSInteger milliseconds (0–2147483647) to debounce filesystem change events before rebuilding the index.500
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for HTTP server.3010
MCP_SESSION_MODEHTTP sessions: auto or stateful. workflow_delete's confirmation prompt needs a live session, so HTTP startup with stateless fails with a configuration error. Ignored over stdio.stateful, declared in src/index.ts
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_REQUEST_STATE_KEYSeals the requestState a confirmation round carries (≥ 32 bytes, the same on every instance, e.g. openssl rand -base64 32); any state the server did not seal is rejected before the handler runs. workflow_delete's round carries its confirmation id, so set it for HTTP deployments.unset
MCP_LOG_LEVELLog level (RFC 5424).info
LOG_TOOL_FAILURE_PAYLOADSLog each failed tool call's arguments and result, redacted by key name and capped at LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384). A secret inside a free-form value is not redacted.false
OTEL_ENABLEDEnable OpenTelemetry instrumentation (spans, metrics, completion logs).false

See .env.example for the full list of optional overrides.


Running the server

Local development

  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker build -t workflows-mcp-server .docker run --rm \  -v /path/to/workflows-yaml:/workflows-yaml \  -e WORKFLOWS_DIR=/workflows-yaml \  -p 3010:3010 \  workflows-mcp-server

The Dockerfile defaults to HTTP transport, stateful session mode (required — see MCP_SESSION_MODE above), and logs to /var/log/workflows-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.


Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers tools and inits the workflow index service.
src/config/Server-specific environment variable parsing and validation with Zod.
src/mcp-server/tools/Tool definitions (*.tool.ts).
src/services/workflow-index/WorkflowIndexService — YAML parsing, index build, watcher, semver lookup, write helpers.
tests/Unit and integration tests mirroring src/.
workflows-yaml/Seed workflow library — categories/ for permanent workflows, temp/ for temporary drafts, global_instructions.md for agent-global guidance.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging
  • Register new tools via the barrel in src/mcp-server/tools/definitions/index.ts
  • Filesystem operations go through WorkflowIndexService, not directly in tool handlers

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 148f4db

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

6
  1. v0.5.0最新Oct 29, 2026
  2. v0.4.2Oct 25, 2026
  3. v0.4.1Oct 7, 2026
  4. v0.4.0Sep 24, 2026
  5. v0.3.3Sep 19, 2026
  6. v0.3.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分