/ ディレクトリ / プレイグラウンド / Dify
● 公式 langgenius ⚡ 即起動

Dify

作者 langgenius · langgenius/dify

Build agentic workflows in a UI, then expose each one as an MCP tool — Claude calls your Dify-authored apps.

Dify is a popular open-source platform for building LLM apps and agent workflows. Its MCP layer lets Claude treat each Dify app as a callable tool, so workflows authored in Dify show up alongside your other MCP tools.

なぜ使うのか

主な機能

ライブデモ

実際の動作

準備完了

インストール

クライアントを選択

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "dify-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dify/mcp-server"
      ]
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "dify-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dify/mcp-server"
      ]
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "dify-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dify/mcp-server"
      ]
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "dify-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dify/mcp-server"
      ]
    }
  }
}

Claude Desktop と同じ形式。Windsurf を再起動して反映。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "dify-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@dify/mcp-server"
      ]
    }
  ]
}

Continue はマップではなくサーバーオブジェクトの配列を使用。

~/.config/zed/settings.json
{
  "context_servers": {
    "dify-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@dify/mcp-server"
        ]
      }
    }
  }
}

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add dify-mcp -- npx -y @dify/mcp-server

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: Dify

Expose a Dify workflow to Claude as a single tool

👤 Developers ⏱ ~15 min intermediate

使うタイミング: You built a multi-step workflow in Dify and want Claude to invoke it as one call.

フロー
  1. Author
    Build the workflow in Dify.✓ コピーしました
    → Workflow publishes
  2. Expose
    Enable the MCP endpoint for the app.✓ コピーしました
    → Tool listed
  3. Call
    Claude calls it like any other MCP tool.✓ コピーしました
    → Result returns

結果: Complex Dify workflow callable from Claude in one shot.

組み合わせ

他のMCPと組み合わせて10倍の力を

Use Forge as the gateway in front of multiple Dify instances

Combine dify-mcp with mcp-context-forge: Use Forge as the gateway in front of multiple Dify instances✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
workflow.run (see docs) Run a named Dify workflow 1 call
dataset.query (see docs) Query a Dify-managed dataset 1 call

コストと制限

運用コスト

APIクォータ
Plan-dependent on cloud; unlimited self-host
呼び出しあたりのトークン
Per workflow
金額
Free OSS self-host; SaaS plans
ヒント
Self-host for high-volume internal tools

セキュリティ

権限、シークレット、影響範囲

最小スコープ: dify:app:run
認証情報の保管: OAuth tokens / API keys in env
データ送信先: Dify-configured providers
絶対に付与しない: Expose internal workflows to anonymous callers

トラブルシューティング

よくあるエラーと対処法

Workflow runs hit rate limit

Tune the per-app concurrency in Dify settings

代替案

Dify 他との比較

代替案代わりに使う場面トレードオフ
AnythingLLMYou want a chat-first surfaceLess workflow authoring

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る