drio
Open app

Dify MCP Server (TypeScript)

Source

Catalog onlyCatalog onlySTDIO

Overview

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

To use Dify MCP Server, install it via Smithery, clone the repository, install dependencies, create a configuration file, build the project, and start the server.

  • Converts Dify applications into MCP tools - Supports streaming responses from Dify workflows - Configurable via YAML configuration file - Written in TypeScript for type safety
  1. Integrating Dify workflows into applications as tools.
  2. Enabling streaming responses for real-time applications.
  3. Configuring Dify applications for various environments using YAML.

Add to your AI client

Use these steps to connect Dify MCP Server (TypeScript) in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "dify-mcp-server-ts-faiz-gear": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify-mcp-server-ts-faiz-gear"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "dify-mcp-server-ts-faiz-gear": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify-mcp-server-ts-faiz-gear"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "dify-mcp-server-ts-faiz-gear": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify-mcp-server-ts-faiz-gear"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "dify-mcp-server-ts-faiz-gear": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify-mcp-server-ts-faiz-gear"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "dify-mcp-server-ts-faiz-gear": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify-mcp-server-ts-faiz-gear"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "dify-mcp-server-ts-faiz-gear": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify-mcp-server-ts-faiz-gear"
      ]
    }
  }
}

FAQ

What are the prerequisites for using Dify MCP Server?

You need Node.js 18 or higher and npm 8 or higher, along with access to Dify API and application secret keys.

How do I install Dify MCP Server?

You can install it via Smithery or by cloning the repository and installing dependencies manually.

Can I configure the server?

Yes, the server can be configured using a YAML file.