A TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools.
- Converts Dify applications into MCP tools
- Supports streaming responses from Dify workflows
- Configurable via YAML configuration file
- Written in TypeScript for type safety
- Node.js 18 or higher
- npm 8 or higher
- Access to Dify API and application secret keys
To install Dify MCP Server for Claude Desktop automatically via Smithery:
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 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 the project:
npm run build
-
Start the server:
npm start
For development:
npm run dev
The server can be configured using a YAML file. By default, it looks for config.yaml
in the project root. You can specify a different path using the CONFIG_PATH
environment variable.
dify_base_url
: The base URL for the Dify APIdify_app_sks
: A list of Dify application secret keys
ISC