mcpField
D
Dify MCP Server (TypeScript)

Dify MCP Server (TypeScript)

Local
github.com/faiz-gearAI & Agents5Updated 91w ago

About Dify MCP Server (TypeScript)

Dify MCP Server (TypeScript) is a TypeScript MCP server that exposes Dify applications and workflows as tools. It supports streaming workflow responses and YAML-based configuration.

Key features

  1. 01Expose Dify applications as tools
  2. 02Stream workflow responses
  3. 03Configure through YAML
  4. 04TypeScript implementation

Use cases

  1. 01Make Dify workflows available to MCP clients
  2. 02Receive streaming responses from workflows
  3. 03Configure Dify API access and app keys

MCP support

The server converts Dify applications into tools for MCP clients and can stream responses from Dify workflows.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dify-mcp-server-ts": {
"command": "npx",
"args": [
"-y",
"@smithery/cli"
]
}
}
}
Run commandnpx -y @smithery/cli

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@smithery/cli

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Dify MCP Server (TypeScript)

smithery badge

A TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools.

Features

  • Converts Dify applications into MCP tools
  • Supports streaming responses from Dify workflows
  • Configurable via YAML configuration file
  • Written in TypeScript for type safety

Prerequisites

  • Node.js 18 or higher
  • npm 8 or higher
  • Access to Dify API and application secret keys

Installation

Installing via Smithery

To install Dify MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @faiz-gear/dify-mcp-server-ts --client claude
  1. Clone the repository:

    git clone <repository-url>
    cd dify-mcp-server-ts
    
  2. Install dependencies:

    npm install
    
  3. 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
    

Usage

  1. Build the project:

    npm run build
    
  2. Start the server:

    npm start
    

For development:

npm run dev

Configuration

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.

Configuration Options
  • dify_base_url: The base URL for the Dify API
  • dify_app_sks: A list of Dify application secret keys

License

ISC

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.