Dify

Bidirectional MCP integration enabling Claude to use Dify Workflow as a tool with optional multiple API keys.
  • typescript

7

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "tomokiishimine-dify-mcp-server": {
      "command": "npx",
      "args": [
        "@tonlab/dify-mcp-server"
      ],
      "env": {
        "DIFY_API_KEY": "your-api-key-here",
        "DIFY_API_KEYS": "app-FirstAPIKeyHere,app-SecondAPIKeyHere",
        "DIFY_BASE_URL": "https://your-dify-endpoint"
      }
    }
  }
}

You can integrate Claude with Dify Workflow using the MCP protocol by running a lightweight tool server. This setup lets Claude access Dify Workflow as a tool, dynamically retrieve parameters, and support multiple API keys for scalable use.

How to use

Use the Dify MCP Server to expose Dify Workflow as a tool inside Claude. You will run a small local server that speaks MCP, then configure Claude to connect to it. You can instantiate multiple tools when you supply multiple API keys, each key creating a distinct tool in Claude. This enables you to run workflows that rely on Dify without leaving Claude’s environment.

How to install

Prerequisites you need before installation are Node.js 16 or higher and npm 7 or higher. You also need access rights to Dify Workflow (API Key). Install steps are as follows.

  1. Install the MCP server package locally using npm.

  2. Prepare your environment variables for Dify.

  3. Start Claude and point it to the MCP server as configured in the sections below.

Additional configuration and usage notes

The MCP server is configured via environment variables. You can run a single API key or multiple keys, each key exposing a separate tool in Claude. The server is invoked via npx to run the packaged MCP server script.

Available tools

bidirectional_mcp

Enables bidirectional MCP communication between Claude and the Dify MCP server.

dify_workflow_tool

Exposes Dify Workflow as a tool within Claude, dynamically retrieving workflow parameters.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational