MCP ExplorerExplorer

Dify Mcp Server Ts

@faiz-gearon a year ago
6 MIT
FreeCommunity
AI Systems
Dify MCP Server is a TypeScript implementation that transforms Dify workflows into Model Context Protocol tools. It supports streaming responses, is configurable via YAML files, and ensures type safety, making it a robust solution for integrating Dify applications seamlessly.

Overview

What is Dify Mcp Server Ts

Dify MCP Server (TypeScript) is a TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools, enabling seamless integration and interaction with Dify applications.

Use cases

Use cases for Dify MCP Server include integrating Dify workflows into various applications, automating tasks using Dify tools, and providing real-time responses in applications that require dynamic interactions.

How to use

To use Dify MCP Server, first install it via Smithery or clone the repository. Then, install dependencies, create a configuration file with your Dify API details, build the project, and start the server. For development, you can run it in development mode.

Key features

Key features include converting Dify applications into MCP tools, supporting streaming responses from Dify workflows, configurable via a YAML configuration file, and providing type safety through TypeScript.

Where to use

undefined

Content

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers