YD

yanxingliu/dify-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

279 stars 39 forks 品質 55 トレンド 18

yanxingliu/dify-mcp-serverは、https://github.com/yanxingliu/dify-mcp-server.からインポートされたMCPサーバー候補です。

概要

yanxingliu/dify-mcp-serverは、https://github.com/yanxingliu/dify-mcp-server.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

Difyを使用するためのMCPサーバーの簡単な実装です。MCPのツールを呼び出しることでDifyワークフローの呼び出しを実現します。

📰 ニュース

  • [2025/4/15] zNowは環境変数を直接使ってbase_urlとapp_sksを渡すことをサポートし、クラウドホストプラットフォームでの使用がより便利です。

🔨設置

サーバーはSmithery経由でインストールすることも手動で行うこともできます。

ステップ1:prepare config.yaml または enviroments

サーバーの設定は環境変数またはconfig.yamlファイルのいずれかで可能です。

メソッド1:環境変数の使用(クラウドプラットフォーム推奨)

以下の環境変数を設定します:

  • DIFY_BASE_URL:Dify APIの基本URL。
  • DIFY_APP_SKS:あなたのDifyアプリの秘密鍵(SK)のカンマ区切られたリストです。各SKは通常、MCPを通じて提供したい異なるDifyワークフローに対応しています。

#####方法2:config.yamlの使用

DifyのベースURLとアプリのSKを保存するためのconfig.yamlファイルを作成します。

例 config.yaml:

  • dify_base_url:Dify APIの基本URL。
  • dify_app_sks:Difyアプリのシークレットキー(SK)のリスト。各SKは通常、異なるDifyワークフローに対応しています。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Model Context Protocol (MCP) Server for dify workflows

A simple implementation of an MCP server for using dify. It achieves the invocation of the Dify workflow by calling the tools of MCP.

📰 News

  • [2025/4/15] zNow supports directly using environment variables to pass base_url and app_sks, making it more convenient to use with cloud-hosted platforms.

🔨Installation

The server can be installed via Smithery or manually.

Step1: prepare config.yaml or enviroments

You can configure the server using either environment variables or a config.yaml file.

Set the following environment variables:

export DIFY_BASE_URL="https://cloud.dify.ai/v1"
export DIFY_APP_SKS="app-sk1,app-sk2" # Comma-separated list of your Dify App SKs
  • DIFY_BASE_URL: The base URL for your Dify API.
  • DIFY_APP_SKS: A comma-separated list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow you want to make available via MCP.

Method 2: Using config.yaml

Create a config.yaml file to store your Dify base URL and App SKs.

Example config.yaml:

dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
  - "app-sk1" # SK for workflow 1
  - "app-sk2" # SK for workflow 2
  # Add more SKs as needed
  • dify_base_url: The base URL for your Dify API.
  • dify_app_sks: A list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow.

You can create this file quickly using the following command (adjust the path and values as needed):

# Create a directory if it doesn't exist
mkdir -p ~/.config/dify-mcp-server

# Create the config file
cat > ~/.config/dify-mcp-server/config.yaml <<EOF
dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
  - "app-your-sk-1"
  - "app-your-sk-2"
EOF

echo "Configuration file created at ~/.config/dify-mcp-server/config.yaml"

When running the server (as shown in Step 2), you will need to provide the path to this config.yaml file via the CONFIG_PATH environment variable if you choose this method.

Step2: Installation on your client

❓ If you haven’t installed uv or uvx yet, you can do it quickly with the following command:

curl -Ls https://astral.sh/uv/install.sh | sh
{
"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",
    }
  }
}
}

or

{
"mcpServers": {
  "dify-mcp-server": {
    "command": "uvx",
      "args": [
        "--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server"
      ],
    "env": {
GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/YanxingLiu/dify-mcp-server dify_mcp_server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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", } } } }