3P

3dify-project/dify-mcp-client

Developer tools

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

172 stars 33 forks 品質 61 トレンド 17Apache-2.0

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

概要

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

概要(AI 翻訳)

MCP Clientは、Agent Using Agent(UI-TARS-SDK)をサポートするAgent Strategy Pluginとして提供されました。

[!重要] DifyはMCP ServerではなくMCP Hostです。

仕組み

各MCP client(ReActエージェント)ノードはMCP serversに接続可能です。

  1. Tool、Resource、PromptのリストはDifyツールに変換されます。
  2. 選択したLLMはname、description、argument typeを確認できます。
  3. LLMはReActループに基づくツールを呼び出します(Reason → Act → Observe)。

[!注] このリポジトリのほとんどのコードには以下のファイルが含まれています。

Dify 公式プラグイン/エージェント戦略

https://github.com/langgenius/dify-official-plugins/tree/main/agent-strategies/cot_agent

✅ 私がしたこと

  • ReAct.pyをコピーし、ファイルを[[T13]に改名)
  • mcpReAct.yamlおよび[[T16]を編集してconfig_json]のGUI入力フィールドを追加しました。

###mcpReAct.py に、私は付け加えた

  • MCP用の新しい12機能
  • __init__() AsyncExitStack および event loop の初期化
  • MCPの_handle_invoke_action()のいくつかのコード
  • [[T21]におけるMCPの設定とクリーンアップ

[!重要] ループ中のReActは今のままでした

🔄 更新履歴

  • SSE MCPクライアント(v0.0.2)を追加
  • マルチSSEサーバーのサポート(v0.0.3)

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

README

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

dify-mcp-client

MCP Client as Agent Strategy Plugin with Computer Using Agent (UI-TARS-SDK) support.

[!IMPORTANT] Dify is not MCP Server but MCP Host.

How it works

Each MCP client (ReAct Agent) node can connect MCP servers.

  1. Tool, Resource, Prompt lists are converted into Dify Tools.
  2. Your selected LLM can see their name, description, argument type
  3. The LLM calls Tools based on the ReAct loop (Reason → Act → Observe).

[!NOTE] Most of the code in this repository contains the following files.

Dify Official Plugins / Agent Strategies

https://github.com/langgenius/dify-official-plugins/tree/main/agent-strategies/cot_agent

✅ What I did

  • Copied ReAct.py and renamed file as mcpReAct.py
  • Added config_json GUI input field by editing mcpReAct.yaml and class mcpReActParams()

in mcpReAct.py, I added

  • New 12 functions for MCP
  • __init__() for initializing AsyncExitStack and event loop
  • Some codes in _handle_invoke_action() for MCP
  • MCP setup and cleanup in _invoke()

[!IMPORTANT] ReAct while loop is as they are

🔄 Update history

  • Add SSE MCP client (v0.0.2)
  • Support multi SSE servers (v0.0.3)
  • Update python module and simplify its dependency (v0.0.4)
    • mcp(v1.1.2→v1.6.0+)
    • dify_plugin(0.0.1b72→v0.1.0)
  • Add UI-TARS SDK integration for GUI automation capabilities (v0.0.5)
  • Support Streamable HTTP MCP client
  • Feat SSE param: /sse?key=value (v0.0.6)

🤖 UI-TARS Integration

This plugin includes UI-TARS SDK integration for GUI automation capabilities.

[!WARNING] UI-TARS-SDK integration is supported only Dify Plugin’s local debug deployment. https://github.com/3dify-project/dify-mcp-client#-how-to-develop-and-deploy-plugin

Normal difypkg install doesn’t work. Because UI-TARS require OS native API, yet Dify plugin env is Linux docker container.

I’m thinking alternative solusion via Streamable HTTP MCP.

Key Features

  • On-demand GUI automation: UI-TARS is called only when needed, reducing token consumption
  • Life-time control: Set maximum loop count per task to prevent runaway automation

Known Limitations

  • Single Monitor Support: UI-TARS currently recognizes the primary monitor only. Multi-monitor setups are not supported.
  • Mac Retina Display Issue: On macOS with Retina displays, UI-TARS requires the display resolution to be set to “Default” instead of the highest quality setting. Otherwise wrong (w,h) point is clicked. https://github.com/bytedance/UI-TARS-desktop/issues/591

Life-time Parameter

The life_time parameter controls the maximum number of GUI actions UI-TARS can perform:

  • Default: 10 iterations
  • User-configurable maximum via ui_tars_max_life_time_count
  • Your selected LLM can dynamically adjust within the user-defined limit based on task complexity

[!NOTE]

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →