Dify Workflows MCP Server

Dify Workflows MCP Server

A TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools for AI systems to interact with.

localSummer

Developer Tools
OS Automation
Visit Server

README

Dify Workflows MCP 服务器 (TypeScript)

一个 Model Context Protocol (MCP) 服务器的 TypeScript 实现,将 Dify 工作流作为工具暴露出来。

特性

  • 将 Dify 应用程序转换为 MCP 工具
  • 支持从 Dify 工作流流式响应(待实现)
  • 通过 YAML 配置文件进行配置
  • 使用 TypeScript 编写,具有类型安全性

前提条件

  • Node.js 18 或更高版本
  • npm 8 或更高版本
  • 访问 Dify API 和应用程序密钥

安装

  1. 克隆仓库:

    git clone https://github.com/localSummer/dify-workflow-mcp
    cd dify-workflow-mcp
    
  2. 安装依赖:

    npm install
    
  3. 创建配置文件:

    # config.yaml
    dify_base_url: 'https://api.dify.ai/v1'
    dify_app_sks:
      - 'your-dify-app-sk-1' # 替换为你的实际 Dify 应用程序密钥
      - 'your-dify-app-sk-2' # 替换为你的实际 Dify 应用程序密钥
    

使用方法

  1. 构建项目:

    npm run build
    
  2. 启动服务器:

    npm start
    

开发环境:

npm run dev

配置

服务器可以使用 YAML 文件进行配置。默认情况下,它会在项目根目录中查找 config.yaml。您可以使用 CONFIG_PATH 环境变量指定不同的路径。

配置选项

  • dify_base_url: Dify API 的基本 URL
  • dify_app_sks: Dify 应用程序密钥列表

Cline/Roo Code配置

"dify-workflow-mcp": {
   "command": "node",
   "args": [
      "path/dify-workflow-mcp/build/index.js"
   ],
   "env": {
      "CONFIG_PATH": "path/dify-workflow-mcp/config.yaml"
   },
   "disabled": false,
   "alwaysAllow": [],
   "timeout": 300
}

注意事项

  • 当前运行工作流使用的响应模式是:response_mode: 'blocking',会等待工作流执行完成后输出最终结果
  • 当前工作流输出字段为:codecheckResult,如输出字段不一致,需要调整下面的代码
    const { code, checkResult } = responseData.data.outputs;
    

许可证

ISC

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python