workflows-mcp-server

workflows-mcp-server

Enables AI agents to discover, understand, and execute complex multi-step workflows defined in YAML files through the Model Context Protocol.

Category
访问服务器

README

MCP Workflow Orchestration Server

TypeScript Model Context Protocol Version License Status GitHub

Empower your AI agents with a powerful, declarative workflow engine.

An MCP (Model Context Protocol) server that allows a Large Language Model (LLM) to discover, understand, and execute complex, multi-step workflows defined in simple YAML files.

Built on the cyanheads/mcp-ts-template, this server follows a modular architecture with robust error handling, logging, and security features.

🚀 Core Capabilities: Workflow Tools 🛠️

This server equips your AI with specialized tools to interact with the workflow engine:

Tool Name Description Key Features
workflow_return_list Discovers and lists available workflows. - category: Filter by a specific category.<br/>- tags: Filter by a list of tags.<br/>- includeTools: Optionally include a list of tools used in each workflow.
workflow_get_instructions Retrieves the complete definition for a single workflow. - name: The exact name of the workflow.<br/>- version: The specific version to retrieve (defaults to latest).<br/>- Dynamically injects global instructions for consistent execution.
workflow_create_new Creates a new, permanent workflow YAML file. - Takes a structured JSON object matching the workflow schema.<br/>- Automatically categorizes and re-indexes workflows.
workflow_create_temporary Creates a temporary workflow that is not listed, but can be called by name. - Ideal for defining multi-step plans for complex tasks.<br/>- Can be passed to other agents by name.

Table of Contents

| Overview | Features | Installation | | Configuration | Project Structure | | Tools | Development | License |

Overview

The Workflow MCP Server acts as a powerful orchestration layer that helps your LLM agents manage complex workflows. This provides a structured way to perform 'short' multi-step tasks that would otherwise require hard-coded logic or extensive manual intervention.

It's as easy as telling your LLM "Use the workflows-mcp-server to create a new workflow that does X, Y, and Z, using the current tools you currently have access to" or "Find me a workflow that can help with task A". The server will handle the rest, allowing your agents to focus on higher-level reasoning and decision-making. The temporary workflows can be used to allow your LLM agent to "collect its thoughts" and create a structured temporary plan; even the act of defining a workflow can help the agent clarify its own understanding of the task at hand and improve tool use performance.

Instead of hard-coding multi-step logic, your tools can leverage this server to:

  • Automate complex processes: Define a sequence of tool calls in a simple YAML file and execute it with a single command.
  • Promote reusability: Create a library of common workflows that can be used across different agents and applications.
  • Improve agent reliability: Provide agents with a clear, structured plan to follow, reducing errors and improving predictability.
  • Dynamically guide agent behavior: Use global instructions to provide up-to-date, high-level strategy to all workflows without modifying them individually.

Developer Note: This repository includes a .clinerules file that serves as a developer cheat sheet for your LLM coding agent with quick reference for the codebase patterns, file locations, and code snippets.

Features

Core Utilities

Leverages the robust utilities provided by the mcp-ts-template:

  • Logging: Structured, configurable logging with sensitive data redaction.
  • Error Handling: Centralized error processing and standardized error types (McpError).
  • Configuration: Environment variable loading (dotenv) with comprehensive validation using Zod.
  • Input Validation/Sanitization: Uses zod for schema validation.
  • Request Context: Tracking and correlation of operations via unique request IDs.
  • Type Safety: Strong typing enforced by TypeScript and Zod schemas.
  • HTTP Transport: High-performance HTTP server using Hono, featuring session management and robust authentication.
  • Authentication: Modular authentication layer supporting JWT and OAuth 2.1.

Workflow Engine

  • YAML-based Workflows: Define complex, multi-step workflows in a simple, human-readable format.
  • Dynamic Indexing: Automatically discovers and indexes all workflow files on startup and watches for changes.
  • Global Instructions: Dynamically injects a central set of instructions into every workflow, allowing for global strategy updates.
  • Temporary Workflows: Create "hidden" workflows on the fly for complex tasks or for passing structured plans between agents.

Installation

Prerequisites

MCP Client Settings

Add the following to your MCP client's configuration file (e.g., cline_mcp_settings.json). This configuration uses npx to run the server, which will automatically install the package if not already present:

{
  "mcpServers": {
    "workflows-mcp-server": {
      "command": "npx",
      "args": ["workflows-mcp-server"],
      "env": {
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

If running manually (not via MCP client) for development or testing

Install via npm

npm install workflows-mcp-server

Alternatively Install from Source

  1. Clone the repository:

    git clone https://github.com/cyanheads/workflows-mcp-server.git
    cd workflows-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Configuration

Environment Variables

Configure the server using environment variables. These can be set in a .env file or directly in your shell.

Variable Description Default
MCP_TRANSPORT_TYPE Transport mechanism: stdio or http. stdio
MCP_HTTP_PORT Port for the HTTP server (if MCP_TRANSPORT_TYPE=http). 3010
MCP_HTTP_HOST Host address for the HTTP server (if MCP_TRANSPORT_TYPE=http). 127.0.0.1
MCP_ALLOWED_ORIGINS Comma-separated list of allowed origins for CORS (if MCP_TRANSPORT_TYPE=http). (none)
MCP_LOG_LEVEL Logging level (debug, info, warning, error). debug
MCP_AUTH_MODE Authentication mode for HTTP: jwt or oauth. jwt
MCP_AUTH_SECRET_KEY Required for jwt auth in production. Minimum 32-character secret key. (none)
NODE_ENV Runtime environment (development, production). development

Project Structure

The codebase follows a modular structure within the src/ directory:

src/
├── index.ts              # Entry point: Initializes and starts the server
├── config/               # Configuration loading (env vars, package info)
│   └── index.ts
├── mcp-server/           # Core MCP server logic and capability registration
│   ├── server.ts         # Server setup, capability registration
│   ├── transports/       # Transport handling (stdio, http)
│   └── tools/            # MCP Tool implementations (subdirs per tool)
├── services/             # External service integrations
│   └── workflow-indexer/ # Discovers and indexes workflow YAML files
├── types-global/         # Shared TypeScript type definitions
└── utils/                # Common utility functions (logger, error handler, etc.)

For a detailed file tree, run npm run tree or see docs/tree.md.

Tools

The server provides a suite of tools for managing and executing workflows.

Tool Name Description Key Arguments
workflow_return_list Lists available workflows. category?, tags?, includeTools?
workflow_get_instructions Retrieves a workflow definition. name, version?
workflow_create_new Creates a new, permanent workflow. A structured JSON object.
workflow_create_temporary Creates a temporary, unlisted workflow. A structured JSON object.

Development

Build and Test

# Build the project (compile TS to JS in dist/ and make executable)
npm run build

# Test the server locally using the MCP inspector tool (stdio transport)
npm run inspector

# Clean build artifacts
npm run clean

# Generate a file tree representation for documentation
npm run tree

# Clean build artifacts and then rebuild the project
npm run rebuild

# Format code with Prettier
npm run format

# Start the server using stdio (default)
npm start

# Start the server using HTTP transport
npm run start:http

License

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


<div align="center"> Built with the <a href="https://modelcontextprotocol.io/">Model Context Protocol</a> </div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选