Back to MCP Catalog

Dify Workflow Integration MCP Server

Developer ToolsPython
Integrate and execute Dify workflows through MCP tools
Available Tools

dify_workflow

Execute a Dify workflow using the provided input parameters

workflow_inputs

The Dify Workflow Integration allows you to seamlessly connect to and execute workflows created in Dify, a popular LLM application development platform. This integration bridges the gap between AI assistants and your custom Dify workflows, enabling you to leverage your existing Dify applications directly through the Model Context Protocol. By connecting to your Dify workflows, this integration enables AI assistants to perform complex, multi-step operations that you've already defined in Dify. This creates a powerful combination where the conversational abilities of AI assistants are enhanced with the specific capabilities you've built into your Dify workflows.

Overview

The Dify Workflow Integration allows you to connect AI assistants to your Dify workflows. This integration enables AI assistants to execute workflows you've created in Dify, providing access to custom functionality you've already built.

Installation

You can install and configure the Dify Workflow Integration using one of the following methods:

Method 1: Using uvx (Recommended)

This method doesn't require cloning the repository:

  1. Add the following configuration to your client:
{
  "mcpServers": {
    "dify-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/YanxingLiu/dify-mcp-server",
        "dify_mcp_server"
      ],
      "env": {
        "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
        "DIFY_APP_SKS": "app-sk1,app-sk2"
      }
    }
  }
}

Method 2: Using uv (Local Clone)

If you prefer to clone the repository locally:

  1. Clone the repository:
git clone https://github.com/YanxingLiu/dify-mcp-server.git
  1. Add the following configuration to your client:
{
  "mcpServers": {
    "dify-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/dify-mcp-server",
        "run",
        "dify_mcp_server"
      ],
      "env": {
        "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
        "DIFY_APP_SKS": "app-sk1,app-sk2"
      }
    }
  }
}

Configuration

You can configure the integration using either environment variables or a configuration file:

Option 1: Using Environment Variables (Recommended)

Set the following environment variables in your client configuration:

  • DIFY_BASE_URL: The base URL for your Dify API (default: "https://cloud.dify.ai/v1")
  • DIFY_APP_SKS: A comma-separated list of your Dify App Secret Keys (SKs)

Example:

"env": {
  "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
  "DIFY_APP_SKS": "app-sk1,app-sk2"
}

Option 2: Using a Configuration File

  1. Create a config.yaml file with the following structure:
dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
  - "app-sk1"
  - "app-sk2"
  1. Specify the path to this file in your client configuration:
"env": {
  "CONFIG_PATH": "/path/to/config.yaml"
}

Usage

Once installed and configured, the Dify workflows associated with the App Secret Keys you provided will be available as tools to your AI assistant. The assistant can invoke these tools to execute the corresponding Dify workflows.

Each Dify workflow will appear as a separate tool with parameters matching the input variables defined in your Dify workflow.

Troubleshooting

If you encounter issues:

  1. Verify that your Dify App Secret Keys are correct
  2. Ensure your Dify base URL is accessible from your environment
  3. Check that your Dify workflows are properly configured with input variables
  4. Verify that the configuration path is correct if using a config file

Related MCPs

Apple Shortcuts
Developer ToolsJavaScript

Control Apple Shortcuts automations from AI assistants

Clojars Dependency Lookup
Developer ToolsJavaScript

Fetch dependency information from Clojars, the Clojure community's artifact repository

Simple Timeserver
Developer ToolsPython

Provides Claude with current time and timezone information

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.