dify -ts
MCP server from faiz-gear/dify-mcp-server-ts
claude mcp add --transport stdio faiz-gear-dify-mcp-server-ts node dist/server.js \ --env CONFIG_PATH="Path to YAML config (default: ./config.yaml in project root)."
How to use
This MCP server translates Dify workflows into MCP tools, enabling you to invoke Dify applications as modular tools within the MCP ecosystem. It processes Dify-based workflows and streams responses back through the MCP protocol, allowing collaborative and interactive tool usage. The server is written in TypeScript for type safety and reads configuration from a YAML file to connect to Dify, including the base API URL and application secret keys. After building, you can run the server to expose your Dify workflows as MCP-compatible tools that can be discovered and invoked by MCP clients.
How to install
Prerequisites:
- Node.js 18 or higher
- npm 8 or higher
- Access to Dify API and application secret keys
Installation steps:
-
(Optional) Install via Smithery (automatic setup for specific clients): npx -y @smithery/cli install @faiz-gear/dify-mcp-server-ts --client claude
-
Clone the repository: git clone <repository-url> cd dify-mcp-server-ts
-
Install dependencies: npm install
-
Create a configuration file (config.yaml) in the project root with Dify settings:
config.yaml
dify_base_url: 'https://api.dify.ai/v1' dify_app_sks:
- 'your-dify-app-sk-1' # Replace with your actual Dify app secret key
- 'your-dify-app-sk-2' # Replace with your actual Dify app secret key
-
Build and run: npm run build npm start
Development mode: npm run dev
Additional notes
Notes:
- The server expects a YAML configuration file (config.yaml by default) with dify_base_url and dify_app_sks. You can override the path using the CONFIG_PATH environment variable.
- Ensure your Dify API keys are kept secure and not committed to version control.
- If you encounter streaming issues with Dify workflows, verify that your environment supports streaming responses and that the MCP client can handle streaming data.
- The npm package name for this server is @faiz-gear/dify-mcp-server-ts. If you customize or fork it, update the mcp_config and npm_package fields accordingly.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud