{"id":32321,"date":"2025-07-14T00:04:31","date_gmt":"2025-07-13T16:04:31","guid":{"rendered":"https:\/\/www.kdjingpai.com\/?p=32321"},"modified":"2025-07-14T00:04:31","modified_gmt":"2025-07-13T16:04:31","slug":"shenru-dify-yu-mcp","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/pt\/shenru-dify-yu-mcp\/","title":{"rendered":"\u6df1\u5165 Dify \u4e0e MCP \u751f\u6001\uff1a\u4e00\u4efd\u5168\u9762\u7684\u63d2\u4ef6\u4f7f\u7528\u4e0e\u539f\u7406\u6307\u5357"},"content":{"rendered":"<p>\u5728\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u5e94\u7528\u5f00\u53d1\u4e2d\uff0c\u5982\u4f55\u8ba9\u6a21\u578b\u5b89\u5168\u3001\u9ad8\u6548\u5730\u4e0e\u5916\u90e8\u5de5\u5177\u548c\u6570\u636e\u6e90\u4ea4\u4e92\uff0c\u662f\u4e00\u4e2a\u6838\u5fc3\u6311\u6218\u3002\u6a21\u578b\u4e0a\u4e0b\u6587\u534f\u8bae\uff08Model Context Protocol, MCP\uff09\u6b63\u4e3a\u6b64\u800c\u751f\uff0c\u5b83\u65e8\u5728\u4e3a LLM \u4e0e\u5916\u90e8\u4e16\u754c\u4e4b\u95f4\u5efa\u7acb\u4e00\u5957\u6807\u51c6\u7684\u901a\u4fe1\u89c4\u8303\u3002\u672c\u6587\u5c06\u9996\u5148\u89e3\u6790\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/model-context-protocol\/\">MCP<\/a><\/code>\u00a0\u7684\u6838\u5fc3\u539f\u7406\uff0c\u7136\u540e\u6df1\u5165\u63a2\u8ba8\u5728\u5f00\u6e90 LLM \u5e94\u7528\u5f00\u53d1\u5e73\u53f0\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/dify\/\">Dify<\/a><\/code>\u00a0\u4e2d\uff0c\u5982\u4f55\u5229\u7528\u5176\u4e30\u5bcc\u7684\u00a0<code>MCP<\/code>\u00a0\u63d2\u4ef6\u751f\u6001\u6784\u5efa\u5f3a\u5927\u7684 AI \u5e94\u7528\u3002<\/p>\n<h3>\u7406\u89e3\u57fa\u77f3\uff1aMCP \u4e0e FastMCP<\/h3>\n<p>\u5728\u6df1\u5165\u00a0<code>Dify<\/code>\u00a0\u63d2\u4ef6\u4e4b\u524d\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u7406\u89e3\u00a0<code>MCP<\/code>\u00a0\u662f\u4ec0\u4e48\uff0c\u4ee5\u53ca\u00a0<code>FastMCP<\/code>\u00a0\u5982\u4f55\u7b80\u5316\u4e86\u5b83\u7684\u5b9e\u73b0\u3002<\/p>\n<h4>MCP \u670d\u52a1\u5b9e\u73b0\u539f\u7406<\/h4>\n<p><code>MCP<\/code>\u00a0\u662f\u4e00\u79cd\u57fa\u4e8e\u5ba2\u6237\u7aef-\u670d\u52a1\u5668\u67b6\u6784\u7684\u534f\u8bae\uff0c\u5b83\u901a\u8fc7\u6807\u51c6\u5316\u7684\u6d88\u606f\u683c\u5f0f\uff0c\u8ba9\u5927\u8bed\u8a00\u6a21\u578b\u80fd\u591f\u53d1\u73b0\u5e76\u8c03\u7528\u5916\u90e8\u5de5\u5177\u3002\u5176\u6838\u5fc3\u67b6\u6784\u5305\u542b\u4e09\u90e8\u5206\uff1a<\/p>\n<ul>\n<li><strong>MCP Host<\/strong>: \u7528\u6237\u7684 AI \u5e94\u7528\uff0c\u5982\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/claudeanquanfubai\/\">Claude<\/a> Desktop<\/code>\u00a0\u6216\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/cursoryuaigongtong\/\">Cursor<\/a> IDE<\/code>\uff0c\u8d1f\u8d23\u63a5\u6536\u7528\u6237\u6307\u4ee4\u5e76\u534f\u8c03 LLM\u3002<\/li>\n<li><strong>MCP Client<\/strong>: \u5185\u5d4c\u4e8e\u00a0<code>Host<\/code>\u00a0\u4e2d\u7684\u4e2d\u95f4\u4ef6\uff0c\u8d1f\u8d23\u4e0e\u00a0<code>MCP Server<\/code>\u00a0\u5efa\u7acb\u8fde\u63a5\u548c\u901a\u4fe1\u3002<\/li>\n<li><strong>MCP Server<\/strong>: \u63d0\u4f9b\u5177\u4f53\u529f\u80fd\u7684\u8f7b\u91cf\u7ea7\u670d\u52a1\uff0c\u5b83\u8fde\u63a5\u7740\u6570\u636e\u5e93\u3001API \u7b49\u771f\u5b9e\u4e16\u754c\u7684\u6570\u636e\u548c\u5de5\u5177\u3002<\/li>\n<\/ul>\n<p>\u901a\u4fe1\u5c42\u9762\uff0c<code>MCP<\/code>\u00a0\u534f\u8bae\u57fa\u4e8e\u00a0<code>JSON-RPC 2.0<\/code>\u00a0\u5c01\u88c5\u6d88\u606f\uff0c\u5e76\u652f\u6301\u591a\u79cd\u4f20\u8f93\u6a21\u5f0f\uff0c\u5982\u7528\u4e8e\u672c\u5730\u8fdb\u7a0b\u901a\u4fe1\u7684\u00a0<code>Stdio<\/code>\uff0c\u4ee5\u53ca\u7528\u4e8e\u8fdc\u7a0b\u901a\u4fe1\u7684\u00a0<code>HTTP with SSE<\/code>\u00a0\u548c\u00a0<code>Streamable HTTP<\/code>\u3002\u76ee\u524d\uff0c<code>Streamable HTTP<\/code>\u00a0\u56e0\u5176\u7075\u6d3b\u6027\u548c\u5bf9\u73b0\u4ee3\u7f51\u7edc\u534f\u8bae\u7684\u826f\u597d\u517c\u5bb9\u6027\uff0c\u6210\u4e3a\u63a8\u8350\u7684\u4e3b\u6d41\u4f20\u8f93\u65b9\u5f0f\u3002<\/p>\n<p>\u529f\u80fd\u4e0a\uff0c<code>MCP<\/code>\u00a0\u670d\u52a1\u5668\u4e3b\u8981\u63d0\u4f9b\u4e09\u7c7b\u80fd\u529b\uff1a<\/p>\n<ul>\n<li><strong>\u5de5\u5177 (Tools)<\/strong>: \u53ef\u88ab\u8c03\u7528\u7684\u51fd\u6570\uff0c\u5982\u6587\u4ef6\u64cd\u4f5c\u6216 API \u8bf7\u6c42\u3002<\/li>\n<li><strong>\u8d44\u6e90 (Resources)<\/strong>: \u7c7b\u6587\u4ef6\u5f62\u5f0f\u7684\u6570\u636e\uff0c\u5982\u6570\u636e\u5e93\u8bb0\u5f55\uff0c\u901a\u8fc7 URI \u6807\u8bc6\u3002<\/li>\n<li><strong>\u63d0\u793a (Prompts)<\/strong>: \u9884\u8bbe\u7684\u4ea4\u4e92\u6a21\u677f\uff0c\u7528\u4e8e\u89c4\u8303 LLM \u7684\u8f93\u51fa\u3002<\/li>\n<\/ul>\n<h4>FastMCP\uff1aPythonic \u7684 MCP \u6846\u67b6<\/h4>\n<p><code>FastMCP<\/code>\u00a0\u662f\u4e00\u4e2a\u9ad8\u6548\u7684\u00a0<code>MCP<\/code>\u00a0\u534f\u8bae Python \u5b9e\u73b0\u6846\u67b6\u3002\u5b83\u5c06\u5e95\u5c42\u7684\u00a0<code>JSON-RPC<\/code>\u00a0\u7ec6\u8282\u3001Schema \u6784\u9020\u548c\u901a\u4fe1\u7ba1\u7406\u8fdb\u884c\u4e86\u9ad8\u5ea6\u62bd\u8c61\u548c\u5c01\u88c5\u3002\u5f00\u53d1\u8005\u65e0\u9700\u5173\u5fc3\u590d\u6742\u7684\u534f\u8bae\u7ec6\u8282\uff0c\u53ea\u9700\u901a\u8fc7\u7b80\u5355\u7684 Python \u88c5\u9970\u5668\uff0c\u5c31\u80fd\u5feb\u901f\u6784\u5efa\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/d4cc26d3609189a.png\" alt=\"\" \/><\/p>\n<p>\u4f8b\u5982\uff0c\u4f7f\u7528\u00a0<code>@mcp.tool<\/code>\u00a0\u88c5\u9970\u5668\u53ef\u4ee5\u8f7b\u677e\u5b9a\u4e49\u4e00\u4e2a\u5de5\u5177\uff1a<\/p>\n<pre><code>@mcp.tool\r\ndef multiply(a: float, b: float) -&gt; float:\r\n\"\"\"This tool multiplies two numbers.\"\"\"\r\nreturn a * b\r\n<\/code><\/pre>\n<p><code>FastMCP<\/code>\u00a0\u8fd8\u652f\u6301\u670d\u52a1\u7ec4\u5408\u3001\u4e2d\u95f4\u4ef6\u7b49\u9ad8\u7ea7\u7279\u6027\uff0c\u6781\u5927\u5730\u7b80\u5316\u4e86 AI \u5de5\u5177\u94fe\u7684\u5f00\u53d1\u3002<\/p>\n<h3>Dify \u4e2d\u7684 MCP \u63d2\u4ef6\u751f\u6001<\/h3>\n<p><code>Dify<\/code>\u00a0\u662f\u4e00\u4e2a\u5f00\u6e90\u7684 LLM \u5e94\u7528\u5f00\u53d1\u5e73\u53f0\uff0c\u5b83\u6df1\u5ea6\u96c6\u6210\u4e86\u00a0<code>MCP<\/code>\u00a0\u534f\u8bae\uff0c\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u63d2\u4ef6\u6765\u8fde\u63a5\u548c\u6784\u5efa\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u3002\u8fd9\u4e9b\u63d2\u4ef6\u5927\u81f4\u53ef\u4ee5\u5206\u4e3a\u670d\u52a1\u5668\u7aef\u3001\u5ba2\u6237\u7aef\u548c\u00a0<code>Agent<\/code>\u00a0\u7b56\u7565\u4e09\u7c7b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/f2ead09b6908e95.png\" alt=\"\" \/><\/p>\n<table>\n<thead>\n<tr>\n<th>\u63d2\u4ef6<\/th>\n<th>\u4ecb\u7ecd<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>GitHub \u4ed3\u5e93<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Agent \u7b56\u7565\uff08\u652f\u6301 MCP \u5de5\u5177\uff09<\/strong><\/td>\n<td>\u63d0\u4f9b\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/hanshudiaoyongfunct\/\">Function Calling<\/a><\/code>\u00a0\u548c\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/react\/\">ReAct<\/a><\/code>\u00a0\u7b56\u7565\uff0c\u652f\u6301\u00a0<code>MCP<\/code>\u00a0\u5de5\u5177\u53d1\u73b0\u548c\u8c03\u7528\u3002<\/td>\n<td>\u57fa\u7840<\/td>\n<td>dify-plugin-agent-mcp_sse<\/td>\n<\/tr>\n<tr>\n<td><strong>MCP SSE \/ StreamableHTTP<\/strong><\/td>\n<td>\u4f5c\u4e3a\u00a0<code>MCP<\/code>\u00a0\u5ba2\u6237\u7aef\uff0c\u901a\u8fc7\u00a0<code>HTTP with SSE<\/code>\u00a0\u6216\u00a0<code>Streamable HTTP<\/code>\u00a0\u53d1\u73b0\u548c\u8c03\u7528\u5de5\u5177\u3002<\/td>\n<td>\u57fa\u7840<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td><strong>MCP Agent \u7b56\u7565<\/strong><\/td>\n<td>\u4ec5\u652f\u6301\u00a0<code>Function Calling<\/code>\u00a0\u7b56\u7565\u7684\u00a0<code>Agent<\/code>\uff0c\u7528\u4e8e\u8c03\u7528\u00a0<code>MCP<\/code>\u00a0\u5de5\u5177\u3002<\/td>\n<td>\u57fa\u7840<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td><strong>MCP server<\/strong><\/td>\n<td>\u5c06\u00a0<code>Dify<\/code>\u00a0\u7684\u5de5\u4f5c\u6d41\u6216\u5bf9\u8bdd\u6d41\u53d1\u5e03\u4e3a\u4e00\u4e2a\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u5668\u3002<\/td>\n<td>\u57fa\u7840<\/td>\n<td>dify-plugin-mcp_server<\/td>\n<\/tr>\n<tr>\n<td><strong>MCP Compatible Dify Tools<\/strong><\/td>\n<td>\u5c06\u00a0<code>Dify<\/code>\u00a0\u5185\u7f6e\u5de5\u5177\u7684 API \u8f6c\u6362\u4e3a\u00a0<code>MCP<\/code>\u00a0\u517c\u5bb9\u7684 API\u3002<\/td>\n<td>\u57fa\u7840<\/td>\n<td>dify-plugin-mcp_compat_dify_tools<\/td>\n<\/tr>\n<tr>\n<td><strong>\u4f7f\u7528\u65f6\u914d\u7f6e\u7684 MCP \u5de5\u5177<\/strong><\/td>\n<td>\u4e00\u4e2a\u00a0<code>MCP<\/code>\u00a0\u5ba2\u6237\u7aef\uff0c\u5176\u670d\u52a1\u5730\u5740\u5728\u4f7f\u7528\u65f6\u52a8\u6001\u914d\u7f6e\u3002<\/td>\n<td>\u57fa\u7840<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td><strong>Nacos MCP<\/strong><\/td>\n<td>\u4ece\u00a0<code>Nacos<\/code>\u00a0\u6ce8\u518c\u4e2d\u5fc3\u53d1\u73b0\u5e76\u8c03\u7528\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u3002<\/td>\n<td>\u5e94\u7528<\/td>\n<td>nacos-dify-plugins<\/td>\n<\/tr>\n<tr>\n<td><strong>AntV \u53ef\u89c6\u5316\u56fe\u8868<\/strong><\/td>\n<td>\u57fa\u4e8e\u00a0<code>AntV<\/code>\u00a0\u7684\u56fe\u8868\u751f\u6210\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u3002<\/td>\n<td>\u5e94\u7528<\/td>\n<td>mcp-server-chart<\/td>\n<\/tr>\n<tr>\n<td><strong>HelloDB<\/strong><\/td>\n<td>\u6570\u636e\u5e93\u67e5\u8be2\u52a9\u624b\uff0c\u5c06\u6570\u636e\u5e93\u80fd\u529b\u5c01\u88c5\u4e3a\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u3002<\/td>\n<td>\u5e94\u7528<\/td>\n<td>HelloDB Wiki<\/td>\n<\/tr>\n<tr>\n<td><strong>DataFocus<\/strong><\/td>\n<td>\u63d0\u4f9b\u5e7b\u89c9\u53ef\u63a7\u7684\u00a0<code>Text2SQL<\/code>\u00a0\u548c\u00a0<code>ChatBI<\/code>\u00a0\u63d2\u4ef6\u3002<\/td>\n<td>\u5e94\u7528<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6838\u5fc3\u63d2\u4ef6\u4f7f\u7528\u6307\u5357<\/h3>\n<h4>\u63d2\u4ef6\u7c7b\u578b\u4e00\uff1a\u5c06 Dify \u5e94\u7528\u53d1\u5e03\u4e3a MCP \u670d\u52a1<\/h4>\n<p>\u8fd9\u7c7b\u63d2\u4ef6\u7684\u76ee\u6807\u662f\u5c06\u4f60\u5728\u00a0<code>Dify<\/code>\u00a0\u4e2d\u521b\u5efa\u597d\u7684\u80fd\u529b\uff08\u5982\u5de5\u4f5c\u6d41\u3001\u5bf9\u8bdd\u6d41\u6216\u5355\u4e2a\u5de5\u5177\uff09\u66b4\u9732\u4e3a\u6807\u51c6\u7684\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\uff0c\u4f9b\u5176\u4ed6\u00a0<code>MCP<\/code>\u00a0\u5ba2\u6237\u7aef\u8c03\u7528\u3002<\/p>\n<ul>\n<li><strong>MCP server<\/strong>: \u8fd9\u4e2a\u63d2\u4ef6\u53ef\u4ee5\u5c06\u4e00\u4e2a\u5b8c\u6574\u7684\u00a0<code>Dify<\/code>\u00a0\u5de5\u4f5c\u6d41\u6216\u5bf9\u8bdd\u6d41\u5c01\u88c5\u6210\u4e00\u4e2a\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u5668\u3002\u914d\u7f6e\u7aef\u70b9\u540e\uff0c\u5916\u90e8\u5e94\u7528\u5c31\u80fd\u50cf\u8c03\u7528\u4e00\u4e2a\u539f\u751f\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u4e00\u6837\uff0c\u4e0e\u4f60\u7684\u00a0<code>Dify<\/code>\u00a0\u5e94\u7528\u4ea4\u4e92\u3002\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/3d3e711c128e88b.png\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/f974156aa9ac37e.png\" alt=\"\" \/><\/li>\n<li><strong>MCP Compatible Dify Tools<\/strong>: \u5982\u679c\u4f60\u4e0d\u60f3\u66b4\u9732\u6574\u4e2a\u5de5\u4f5c\u6d41\uff0c\u53ea\u60f3\u5c06\u00a0<code>Dify<\/code>\u00a0\u7684\u67d0\u4e2a\u539f\u751f\u5de5\u5177\uff08\u5982\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff09\u53d1\u5e03\u4e3a\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\uff0c\u8fd9\u4e2a\u63d2\u4ef6\u662f\u6700\u4f73\u9009\u62e9\u3002\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/6395ead4d52f1bf.png\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/14bfe513552eb51.png\" alt=\"\" \/><\/li>\n<\/ul>\n<h4>\u63d2\u4ef6\u7c7b\u578b\u4e8c\uff1a\u5728 Dify \u4e2d\u8c03\u7528\u5916\u90e8 MCP \u670d\u52a1<\/h4>\n<p>\u8fd9\u7c7b\u63d2\u4ef6\u626e\u6f14\u00a0<code>MCP<\/code>\u00a0\u5ba2\u6237\u7aef\u7684\u89d2\u8272\uff0c\u8ba9\u4f60\u7684\u00a0<code>Dify<\/code>\u00a0\u5e94\u7528\u80fd\u591f\u8c03\u7528\u5916\u90e8\u7684\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u3002<\/p>\n<ul>\n<li><strong>MCP SSE \/ StreamableHTTP<\/strong>: \u8fd9\u662f\u4e00\u4e2a\u6807\u51c6\u7684\u00a0<code>MCP<\/code>\u00a0\u5ba2\u6237\u7aef\u5de5\u5177\u3002\u4f60\u53ea\u9700\u63d0\u4f9b\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u7684\u5730\u5740\uff0c\u5b83\u5c31\u80fd\u81ea\u52a8\u53d1\u73b0\u8be5\u670d\u52a1\u63d0\u4f9b\u7684\u6240\u6709\u5de5\u5177\uff0c\u5e76\u5728\u00a0<code>Dify<\/code>\u00a0\u5de5\u4f5c\u6d41\u4e2d\u76f4\u63a5\u8c03\u7528\u3002\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/bcc2777d2232d4f.png\" alt=\"\" \/><\/li>\n<li><strong>\u4f7f\u7528\u65f6\u914d\u7f6e\u7684 MCP \u5de5\u5177<\/strong>: \u4e0e\u4e0a\u4e00\u4e2a\u63d2\u4ef6\u529f\u80fd\u7c7b\u4f3c\uff0c\u4f46\u5b83\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7684\u7075\u6d3b\u6027\uff0c\u5141\u8bb8\u5728\u6bcf\u6b21\u8c03\u7528\u65f6\u52a8\u6001\u914d\u7f6e\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u5730\u5740\u3002\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/663efc02e0e47d3.png\" alt=\"\" \/><\/li>\n<\/ul>\n<h4>\u63d2\u4ef6\u7c7b\u578b\u4e09\uff1aAgent \u7b56\u7565<\/h4>\n<p><code>Agent<\/code>\u00a0\u662f\u00a0<code>Dify<\/code>\u00a0\u5de5\u4f5c\u6d41\u4e2d\u7684\u5927\u8111\uff0c\u5b83\u51b3\u5b9a\u4e86\u5982\u4f55\u89c4\u5212\u548c\u6267\u884c\u591a\u6b65\u4efb\u52a1\u3002<code>MCP<\/code>\u00a0\u7b56\u7565\u63d2\u4ef6\u8d4b\u4e88\u4e86\u00a0<code>Agent<\/code>\u00a0\u8c03\u7528\u00a0<code>MCP<\/code>\u00a0\u5de5\u5177\u7684\u80fd\u529b\u3002<\/p>\n<ul>\n<li><strong>Agent \u7b56\u7565\uff08\u652f\u6301 MCP \u5de5\u5177\uff09<\/strong>: \u8fd9\u662f\u529f\u80fd\u6700\u5168\u9762\u7684\u00a0<code>Agent<\/code>\u00a0\u7b56\u7565\u63d2\u4ef6\u3002\u5b83\u540c\u65f6\u652f\u6301\u00a0<code>Function Calling<\/code>\u00a0\u548c\u00a0<code>ReAct<\/code>\u00a0\u4e24\u79cd\u6a21\u5f0f\u3002\n<ul>\n<li><strong>Function Calling<\/strong>: \u6a21\u578b\u76f4\u63a5\u51b3\u5b9a\u8c03\u7528\u54ea\u4e2a\u5de5\u5177\u5e76\u6267\u884c\u3002<\/li>\n<li><strong>ReAct<\/strong>: \u6a21\u578b\u4f1a\u8fdb\u884c\u201c\u601d\u8003-\u884c\u52a8-\u89c2\u5bdf\u201d\u7684\u5faa\u73af\uff0c\u66f4\u9002\u5408\u5904\u7406\u590d\u6742\u3001\u9700\u8981\u591a\u6b65\u63a8\u7406\u7684\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/d72ddf94c183574.png\" alt=\"\" \/><\/li>\n<li><strong>MCP Agent \u7b56\u7565<\/strong>: \u8fd9\u662f\u4e00\u4e2a\u66f4\u8f7b\u91cf\u7ea7\u7684\u00a0<code>Agent<\/code>\u00a0\u7b56\u7565\uff0c\u5b83\u4ec5\u652f\u6301\u00a0<code>Function Calling<\/code>\u00a0\u6a21\u5f0f\u3002\u5982\u679c\u4f60\u7684\u4efb\u52a1\u903b\u8f91\u76f8\u5bf9\u7b80\u5355\uff0c\u76f4\u63a5\u8c03\u7528\u5de5\u5177\u5373\u53ef\u5b8c\u6210\uff0c\u90a3\u4e48\u8fd9\u4e2a\u63d2\u4ef6\u662f\u66f4\u9ad8\u6548\u7684\u9009\u62e9\u3002\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/71ac2036254f6ab.png\" alt=\"\" \/><\/li>\n<\/ul>\n<h3>\u6280\u672f\u7ec6\u8282\uff1aSSE \u4e0e Streamable HTTP \u7684\u6289\u62e9<\/h3>\n<p><code>MCP<\/code>\u00a0\u534f\u8bae\u652f\u6301\u591a\u79cd\u4f20\u8f93\u65b9\u5f0f\uff0c\u5176\u4e2d\u00a0<code>HTTP with SSE<\/code>\u00a0\u548c\u00a0<code>Streamable HTTP<\/code>\u00a0\u662f\u8fdc\u7a0b\u901a\u4fe1\u7684\u4e24\u79cd\u4e3b\u8981\u9009\u62e9\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>\u6bd4\u8f83\u7ef4\u5ea6<\/strong><\/th>\n<th><strong>HTTP with SSE (Server-Sent Events)<\/strong><\/th>\n<th><strong>Streamable HTTP (\u53ef\u6d41\u5f0f\u4f20\u8f93\u7684\u666e\u901a HTTP\/Fetch)<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u534f\u8bae\u5c42<\/strong><\/td>\n<td>\u57fa\u4e8e HTTP\/1.1 \u957f\u8fde\u63a5\uff0c\u5c01\u88c5\u4e86\u4e8b\u4ef6\u5e27\u8bed\u6cd5\u3002<\/td>\n<td>\u6807\u51c6 HTTP\uff0c\u4f9d\u8d56\u5206\u5757\u4f20\u8f93\u7f16\u7801\uff0c\u65e0\u56fa\u5b9a\u5e27\u683c\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u901a\u4fe1\u65b9\u5411<\/strong><\/td>\n<td>\u5355\u5411\uff08\u670d\u52a1\u5668 \u2192 \u5ba2\u6237\u7aef\uff09\u3002<\/td>\n<td>\u53ef\u53cc\u5411\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u6d4f\u89c8\u5668 API<\/strong><\/td>\n<td><code>EventSource<\/code>\u00a0\u5bf9\u8c61\uff0c\u5185\u7f6e\u81ea\u52a8\u91cd\u8fde\u3002<\/td>\n<td><code>fetch()<\/code>\u00a0+\u00a0<code>ReadableStream<\/code>\uff0c\u91cd\u8fde\u9700\u81ea\u5199\u903b\u8f91\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u5e27\/\u6d88\u606f\u683c\u5f0f<\/strong><\/td>\n<td>\u6587\u672c\u683c\u5f0f\uff0c\u652f\u6301\u4e8b\u4ef6\u5206\u7ec4\u4e0e ID\u3002<\/td>\n<td>\u683c\u5f0f\u81ea\u7531\uff0c\u53ef\u4f20\u00a0<code>NDJSON<\/code>\u3001\u4e8c\u8fdb\u5236\u5206\u7247\u7b49\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u5fc3\u8df3\u4e0e\u91cd\u8fde<\/strong><\/td>\n<td>\u5185\u90e8\u652f\u6301\u3002<\/td>\n<td>\u9700\u81ea\u884c\u5b9e\u73b0\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u5178\u578b\u573a\u666f<\/strong><\/td>\n<td>\u5b9e\u65f6\u901a\u77e5\u3001\u65e5\u5fd7\u63a8\u9001\u3002<\/td>\n<td>AI <a href=\"https:\/\/www.kdjingpai.com\/tokenization\/\">token<\/a> \u6d41\u5f0f\u8fd4\u56de\u3001\u5927\u6587\u4ef6\u4e0b\u8f7d\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u4f18\u52a3\u6982\u62ec<\/strong><\/td>\n<td>\u5b9e\u73b0\u7b80\u5355\uff0c\u4f46\u4ec5\u5355\u5411\/\u7eaf\u6587\u672c\u3002<\/td>\n<td>\u7075\u6d3b\u9ad8\u6548\uff0c\u4f46\u9700\u81ea\u884c\u5904\u7406\u9519\u8bef\u6062\u590d\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u9009\u62e9\u5efa\u8bae<\/strong>: \u9664\u975e\u9700\u8981\u517c\u5bb9\u65e7\u7248\u5b9e\u73b0\uff0c\u5426\u5219\u5e94\u4f18\u5148\u9009\u62e9\u00a0<strong>Streamable HTTP<\/strong>\u3002\u5b83\u66f4\u7075\u6d3b\uff0c\u80fd\u66f4\u597d\u5730\u5229\u7528\u00a0<code>HTTP\/2<\/code>\u00a0\u548c\u00a0<code>HTTP\/3<\/code>\u00a0\u7684\u591a\u8def\u590d\u7528\u4f18\u52bf\uff0c\u662f\u73b0\u4ee3\u00a0<code>MCP<\/code>\u00a0\u5e94\u7528\u7684\u9996\u9009\u4f20\u8f93\u65b9\u6848\u3002<\/p>\n<h3>MCP \u751f\u6001\u7cfb\u7edf\uff1a\u670d\u52a1\u4e0e\u5e73\u53f0<\/h3>\n<p><code>MCP<\/code>\u00a0\u7684\u4ef7\u503c\u5728\u4e8e\u5176\u751f\u6001\u3002\u9664\u4e86\u00a0<code>Dify<\/code>\uff0c\u8fd8\u6709\u8bb8\u591a\u5e73\u53f0\u548c\u670d\u52a1\u4e3a\u00a0<code>MCP<\/code>\u00a0\u63d0\u4f9b\u4e86\u652f\u6301\u3002<\/p>\n<h4>\u963f\u91cc\u4e91\u4e0e ModelScope<\/h4>\n<p>\u963f\u91cc\u4e91\u548c\u5176\u00a0<code>ModelScope<\/code>\u00a0\u793e\u533a\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u00a0<code>MCP<\/code>\u00a0\u8d44\u6e90\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>ModeScope MCP \u5e7f\u573a<\/strong>: \u805a\u5408\u4e86\u5927\u91cf\u4f18\u8d28\u7684\u00a0<code>MCP<\/code>\u00a0\u8d44\u6e90\uff0c\u62d3\u5c55\u6a21\u578b\u7684\u80fd\u529b\u8fb9\u754c\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/8adb48bb16bbe1a.png\" alt=\"\" \/><\/li>\n<li><strong>ModelScope MCP \u5b9e\u9a8c\u573a<\/strong>: \u63d0\u4f9b\u4e86\u5728\u7ebf\u73af\u5883\uff0c\u7528\u4e8e\u63a2\u7d22\u5f00\u6e90\u6a21\u578b\u4e0e\u00a0<code>MCP Server<\/code>\u00a0\u7684\u81ea\u7531\u7ec4\u5408\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/08ad697e77fcf80.png\" alt=\"\" \/><\/li>\n<li><strong>\u767e\u70bc MCP \u670d\u52a1<\/strong>: \u963f\u91cc\u4e91\u767e\u70bc\u5e73\u53f0\u63d0\u4f9b\u5168\u5468\u671f\u7684\u00a0<code>MCP<\/code>\u00a0\u6258\u7ba1\u4e0e\u5e02\u573a\u670d\u52a1\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/07\/e0277b540b8d4e3.png\" alt=\"\" \/><\/li>\n<\/ul>\n<h4>\u7b2c\u4e09\u65b9 MCP \u6258\u7ba1\u5e73\u53f0<\/h4>\n<p>\u5982\u679c\u4f60\u4e0d\u60f3\u81ea\u5df1\u90e8\u7f72\u548c\u7ef4\u62a4\u00a0<code>MCP<\/code>\u00a0\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7b2c\u4e09\u65b9\u6258\u7ba1\u5e73\u53f0\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5e73\u53f0\u540d\u79f0<\/th>\n<th>\u4ecb\u7ecd<\/th>\n<th>\u94fe\u63a5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Composio<\/strong><\/td>\n<td>\u9762\u5411\u5f00\u53d1\u8005\u7684\u4e13\u4e1a\u00a0<code>MCP<\/code>\u00a0\u6258\u7ba1\u5e73\u53f0\uff0c\u63d0\u4f9b\u4e0a\u767e\u79cd\u9884\u96c6\u6210\u5de5\u5177\u548c\u4f01\u4e1a\u7ea7\u529f\u80fd\u3002<\/td>\n<td>https:\/\/mcp.composio.dev\/<\/td>\n<\/tr>\n<tr>\n<td><strong>Zapier MCP<\/strong><\/td>\n<td>\u5c06\u00a0<code>MCP<\/code>\u00a0\u63a5\u5165\u5176\u5e9e\u5927\u7684 7000+ \u5e94\u7528\u751f\u6001\uff0c\u9002\u5408\u5feb\u901f\u8fde\u63a5\u5404\u7c7b\u529e\u516c\u548c\u4f01\u4e1a\u8f6f\u4ef6\u3002<\/td>\n<td>https:\/\/zapier.com\/mcp<\/td>\n<\/tr>\n<tr>\n<td><strong>MCP.so<\/strong><\/td>\n<td>\u793e\u533a\u9a71\u52a8\u7684\u00a0<code>MCP<\/code>\u00a0\u805a\u5408\u5e73\u53f0\uff0c\u63d0\u4f9b\u5927\u91cf\u793a\u4f8b\u548c Playground\uff0c\u9002\u5408\u5b66\u4e60\u548c\u5b9e\u9a8c\u3002<\/td>\n<td>https:\/\/mcp.so\/playground<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e09\u8005\u5b9a\u4f4d\u5404\u4e0d\u76f8\u540c\uff1a<code><a href=\"https:\/\/www.kdjingpai.com\/composio\/\">Composio<\/a><\/code>\u00a0\u5f3a\u8c03\u4e13\u4e1a\u6258\u7ba1\u4e0e\u751f\u4ea7\u7ea7\u5e94\u7528\uff1b<code>Zapier MCP<\/code>\u00a0\u4fa7\u91cd\u4e8e\u8fde\u63a5\u5176\u5e9e\u5927\u7684\u5e94\u7528\u751f\u6001\uff0c\u5b9e\u73b0\u4f4e\u4ee3\u7801\u81ea\u52a8\u5316\uff1b\u800c\u00a0<code>MCP.so<\/code>\u00a0\u5219\u662f\u5b66\u4e60\u548c\u539f\u578b\u9a8c\u8bc1\u7684\u7edd\u4f73\u793e\u533a\u8d44\u6e90\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u5e94\u7528\u5f00\u53d1\u4e2d\uff0c\u5982\u4f55\u8ba9\u6a21\u578b\u5b89\u5168\u3001\u9ad8\u6548\u5730\u4e0e\u5916\u90e8\u5de5\u5177\u548c\u6570\u636e\u6e90\u4ea4\u4e92\uff0c\u662f\u4e00\u4e2a\u6838\u5fc3\u6311\u6218\u3002\u6a21\u578b\u4e0a\u4e0b\u6587\u534f\u8bae\uff08Model Context Protocol, MCP\uff09\u6b63\u4e3a\u6b64\u800c\u751f\uff0c\u5b83\u65e8\u5728\u4e3a LLM \u4e0e\u5916\u90e8\u4e16\u754c\u4e4b\u95f4\u5efa\u7acb\u4e00\u5957\u6807\u51c6\u7684\u901a\u4fe1\u89c4\u8303\u3002\u672c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182],"tags":[],"class_list":["post-32321","post","type-post","status-publish","format-standard","hentry","category-shicao"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/32321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/comments?post=32321"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/32321\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media?parent=32321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/categories?post=32321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/tags?post=32321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}