@@ -25,13 +25,16 @@ Each `MCP client` (ReAct Agent) node can connect `MCP servers`.
2525- ` __init__() ` for initializing ` AsyncExitStack ` and ` event loop `
2626- Some codes in ` _handle_invoke_action() ` for MCP
2727- MCP setup and cleanup in ` _invoke() `
28- - Add SSE MCP client (v0.0.2)
29- - Support multi SSE servers (v0.0.3)
28+
3029> [ !IMPORTANT]
3130> ReAct while loop is as they are
3231
33-
34-
32+ ## 🔄 Update history
33+ - Add SSE MCP client (v0.0.2)
34+ - Support multi SSE servers (v0.0.3)
35+ - Update python module and simplify its dependency (v0.0.4)
36+ - mcp(v1.1.2→v1.6.0+)
37+ - dify_plugin(0.0.1b72→v0.1.0)
3538
3639## ⚠️ Caution and Limitation
3740> [ !CAUTION]
@@ -64,7 +67,7 @@ https://github.com/3dify-project/dify-mcp-client/
6467## How to handle errors when installing plugins?
6568
6669** Issue** : If you encounter the error message: ` plugin verification has been enabled, and the plugin you want to install has a bad signature ` , how to handle the issue? <br >
67- ** Solution** : Add the following line to the end of your ` /docker/.env ` configuration file :
70+ ** Solution** : Open ` /docker/.env ` and change from ` true ` to ` false ` :
6871```
6972FORCE_VERIFYING_SIGNATURE=false
7073```
@@ -78,10 +81,6 @@ Once this field is added, the Dify platform will allow the installation of all p
7881> [ !TIP]
7982> Marketplace need Approval. If stars⭐ reach 100, I'll consider to make PR for them.
8083
81- ## Source code plugin deploy
82- steps are as follows.
83- [ how-to-develop-and-deploy-plugin] ( https://github.com/3dify-project/dify-mcp-client?tab=readme-ov-file#how-to-develop-and-deploy-plugin )
84-
8584## Where does this plugin show up?
8685- It takes few minutes to install
8786- Once installed, you can use it any workflows as Agent node
@@ -104,10 +103,13 @@ MCP Agent Plugin node require config_json like this to command or URL to connect
104103```
105104> [ !WARNING]
106105> - Each server's port number should be different, like 8080, 8008, ...
106+ > - If you want to use stdio mcp server
107+ > - Convert it to SSE mcp server
108+ > - or deploy with source code (** NOT** by .difypkg or GitHub reposity name install)
107109
108110## Chatflow Example
109111![ showcase2] ( ./_assets/everything_mcp_server_test_resource.png )
110- #### I provide this Dify ChatFlow for testing dify mcp plugin as .yml .
112+ #### I provide this Dify ChatFlow ` .yml ` for testing this plugin.
111113https://github.com/3dify-project/dify-mcp-client/tree/main/test/chatflow
112114#### After download DSL(yml) file, import it in Dify and you can test MCP using "Everything MCP server"
113115https://github.com/modelcontextprotocol/servers/tree/main/src/everything
@@ -136,7 +138,7 @@ which npx
136138```
137139where npx
138140```
139-
141+ result
140142```
141143C:\Program Files\nodejs\npx
142144C:\Program Files\nodejs\npx.cmd
@@ -170,12 +172,6 @@ pip install mcp-simple-arxiv
170172mcp-proxy --sse-port=8008 --pass-environment -- C:\Users\USER_NAME\AppData\Local\Programs\Python\Python310\python.exe -m -mcp_simple_arxiv
171173```
172174
173- > [ !Warning]
174- > Additional argument for mcp-proxy. Be careful when you use it. There may be security risk such as XSS, CSRF. (default: no CORS allowed)
175- > ```
176- > --allow-origin='*'
177- > ```
178-
179175Following is a mcp-proxy setup log.
180176```
181177(mcp_proxy) C:\User\USER_NAME\mcp-proxy>mcp-proxy --sse-port=8080 --pass-environment -- C:\Program Files\nodejs\npx.cmd --arg1 -y --arg2 @modelcontextprotocol/server-everything
@@ -191,14 +187,19 @@ INFO: Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
191187
192188# 🔨 How to develop and deploy plugin
193189
194- ### General plugin dev guide
190+ ### Official plugin dev guide
195191https://github.com/3dify-project/dify-mcp-client/blob/main/GUIDE.md
196192
197193### Dify plugin SDK daemon
198- In my case ( Windows 11) , need to download dify-plugin-windows-amd64.exe (v0.0.3 )<br>
199- Choose your OS-compatible verson at here:<br>
194+ If your OS is Windows and CPU is Intel or AMD, you need to download ` dify-plugin-windows-amd64.exe ` (v0.0.7 )<br >
195+ Choose your OS-compatible verson here:<br >
200196https://github.com/langgenius/dify-plugin-daemon/releases <br >
201- Rename it as dify.exe
197+ 1 . Rename it as dify.exe for convinence
198+ 2 . mkdir "C\User\user\\ .local\bin" (Windows) and register it as system path.
199+ 3 . Copy ` dify.exe ` to under dify-mcp-client/
200+ > [ !TIP]
201+ > Following guide is helpful.
202+ > https://docs.dify.ai/plugins/quick-start/develop-plugins/initialize-development-tools
202203
203204### Reference
204205https://docs.dify.ai/plugins/quick-start/develop-plugins/initialize-development-tools
@@ -211,33 +212,26 @@ https://docs.dify.ai/plugins/quick-start/develop-plugins/initialize-development-
211212> Initial settings are as follow
212213> 
213214
215+ ### Change directory
216+ ```
217+ cd dify-mcp-client
218+ ```
219+
214220### Install python module
215- Python3.12+ is compatible. Dify plugin official installation guide use pip , but I used uv .
221+ Python3.12+ is compatible. The `venv` and `uv` are not necessary , but recommended .
216222```
217- uv init --python=python3 .12
223+ uv venv -p 3 .12
218224.venv\Scripts\activate
219225```
220226Install python modules for plugin development
221227```
222- uv add werkzeug==3.0.3
223- uv add flask
224- uv add dify_plugin
228+ uv pip install -r requirements.txt
225229```
226230
227- ### Copy and rename env.example to .env
231+ ### Duplicate `env.example` and rename one to ` .env`
228232I changed `REMOTE_INSTALL_HOST` from `debug.dify.ai` to `localhost`
229233(Docker Compose environment)
230- click bug icon button to see these information
231-
232- ### Change directory
233- ```
234- cd mcp_client
235- ```
236-
237- ### Do Once
238- ```
239- pip install -r requirements.txt
240- ```
234+ click 🪲bug icon button to see these information
241235
242236### Activate Dify plugin
243237```
@@ -249,7 +243,7 @@ python -m main
249243> If you encounter error messages like `handshake failed, invalid key`, renew it.
250244
251245### Package into .difypkg
252- `./mcp_client ` is my default root name
246+ `./dify-mcp-client ` is my default root name
253247```
254248dify plugin package ./ROOT_OF_YOUR_PROJECT
255249```
@@ -264,9 +258,9 @@ https://github.com/modelcontextprotocol/python-sdk
264258<br>
265259
266260> [!TIP]
267- > Especially useful following MCP client example<br>
261+ > MCP client example<br>
268262> https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/clients/simple-chatbot/mcp_simple_chatbot/main.py<br>
269263
270264> [!NOTE]
271265> Dify plugin has `requirements.txt` which automatically installs python modules.<br>
272- > I include `mcp` in it, so you don't need to download the MCP SDK separately.
266+ > I include latest `mcp` in it, so you don't need to download the MCP SDK separately.
0 commit comments