Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

dify-mcp-server-ts

MCP.Pizza Chef: faiz-gear

Dify MCP Server is a TypeScript-based implementation of a Model Context Protocol server that converts Dify applications into MCP tools. It supports streaming responses from Dify workflows and is configurable via YAML files. Designed for Node.js environments, it provides type safety and seamless integration with Dify APIs, enabling developers to expose complex workflows as interactive MCP tools.

Use This MCP server To

Expose Dify workflows as MCP tools for real-time interaction Stream responses from Dify applications within MCP environments Configure MCP tools dynamically using YAML configuration files Integrate Dify API workflows into multi-model AI applications Enable type-safe MCP server development with TypeScript Deploy MCP servers that convert existing Dify apps into tools

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

dify-mcp-server-ts FAQ

How do I install the Dify MCP Server?
You can install it via Smithery CLI using 'npx -y @smithery/cli install @faiz-gear/dify-mcp-server-ts --client claude' or by cloning the repo and running 'npm install'.
What are the prerequisites for running this MCP server?
Node.js 18 or higher, npm 8 or higher, and access to Dify API keys are required.
How is the Dify MCP Server configured?
It uses a YAML configuration file to define and customize the exposed MCP tools and workflows.
Does the server support streaming responses?
Yes, it supports streaming responses from Dify workflows for real-time interaction.
Why is TypeScript used for this MCP server?
TypeScript provides type safety and better developer experience when building and maintaining the server.
Can this server integrate with multiple LLM providers?
While focused on Dify workflows, it can be used alongside models from OpenAI, Claude, and Gemini in MCP environments.
Is this MCP server suitable for production use?
Yes, with proper configuration and API access, it can be deployed in production to expose Dify workflows as MCP tools.