dify-mcp-client
About
MCP Client as an Agent Strategy Plugin. Support GUI operation via UI-TARS-SDK.
Details
- Author
- 3dify-project
- GitHub stars
- 169
- Downloads
- 758
- Categories
- Developer Tools
Jump to
- Converts MCP tools, resources, and prompts into Dify tools.
- Supports SSE, Streamable HTTP, and multiple MCP servers.
- Integrates UI-TARS-SDK for GUI automation capabilities.
- Allows user-configurable maximum loop count for GUI actions.
- Provides Chatflow test examples and DSL (.yml) imports.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
dify-mcp-clientCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install the plugin from GitHub or from a .difypkg release file via Dify's plugin manager. After installation, add an Agent node in any Dify Chatflow and select "mcpReAct" as the agent strategy. Configure the config_json field with server URLs (SSE or Streamable HTTP) to connect MCP servers.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"dify-mcp-client": {
"dify-mcp-client": {
"command": "docker",
"args": [
"build",
"-t",
"dify-mcp-client:latest",
"."
]
}
}
}
}
McpServers
{
"dify-mcp-client": {
"command": "docker",
"args": [
"build",
"-t",
"dify-mcp-client:latest",
"."
]
}
}
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
EachMCP 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
- CopiedReAct.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/591Life-time Parameter
Thelife_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]
> Currently hardcoded to use UI-TARS-1.5-7B model for optimal cost-performance balance.
🐳 Docker Deployment with Pre-built Node.js
Building the Docker Image
<details> <summary> This pulldown guide is for TypeScript stdio MCP server user</summary>docker build -t dify-mcp-client:latest .
Or use our pre-built image:
```yaml
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





