Labsco
cyanheads logo

MCP Workflow Orchestration Server

โ˜… 31

from cyanheads

Enables AI agents to discover, create, and execute complex, multi-step workflows defined in simple YAML files.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

@cyanheads/workflows-mcp-server

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

5 Tools

Install in Claude Desktop Install in Cursor Install in VS Code


Tools

Five tools covering the full workflow library lifecycle โ€” discovery, retrieval, creation, and deletion for both permanent and temporary workflows:

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 global instructions prepended.
workflow_createWrite a new permanent workflow YAML to the library.
workflow_create_tempWrite a temporary one-shot workflow, indexed but excluded from list results.
workflow_deletePermanently remove a permanent workflow by name and optional version.

workflow_list

List permanent workflows from the in-memory index.

  • Optional keyword query filter (case-insensitive substring across workflow name and description)
  • Optional category filter (case-insensitive substring match)
  • Optional tag filter (AND match โ€” all listed tags must be present)
  • Set includeTools: true to surface the unique server/tool pairs used across each workflow's steps
  • Temporary workflows are excluded; results sorted by name then version descending
  • Empty results echo the applied filters with a hint to broaden

workflow_get

Retrieve a complete workflow by name, including the global instructions document.

  • Semver-aware: omit version to get the highest available match; specify a version for an exact lookup
  • Returns the full workflow YAML structure with all steps and metadata
  • Injects the global_instructions.md content as globalInstructions โ€” apply these when executing the workflow; null when the file is absent
  • Temporary workflows are accessible here even though excluded from workflow_list
  • Template placeholders ({{input.foo}}, {{steps.X.output.Y}}) are returned verbatim โ€” the server never interpolates them

workflow_create

Write a new permanent workflow to the library.

  • Workflow stored at categories/<slugified-category>/<slugified-name>-<slugified-version>-workflow.yaml โ€” one file per name@version, so multiple versions coexist
  • Rejects if name@version already exists โ€” bump the version to create a new revision
  • Server stamps created_date and last_updated_date automatically
  • Index and snapshot rebuilt after write; filesystem watcher also fires (idempotent, debounced)

workflow_create_temp

Write a throwaway workflow to the temp/ directory.

  • No conflict check โ€” temp workflows are intentionally ephemeral and overwriteable
  • Indexed and accessible via workflow_get but excluded from workflow_list results
  • Useful for one-shot plans, short-lived scaffolding, or session-specific orchestration steps

workflow_delete

Permanently remove a permanent workflow from the library.

  • Semver-aware: omit version to delete the highest available match; specify a version to target one exactly
  • Only permanent workflows can be deleted โ€” temporary workflows are rejected (they expire on their own)
  • Irreversible: the file is removed and the workflow no longer appears in workflow_list or workflow_get

Features

Built on @cyanheads/mcp-ts-core:

  • Declarative tool definitions โ€” single file per primitive, framework handles registration and validation
  • Unified error handling โ€” handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

Workflow library:

  • In-memory index keyed by name@version, built at startup from workflows-yaml/categories/ recursively
  • Semver-aware lookup โ€” latest version returned when version is omitted
  • Filesystem watcher (Node.js fs.watch recursive) rebuilds the index on any add/change/remove; debounced to avoid thrash
  • YAML validated at index time โ€” invalid files are skipped and logged, never crash the server
  • _index.json snapshot written on every rebuild for external tooling and debugging
  • Configurable WORKFLOWS_DIR, GLOBAL_INSTRUCTIONS_PATH, and debounce interval

Agent-friendly output:

  • workflow_get always includes globalInstructions alongside the workflow โ€” no second call needed
  • Discriminated source field (permanent | temp) on every workflow_get response
  • Typed error contracts with structured reason codes (not_found, version_not_found, already_exists, temp_not_allowed, index_unavailable) so callers can branch on error type rather than parsing messages
  • workflow_list with includeTools: true surfaces all MCP server/tool dependencies at a glance

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 throwaway ones, 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