{"id":96528,"date":"2026-08-27T20:40:28","date_gmt":"2026-08-27T12:40:28","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/96528.html"},"modified":"2026-08-27T20:40:28","modified_gmt":"2026-08-27T12:40:28","slug":"%e7%94%a8-mcp-%e8%ae%a9-ai-%e6%9b%bf%e4%bd%a0%e7%94%bb%e5%9b%be%ef%bc%9atrae-work-drawio-mcp-%e5%ae%8c%e6%95%b4%e6%90%ad%e5%bb%ba%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/96528.html","title":{"rendered":"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357"},"content":{"rendered":"<h2>\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe&#xff1a;Trae Work &#043; drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357<\/h2>\n<p>\u4ece\u300c\u8bf4\u4e00\u53e5\u8bdd\u81ea\u52a8\u751f\u6210\u67b6\u6784\u56fe\u300d\u5230\u300cNode.js 22 \u517c\u5bb9\u6027\u4fee\u590d\u300d&#xff0c;\u8fd9\u7bc7\u535a\u6587\u8bb0\u5f55\u4e86\u5b8c\u6574\u7684\u8e29\u5751\u4e0e\u89e3\u51b3\u8fc7\u7a0b\u3002<\/p>\n<h3>\u524d\u8a00&#xff1a;\u5f53 AI \u80fd\u753b\u56fe<\/h3>\n<p>2024 \u5e74 11 \u6708&#xff0c;Anthropic \u5f00\u6e90\u4e86 Model Context Protocol&#xff08;MCP&#xff09;&#xff0c;\u88ab\u4e1a\u754c\u79f0\u4e3a \u300cAI \u9886\u57df\u7684 USB-C\u300d\u3002\u5b83\u89e3\u51b3\u4e86 AI \u5de5\u5177\u96c6\u6210\u9886\u57df\u7684\u7ecf\u5178 N\u00d7M \u95ee\u9898&#xff1a;\u6bcf\u63a5\u5165\u4e00\u4e2a\u65b0\u6570\u636e\u6e90&#xff0c;\u90fd\u8981\u4e3a\u6bcf\u4e2a AI \u5e94\u7528\u5355\u72ec\u5199\u96c6\u6210\u4ee3\u7801\u3002MCP \u63d0\u4f9b\u4e86\u4e00\u4e2a\u7edf\u4e00\u6807\u51c6&#xff0c;\u8ba9\u4efb\u4f55 AI \u5e94\u7528\u53ea\u9700\u5b9e\u73b0\u4e00\u6b21 MCP Client&#xff0c;\u5c31\u80fd\u8fde\u63a5\u6240\u6709 MCP Server&#xff1b;\u4efb\u4f55\u5de5\u5177\u53ea\u9700\u5b9e\u73b0\u4e00\u6b21 MCP Server&#xff0c;\u5c31\u80fd\u88ab\u6240\u6709 AI \u5e94\u7528\u8bbf\u95ee\u3002<\/p>\n<p>\u4e00\u5e74\u540e&#xff0c;MCP \u5df2\u88ab OpenAI\u3001Google\u3001Microsoft \u7b49\u4e3b\u6d41\u5382\u5546\u91c7\u7eb3&#xff0c;\u751f\u6001\u4e2d\u6709 \u8d85\u8fc7 6800 \u4e2a MCP Server&#xff0c;\u8986\u76d6\u6587\u4ef6\u7cfb\u7edf\u3001\u6570\u636e\u5e93\u3001\u6d4f\u89c8\u5668\u81ea\u52a8\u5316\u3001\u7ed8\u56fe\u5de5\u5177\u7b49\u65b9\u65b9\u9762\u9762\u3002<\/p>\n<p>\u672c\u6587\u8bb0\u5f55\u7684\u662f\u5982\u4f55\u5728 Windows 11 \u4e0a\u642d\u5efa \u300cTrae Work &#043; drawio-mcp\u300d \u73af\u5883&#xff0c;\u8ba9 AI \u80fd\u591f\u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u76f4\u63a5\u751f\u6210\u67b6\u6784\u56fe\u3001\u6d41\u7a0b\u56fe&#xff0c;\u65e0\u9700\u6253\u5f00\u4efb\u4f55\u7ed8\u56fe\u8f6f\u4ef6\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u6280\u672f\u80cc\u666f<\/h3>\n<h4>1.1 \u4ec0\u4e48\u662f MCP&#xff1f;<\/h4>\n<p>Model Context Protocol&#xff08;MCP&#xff09; \u662f Anthropic \u4e8e 2024 \u5e74 11 \u6708\u53d1\u5e03\u7684\u5f00\u653e\u6807\u51c6&#xff0c;\u7528\u4e8e\u8fde\u63a5 AI \u5e94\u7528\u4e0e\u5916\u90e8\u5de5\u5177\u548c\u6570\u636e\u6e90\u3002\u5176\u67b6\u6784\u5206\u4e3a\u4e09\u5c42&#xff1a;<\/p>\n<ul>\n<li>Host&#xff08;\u5bbf\u4e3b&#xff09;&#xff1a;\u7528\u6237\u76f4\u63a5\u4ea4\u4e92\u7684 AI \u5e94\u7528&#xff0c;\u5982 Claude Desktop\u3001Cursor\u3001Trae<\/li>\n<li>Client&#xff08;\u5ba2\u6237\u7aef&#xff09;&#xff1a;Host \u5185\u90e8\u7684\u534f\u8bae\u5c42\u7ec4\u4ef6&#xff0c;\u8d1f\u8d23\u4e0e Server \u901a\u4fe1<\/li>\n<li>Server&#xff08;\u670d\u52a1\u5668&#xff09;&#xff1a;\u5de5\u5177\u4e0e\u6570\u636e\u7684\u63d0\u4f9b\u8005&#xff0c;\u66b4\u9732 Tools\u3001Resources\u3001Prompts \u4e09\u79cd\u80fd\u529b<\/li>\n<\/ul>\n<p>MCP \u7684\u901a\u4fe1\u57fa\u4e8e JSON-RPC 2.0&#xff0c;\u652f\u6301 stdio&#xff08;\u672c\u5730&#xff09;\u548c HTTP&#043;SSE&#xff08;\u8fdc\u7a0b&#xff09;\u4e24\u79cd\u4f20\u8f93\u65b9\u5f0f\u3002\u76f8\u6bd4 OpenAI \u7684 Function Calling&#xff0c;MCP \u7684\u4f18\u52bf\u5728\u4e8e&#xff1a;<\/p>\n<table>\n<tr>\u7279\u6027MCPFunction Calling<\/tr>\n<tbody>\n<tr>\n<td>\u534f\u8bae\u6807\u51c6<\/td>\n<td>\u5f00\u653e\u89c4\u8303&#xff08;JSON-RPC 2.0&#xff09;<\/td>\n<td>OpenAI \u79c1\u6709 API<\/td>\n<\/tr>\n<tr>\n<td>\u8fde\u63a5\u72b6\u6001<\/td>\n<td>\u6709\u72b6\u6001&#xff08;\u6301\u4e45\u8fde\u63a5&#xff09;<\/td>\n<td>\u65e0\u72b6\u6001&#xff08;\u6bcf\u6b21\u8bf7\u6c42&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u5177\u53d1\u73b0<\/td>\n<td>\u81ea\u52a8&#xff08;tools\/list&#xff09;<\/td>\n<td>\u624b\u52a8\u4f20\u5165\u5de5\u5177\u6e05\u5355<\/td>\n<\/tr>\n<tr>\n<td>\u8d44\u6e90\u7ba1\u7406<\/td>\n<td>\u539f\u751f\u652f\u6301<\/td>\n<td>\u4e0d\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u6a21\u578b\u652f\u6301<\/td>\n<td>\u5382\u5546\u4e2d\u7acb<\/td>\n<td>\u4ec5 OpenAI<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.2 drawio-mcp \u662f\u4ec0\u4e48&#xff1f;<\/h4>\n<p>drawio-mcp \u662f\u4e00\u4e2a\u5f00\u6e90 MCP Server&#xff0c;\u5141\u8bb8 AI \u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u521b\u5efa\u548c\u7ba1\u7406 Draw.io \u56fe\u8868\u3002\u5b83\u57fa\u4e8e mxGraph \u5f15\u64ce&#xff0c;\u76f4\u63a5\u751f\u6210 .drawio.svg \u6587\u4ef6&#xff0c;\u65e0\u9700\u5b89\u88c5 Draw.io Desktop \u5ba2\u6237\u7aef\u3002<\/p>\n<p>\u9879\u76ee\u4fe1\u606f&#xff1a;<\/p>\n<ul>\n<li>\u4f5c\u8005&#xff1a;Sujimoshi<\/li>\n<li>GitHub&#xff1a;https:\/\/github.com\/Sujimoshi\/drawio-mcp<\/li>\n<li>\u7248\u672c&#xff1a;v1.6.0<\/li>\n<li>npm \u5305&#xff1a;drawio-mcp<\/li>\n<li>Node \u8981\u6c42&#xff1a;\u2265 18.0.0<\/li>\n<\/ul>\n<p>\u6838\u5fc3\u5de5\u5177&#xff08;\u5171 6 \u4e2a&#xff0c;\u5747\u652f\u6301\u6279\u91cf\u64cd\u4f5c&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u5de5\u5177\u540d\u529f\u80fd\u6279\u91cf\u652f\u6301<\/tr>\n<tbody>\n<tr>\n<td>new_diagram<\/td>\n<td>\u521b\u5efa\u65b0\u56fe\u8868\u6587\u4ef6<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>add_nodes<\/td>\n<td>\u6dfb\u52a0\u8282\u70b9<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>link_nodes<\/td>\n<td>\u8fde\u63a5\u8282\u70b9<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>edit_nodes<\/td>\n<td>\u7f16\u8f91\u8282\u70b9\u5c5e\u6027<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>remove_nodes<\/td>\n<td>\u5220\u9664\u8282\u70b9<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>get_diagram_info<\/td>\n<td>\u83b7\u53d6\u56fe\u8868\u4fe1\u606f<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u652f\u6301\u7684\u8282\u70b9\u7c7b\u578b&#xff1a;Rectangle\u3001RoundedRectangle\u3001Ellipse\u3001Cylinder\u3001Cloud\u3001Actor\u3001Text\u3001Step \u7b49\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u73af\u5883\u51c6\u5907<\/h3>\n<h4>2.1 \u7cfb\u7edf\u73af\u5883<\/h4>\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7edf&#xff1a;Windows 11<\/li>\n<li>Node.js&#xff1a;v22.22.3<\/li>\n<li>Trae&#xff1a;TRAE SOLO CN&#xff08;\u56fd\u5185\u7248&#xff09;<\/li>\n<li>npm global \u8def\u5f84&#xff1a;C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\npm-global<\/li>\n<\/ul>\n<h4>2.2 \u73af\u5883\u68c0\u67e5<\/h4>\n<p>\u5728 PowerShell \u4e2d\u8fd0\u884c&#xff1a;<\/p>\n<p>node <span class=\"token operator\">&#8212;<\/span>version<br \/>\nnpm <span class=\"token operator\">&#8212;<\/span>version<br \/>\nnpm config get prefix<\/p>\n<p>\u786e\u8ba4 Node.js \u7248\u672c \u2265 18&#xff0c;npm global \u8def\u5f84\u6b63\u786e\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u8e29\u5751\u4e0e\u89e3\u51b3<\/h3>\n<h4>3.1 \u95ee\u9898\u4e00&#xff1a;npm registry \u914d\u7f6e\u51b2\u7a81<\/h4>\n<h5>\u73b0\u8c61<\/h5>\n<p>\u6267\u884c npm install -g drawio-mcp \u65f6&#xff0c;\u4e0b\u8f7d\u5361\u4f4f\u5e76\u62a5\u9519&#xff1a;<\/p>\n<p>npm http fetch GET https:\/\/registry.npmjs.org\/drawio-mcp attempt 1 failed with ENOTFOUND<br \/>\nnpm http fetch GET https:\/\/registry.npmjs.org\/drawio-mcp attempt 2 failed with ETIMEDOUT<br \/>\nnpm error code ETIMEDOUT<\/p>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>\u901a\u8fc7 npm config list &#8211;json \u68c0\u67e5\u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;registry&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;https:\/\/registry.npmmirror.com&#034;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5168\u5c40\u914d\u7f6e\u663e\u793a\u4f7f\u7528 npmmirror&#xff08;\u56fd\u5185\u955c\u50cf&#xff09;&#xff0c;\u4f46\u5b9e\u9645\u4e0b\u8f7d\u5374\u8d70\u4e86 registry.npmjs.org&#xff08;\u5b98\u65b9\u6e90&#xff0c;\u56fd\u5185\u88ab\u5c01&#xff09;\u3002<\/p>\n<p>\u8fdb\u4e00\u6b65\u68c0\u67e5\u53d1\u73b0 C:\\\\Users\\\\yueli\\\\.npmrc \u6587\u4ef6\u4e2d\u5199\u4e86&#xff1a;<\/p>\n<p>registry&#061;https:\/\/registry.npmjs.org<\/p>\n<p>npm \u914d\u7f6e\u4f18\u5148\u7ea7&#xff1a;\u7528\u6237\u7ea7 .npmrc &gt; \u5168\u5c40\u914d\u7f6e &gt; \u9879\u76ee\u7ea7 .npmrc\u3002\u7528\u6237\u7ea7 .npmrc \u8986\u76d6\u4e86\u5168\u5c40\u7684 npmmirror \u8bbe\u7f6e\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>\u4fee\u6539 C:\\\\Users\\\\yueli\\\\.npmrc&#xff0c;\u7edf\u4e00\u4f7f\u7528 npmmirror&#xff1a;<\/p>\n<p>prefix&#061;C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\npm-global<br \/>\ncache&#061;C:\\\\Users\\\\yueli\\\\AppData\\\\Local\\\\Temp\\\\fwpack_fdf61eb6\\\\.npm<br \/>\nregistry&#061;https:\/\/registry.npmmirror.com<\/p>\n<p>\u91cd\u65b0\u5b89\u88c5&#xff1a;<\/p>\n<p>npm install <span class=\"token operator\">&#8211;<\/span>g drawio-mcp<\/p>\n<p>\u7ed3\u679c&#xff1a;\u2705 86 packages&#xff0c;\u8017\u65f6\u7ea6 9 \u79d2\u3002<\/p>\n<hr \/>\n<h4>3.2 \u95ee\u9898\u4e8c&#xff1a;Node.js 22 \u517c\u5bb9\u6027\u5d29\u6e83<\/h4>\n<h5>\u73b0\u8c61<\/h5>\n<p>\u5b89\u88c5\u6210\u529f\u540e&#xff0c;\u5c1d\u8bd5\u542f\u52a8 drawio-mcp&#xff1a;<\/p>\n<p>node C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\npm-global\\\\node_modules\\\\drawio-mcp\\\\dist\\\\index<span class=\"token punctuation\">.<\/span>js<\/p>\n<p>\u62a5\u9519&#xff1a;<\/p>\n<p>TypeError: Cannot set property navigator of #&lt;Object&gt; which has only a getter<br \/>\n    at file:\/\/\/C:\/User&#8230;\/drawio-mcp\/dist\/mxgraph\/jsdom.js:6:18<\/p>\n<h5>\u6839\u56e0\u5206\u6790<\/h5>\n<p>drawio-mcp \u4f9d\u8d56 jsdom \u6765\u6a21\u62df\u6d4f\u89c8\u5668\u73af\u5883&#xff08;mxGraph \u9700\u8981&#xff09;\u3002\u5176 dist\/mxgraph\/jsdom.js \u6587\u4ef6\u5305\u542b&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token constant\">JSDOM<\/span> <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;jsdom&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">const<\/span> dom <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">JSDOM<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>window <span class=\"token operator\">&#061;<\/span> dom<span class=\"token punctuation\">.<\/span>window<span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>document <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>document<span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>XMLSerializer <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>XMLSerializer<span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>navigator <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>navigator<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u7b2c 6 \u884c&#xff0c;\u76f4\u63a5\u8d4b\u503c<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>location <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>location<span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>DOMParser <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>DOMParser<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u95ee\u9898\u6838\u5fc3&#xff1a;Node.js v22 \u4e2d&#xff0c;global.navigator \u53d8\u6210\u4e86\u53ea\u8bfb getter&#xff0c;\u65e0\u6cd5\u901a\u8fc7\u76f4\u63a5\u8d4b\u503c\u4fee\u6539\u3002\u8fd9\u662f Node.js 22 \u7684\u65b0\u7279\u6027&#xff0c;\u4e3a\u4e86\u66f4\u597d\u5730\u6a21\u62df\u6d4f\u89c8\u5668\u73af\u5883\u800c\u5f15\u5165&#xff0c;\u4f46\u4e0e\u65e7\u7684 jsdom \u4f7f\u7528\u65b9\u5f0f\u51b2\u7a81\u3002<\/p>\n<h5>\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>\u7528 Object.defineProperty \u7ed5\u8fc7\u53ea\u8bfb\u9650\u5236&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token constant\">JSDOM<\/span> <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;jsdom&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">const<\/span> dom <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">JSDOM<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>window <span class=\"token operator\">&#061;<\/span> dom<span class=\"token punctuation\">.<\/span>window<span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>document <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>document<span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>XMLSerializer <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>XMLSerializer<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ Node.js 22&#043;: global.navigator is a read-only getter.<\/span><br \/>\n<span class=\"token comment\">\/\/ Use Object.defineProperty to override it safely.<\/span><br \/>\nObject<span class=\"token punctuation\">.<\/span><span class=\"token function\">defineProperty<\/span><span class=\"token punctuation\">(<\/span>global<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;navigator&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">value<\/span><span class=\"token operator\">:<\/span> window<span class=\"token punctuation\">.<\/span>navigator<span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token literal-property property\">writable<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token literal-property property\">configurable<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nObject<span class=\"token punctuation\">.<\/span><span class=\"token function\">defineProperty<\/span><span class=\"token punctuation\">(<\/span>global<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;location&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">value<\/span><span class=\"token operator\">:<\/span> window<span class=\"token punctuation\">.<\/span>location<span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token literal-property property\">writable<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token literal-property property\">configurable<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nglobal<span class=\"token punctuation\">.<\/span>DOMParser <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>DOMParser<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u4fee\u6539\u6587\u4ef6&#xff1a;C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\npm-global\\\\node_modules\\\\drawio-mcp\\\\dist\\\\mxgraph\\\\jsdom.js<\/p>\n<h5>\u9a8c\u8bc1<\/h5>\n<p>node C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\npm-global\\\\node_modules\\\\drawio-mcp\\\\dist\\\\index<span class=\"token punctuation\">.<\/span>js<\/p>\n<p>ExitCode: 0&#xff0c;\u65e0\u9519\u8bef\u8f93\u51fa&#xff0c;MCP \u670d\u52a1\u5668\u6b63\u5e38\u901a\u8fc7 stdio \u7b49\u5f85\u8fde\u63a5 \u2705<\/p>\n<hr \/>\n<h3>\u56db\u3001\u914d\u7f6e Trae MCP<\/h3>\n<h4>4.1 \u627e\u5230\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>Trae CN \u7684 MCP \u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e&#xff1a;<\/p>\n<p>C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\TRAE SOLO CN\\\\User\\\\mcp.json<\/p>\n<h4>4.2 \u66f4\u65b0\u914d\u7f6e<\/h4>\n<p>\u6253\u5f00 mcp.json&#xff0c;\u6dfb\u52a0 drawio-mcp \u6761\u76ee&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;mcpServers&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token string-property property\">&#034;figwright&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string-property property\">&#034;command&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;C:\\\\\\\\Users\\\\\\\\yueli\\\\\\\\AppData\\\\\\\\Roaming\\\\\\\\npm-global\\\\\\\\figwright-mcp.cmd&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;args&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;env&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;drawio-mcp&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string-property property\">&#034;command&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;C:\\\\\\\\Users\\\\\\\\yueli\\\\\\\\AppData\\\\\\\\Roaming\\\\\\\\npm-global\\\\\\\\drawio-mcp.cmd&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;args&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;env&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u6ce8\u610f&#xff1a;<\/p>\n<ul>\n<li>Windows \u8def\u5f84\u4e2d\u7684\u53cd\u659c\u6760\u9700\u8981\u8f6c\u4e49\u4e3a \\\\\\\\<\/li>\n<li>args \u7559\u7a7a\u5373\u53ef&#xff0c;drawio-mcp \u901a\u8fc7 stdio \u901a\u4fe1<\/li>\n<li>\u5982\u679c\u4e4b\u524d\u6ca1\u6709 figwright&#xff0c;\u53ef\u4ee5\u53ea\u4fdd\u7559 drawio-mcp<\/li>\n<\/ul>\n<h4>4.3 \u91cd\u542f Trae<\/h4>\n<p>MCP \u914d\u7f6e\u66f4\u6539\u540e\u5fc5\u987b\u91cd\u542f Trae \u624d\u80fd\u751f\u6548\u3002\u91cd\u542f\u540e&#xff0c;\u5728 Trae \u7684 MCP \u5de5\u5177\u5217\u8868\u4e2d\u5e94\u8be5\u80fd\u770b\u5230 6 \u4e2a drawio \u76f8\u5173\u5de5\u5177\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u5b9e\u6218\u4f7f\u7528<\/h3>\n<h4>5.1 \u57fa\u7840\u6d41\u7a0b&#xff1a;\u4e09\u6b65\u753b\u56fe<\/h4>\n<h5>\u6b65\u9aa4 1&#xff1a;\u521b\u5efa\u56fe\u8868\u6587\u4ef6<\/h5>\n<p>\u5728 Trae \u4e2d\u8bf4&#xff1a;<\/p>\n<p>&#034;\u5e2e\u6211\u521b\u5efa\u4e00\u4e2a\u7cfb\u7edf\u67b6\u6784\u56fe&#xff0c;\u6587\u4ef6\u540d system-architecture.drawio.svg&#034;<\/p>\n<p>Trae \u4f1a\u8c03\u7528 new_diagram \u5de5\u5177\u521b\u5efa\u7a7a\u6587\u4ef6\u3002<\/p>\n<h5>\u6b65\u9aa4 2&#xff1a;\u6dfb\u52a0\u8282\u70b9<\/h5>\n<p>&#034;\u5728 system-architecture.drawio.svg \u91cc\u753b\u4e00\u4e2a\u4e09\u5c42\u67b6\u6784&#xff1a;<br \/>\n&#8211; \u9876\u5c42&#xff1a;API Gateway&#xff08;\u77e9\u5f62&#xff09;<br \/>\n&#8211; \u4e2d\u5c42&#xff1a;User Service&#xff08;\u77e9\u5f62&#xff09;<br \/>\n&#8211; \u5e95\u5c42&#xff1a;PostgreSQL&#xff08;\u5706\u67f1\u4f53&#xff09;<\/p>\n<p>\u8282\u70b9\u4e4b\u95f4\u7528\u7bad\u5934\u8fde\u63a5&#xff0c;\u6807\u7b7e\u5206\u522b\u662f &#039;HTTP&#039; \u548c &#039;SQL&#039;&#034;<\/p>\n<p>Trae \u4f1a\u81ea\u52a8&#xff1a;<\/p>\n<li>\u8c03\u7528 add_nodes \u6279\u91cf\u6dfb\u52a0 3 \u4e2a\u8282\u70b9<\/li>\n<li>\u8c03\u7528 link_nodes \u6279\u91cf\u521b\u5efa\u8fde\u63a5<\/li>\n<h5>\u6b65\u9aa4 3&#xff1a;\u7f16\u8f91\u5b8c\u5584<\/h5>\n<p>&#034;\u628a User Service \u6539\u540d\u4e3a Auth Service&#034;<br \/>\n&#034;\u5728 PostgreSQL \u53f3\u8fb9\u52a0\u4e00\u4e2a Redis \u7f13\u5b58&#xff08;\u5706\u67f1\u4f53&#xff09;&#034;<br \/>\n&#034;\u770b\u770b\u8fd9\u4e2a\u56fe\u91cc\u6709\u54ea\u4e9b\u8282\u70b9&#034;<\/p>\n<p>\u5bf9\u5e94\u5de5\u5177\u8c03\u7528&#xff1a;edit_nodes\u3001add_nodes\u3001get_diagram_info\u3002<\/p>\n<h4>5.2 \u8fdb\u9636\u6280\u5de7<\/h4>\n<h5>\u6279\u91cf\u64cd\u4f5c<\/h5>\n<p>\u6240\u6709\u6838\u5fc3\u5de5\u5177\u90fd\u652f\u6301\u6279\u91cf\u64cd\u4f5c&#xff0c;\u51cf\u5c11\u7f51\u7edc\u5f00\u9500&#xff1a;<\/p>\n<p>&#034;\u4e00\u6b21\u6027\u6dfb\u52a0 10 \u4e2a\u5fae\u670d\u52a1\u8282\u70b9&#xff0c;\u4ece\u5de6\u5230\u53f3\u6392\u5217&#xff0c;\u95f4\u8ddd 100&#034;<\/p>\n<h5>\u81ea\u52a8\u5e03\u5c40<\/h5>\n<p>add_nodes \u652f\u6301 layout \u53c2\u6570&#xff1a;<\/p>\n<p>&#034;\u6dfb\u52a0\u8282\u70b9\u540e\u81ea\u52a8\u6309\u5c42\u7ea7\u5e03\u5c40&#xff0c;\u65b9\u5411\u4ece\u5de6\u5230\u53f3&#034;<\/p>\n<p>\u652f\u6301\u7b97\u6cd5&#xff1a;hierarchical&#xff08;\u5c42\u7ea7&#xff09;\u3001circle&#xff08;\u5706\u5f62&#xff09;\u3001organic&#xff08;\u6709\u673a&#xff09;\u3001compact-tree&#xff08;\u7d27\u51d1\u6811\u5f62&#xff09;\u3001radial-tree&#xff08;\u653e\u5c04\u6811\u5f62&#xff09;\u3002<\/p>\n<h5>\u8fde\u63a5\u7ebf\u6837\u5f0f<\/h5>\n<p>&#034;\u4ece A \u5230 B \u753b\u4e00\u6761\u865a\u7ebf&#xff0c;\u6807\u7b7e\u662f &#039;async&#039;&#034;<\/p>\n<p>link_nodes \u652f\u6301&#xff1a;<\/p>\n<ul>\n<li>dashed: true&#xff1a;\u865a\u7ebf<\/li>\n<li>reverse: true&#xff1a;\u53cd\u5411\u7bad\u5934<\/li>\n<li>undirected: true&#xff1a;\u65e0\u5411\u8fb9&#xff08;\u65e0\u7bad\u5934&#xff09;<\/li>\n<\/ul>\n<h4>5.3 \u5b9e\u6218\u6848\u4f8b&#xff1a;\u7535\u5546\u5fae\u670d\u52a1\u67b6\u6784\u56fe<\/h4>\n<p>\u8f93\u5165\u81ea\u7136\u8bed\u8a00&#xff1a;<\/p>\n<p>&#034;\u5e2e\u6211\u753b\u4e00\u4e2a\u7535\u5546\u5fae\u670d\u52a1\u67b6\u6784\u56fe&#xff0c;\u5305\u542b&#xff1a;<br \/>\n&#8211; \u7528\u6237\u670d\u52a1 User Service<br \/>\n&#8211; \u8ba2\u5355\u670d\u52a1 Order Service<br \/>\n&#8211; \u5546\u54c1\u670d\u52a1 Product Service<br \/>\n&#8211; \u652f\u4ed8\u670d\u52a1 Payment Service<br \/>\n&#8211; PostgreSQL \u6570\u636e\u5e93<br \/>\n&#8211; Redis \u7f13\u5b58<br \/>\n&#8211; Kafka \u6d88\u606f\u961f\u5217<\/p>\n<p>\u670d\u52a1\u4e4b\u95f4\u7528\u5b9e\u7ebf\u8fde\u63a5&#xff0c;\u6570\u636e\u5e93\u7528\u5706\u67f1\u4f53&#xff0c;\u7f13\u5b58\u7528\u5706\u67f1\u4f53&#xff0c;\u6d88\u606f\u961f\u5217\u7528\u77e9\u5f62\u3002<br \/>\n\u6587\u4ef6\u4fdd\u5b58\u5728 architecture.drawio.svg&#034;<\/p>\n<p>Trae \u6267\u884c\u6d41\u7a0b&#xff1a;<\/p>\n<li>\u521b\u5efa architecture.drawio.svg<\/li>\n<li>\u6279\u91cf\u6dfb\u52a0 7 \u4e2a\u8282\u70b9&#xff08;\u81ea\u52a8\u5e03\u5c40&#xff09;<\/li>\n<li>\u6279\u91cf\u521b\u5efa\u8fde\u63a5\u5173\u7cfb<\/li>\n<li>\u751f\u6210\u5b8c\u6574\u7684 SVG \u6587\u4ef6<\/li>\n<p>\u8f93\u51fa&#xff1a;.drawio.svg \u6587\u4ef6&#xff0c;\u5305\u542b\u5b8c\u6574\u7684\u67b6\u6784\u56fe&#xff0c;\u53ef\u5728 Trae \u6216 VSCode \u4e2d\u6253\u5f00\u9884\u89c8\u548c\u7f16\u8f91\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u9884\u89c8\u4e0e\u7f16\u8f91<\/h3>\n<h4>6.1 \u5728 Trae \u4e2d\u9884\u89c8<\/h4>\n<p>\u76f4\u63a5\u70b9\u51fb .drawio.svg \u6587\u4ef6&#xff0c;Trae \u4f1a\u7528\u5185\u7f6e SVG \u67e5\u770b\u5668\u663e\u793a\u3002<\/p>\n<h4>6.2 \u7528 Draw.io \u63d2\u4ef6\u7f16\u8f91<\/h4>\n<li>\u5728 Trae \u91cc\u5b89\u88c5 \u201cDraw.io Integration\u201d \u63d2\u4ef6<\/li>\n<li>\u53f3\u952e .drawio.svg \u2192 \u201cOpen with Draw.io\u201d<\/li>\n<li>\u53ef\u89c6\u5316\u62d6\u62fd\u7f16\u8f91&#xff0c;\u4fdd\u5b58\u540e AI \u751f\u6210\u7684\u5185\u5bb9\u4e0d\u4f1a\u4e22\u5931<\/li>\n<h4>6.3 Draw.io Desktop&#xff08;\u53ef\u9009&#xff09;<\/h4>\n<p>\u867d\u7136 drawio-mcp \u4e0d\u4f9d\u8d56 Draw.io Desktop&#xff0c;\u4f46\u5982\u679c\u9700\u8981\u66f4\u591a\u9ad8\u7ea7\u529f\u80fd&#xff0c;\u53ef\u4ee5\u5b89\u88c5&#xff1a;<\/p>\n<ul>\n<li>\u5b98\u7f51&#xff1a;https:\/\/www.diagrams.net\/<\/li>\n<li>\u5b89\u88c5\u540e\u53f3\u952e .drawio.svg \u2192 Open with \u2192 Draw.io<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e03\u3001\u5e38\u89c1\u95ee\u9898<\/h3>\n<h4>Q1: \u91cd\u542f Trae \u540e\u770b\u4e0d\u5230 drawio-mcp \u5de5\u5177&#xff1f;<\/h4>\n<p>A: \u68c0\u67e5 mcp.json \u914d\u7f6e\u662f\u5426\u6b63\u786e&#xff0c;\u8def\u5f84\u662f\u5426\u5b58\u5728\u3002\u67e5\u770b Trae \u7684 MCP \u65e5\u5fd7&#xff08;\u901a\u5e38\u5728 C:\\\\Users\\\\yueli\\\\AppData\\\\Roaming\\\\TRAE SOLO CN\\\\logs&#xff09;\u786e\u8ba4\u662f\u5426\u6709\u9519\u8bef\u3002<\/p>\n<h4>Q2: \u751f\u6210\u56fe\u8868\u540e\u6253\u4e0d\u5f00&#xff1f;<\/h4>\n<p>A: .drawio.svg \u662f\u6807\u51c6 SVG &#043; \u5185\u5d4c draw.io \u5143\u6570\u636e&#xff0c;\u7528\u6d4f\u89c8\u5668\u5c31\u80fd\u67e5\u770b\u56fe\u7247&#xff0c;\u7528 draw.io \u63d2\u4ef6\u6216 Draw.io Desktop \u53ef\u4ee5\u7f16\u8f91\u3002<\/p>\n<h4>Q3: \u9047\u5230\u5176\u4ed6 Node.js \u517c\u5bb9\u6027\u95ee\u9898&#xff1f;<\/h4>\n<p>A: \u5982\u679c\u4f7f\u7528 Node.js 22&#043; \u4e14\u9047\u5230\u7c7b\u4f3c\u95ee\u9898&#xff0c;\u5c1d\u8bd5&#xff1a;<\/p>\n<li>\u68c0\u67e5 global.navigator\u3001global.location \u7b49\u53ea\u8bfb\u5c5e\u6027<\/li>\n<li>\u4f7f\u7528 Object.defineProperty \u66ff\u4ee3\u76f4\u63a5\u8d4b\u503c<\/li>\n<li>\u6216\u964d\u7ea7\u5230 Node.js 20.x LTS<\/li>\n<h4>Q4: \u548c Figwright \u6709\u4ec0\u4e48\u533a\u522b&#xff1f;<\/h4>\n<table>\n<tr>\u7279\u6027Figwrightdrawio-mcp<\/tr>\n<tbody>\n<tr>\n<td>\u9700\u8981\u684c\u9762\u5ba2\u6237\u7aef<\/td>\n<td>\u2705 \u9700\u8981 Figma Desktop<\/td>\n<td>\u274c \u4e0d\u9700\u8981<\/td>\n<\/tr>\n<tr>\n<td>\u9700\u8981\u63d2\u4ef6<\/td>\n<td>\u2705 Figma \u63d2\u4ef6<\/td>\n<td>\u274c \u4e0d\u9700\u8981<\/td>\n<\/tr>\n<tr>\n<td>\u8f93\u51fa\u683c\u5f0f<\/td>\n<td>.fig&#xff08;Figma \u6587\u6863&#xff09;<\/td>\n<td>.drawio.svg&#xff08;SVG&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5b9e\u65f6\u9884\u89c8<\/td>\n<td>\u2705 Figma \u5185\u5b9e\u65f6\u6e32\u67d3<\/td>\n<td>\u274c \u9700\u7528\u63d2\u4ef6\u6253\u5f00<\/td>\n<\/tr>\n<tr>\n<td>\u590d\u6742\u5ea6<\/td>\n<td>\u9ad8&#xff08;WebSocket \u4e2d\u7ee7&#xff09;<\/td>\n<td>\u4f4e&#xff08;\u76f4\u63a5\u751f\u6210\u6587\u4ef6&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u56fd\u5185\u7f51\u7edc<\/td>\n<td>\u9700\u4ee3\u7406\u8bbf\u95ee Figma<\/td>\n<td>\u5168\u672c\u5730&#xff0c;\u65e0\u7f51\u7edc\u4f9d\u8d56<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5efa\u8bae&#xff1a;<\/p>\n<ul>\n<li>\u65e5\u5e38\u67b6\u6784\u56fe\/\u6d41\u7a0b\u56fe \u2192 drawio-mcp&#xff08;\u7b80\u5355\u5feb\u901f&#xff09;<\/li>\n<li>\u8bbe\u8ba1\u7a3f\/\u9ad8\u4fdd\u771f\u539f\u578b \u2192 Figwright&#xff08;Figma \u529f\u80fd\u66f4\u5f3a&#xff09;<\/li>\n<\/ul>\n<hr \/>\n<h3>\u516b\u3001\u603b\u7ed3<\/h3>\n<p>\u672c\u6587\u5b8c\u6574\u8bb0\u5f55\u4e86\u5728 Windows 11 \u4e0a\u642d\u5efa Trae Work &#043; drawio-mcp \u7684\u8fc7\u7a0b&#xff0c;\u91cd\u70b9\u89e3\u51b3\u4e86\u4e24\u4e2a\u5173\u952e\u95ee\u9898&#xff1a;<\/p>\n<li>npm registry \u914d\u7f6e\u51b2\u7a81&#xff1a;\u7528\u6237\u7ea7 .npmrc \u8986\u76d6\u4e86\u5168\u5c40 npmmirror \u914d\u7f6e&#xff0c;\u5bfc\u81f4\u56fd\u5185\u65e0\u6cd5\u8bbf\u95ee\u5b98\u65b9\u6e90<\/li>\n<li>Node.js 22 \u517c\u5bb9\u6027&#xff1a;global.navigator \u5728 Node 22 \u4e2d\u53d8\u4e3a\u53ea\u8bfb getter&#xff0c;\u9700\u8981\u7528 Object.defineProperty \u7ed5\u8fc7<\/li>\n<p>\u642d\u5efa\u5b8c\u6210\u540e&#xff0c;\u4f60\u53ef\u4ee5\u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u8ba9 AI \u81ea\u52a8\u751f\u6210\u67b6\u6784\u56fe\u3001\u6d41\u7a0b\u56fe&#xff0c;\u65e0\u9700\u6253\u5f00\u4efb\u4f55\u7ed8\u56fe\u8f6f\u4ef6\u3002\u751f\u6210\u7684 .drawio.svg \u6587\u4ef6\u53ef\u4ee5\u76f4\u63a5\u5728 Trae \u6216 VSCode \u4e2d\u9884\u89c8\u548c\u7f16\u8f91\u3002<\/p>\n<hr \/>\n<h3>\u9644\u5f55&#xff1a;\u76f8\u5173\u8d44\u6e90<\/h3>\n<ul>\n<li>MCP \u5b98\u65b9\u6587\u6863&#xff1a;https:\/\/modelcontextprotocol.io\/<\/li>\n<li>drawio-mcp GitHub&#xff1a;https:\/\/github.com\/Sujimoshi\/drawio-mcp<\/li>\n<li>drawio-mcp npm&#xff1a;https:\/\/www.npmjs.com\/package\/drawio-mcp<\/li>\n<li>Draw.io \u5b98\u7f51&#xff1a;https:\/\/www.diagrams.net\/<\/li>\n<li>Anthropic MCP \u535a\u5ba2&#xff1a;https:\/\/www.anthropic.com\/engineering\/model-context-protocol<\/li>\n<\/ul>\n<hr \/>\n<p>\u672c\u6587\u53d1\u5e03\u4e8e CSDN&#xff0c;\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe&#xff1a;Trae Work  drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357\u4ece\u300c\u8bf4\u4e00\u53e5\u8bdd\u81ea\u52a8\u751f\u6210\u67b6\u6784\u56fe\u300d\u5230\u300cNode.js 22 \u517c\u5bb9\u6027\u4fee\u590d\u300d&#xff0c;\u8fd9\u7bc7\u535a\u6587\u8bb0\u5f55\u4e86\u5b8c\u6574\u7684\u8e29\u5751\u4e0e\u89e3\u51b3\u8fc7\u7a0b\u3002\u524d\u8a00&#xff1a;\u5f53 AI \u80fd\u753b\u56fe<br \/>\n2024 \u5e74 11 \u6708&#xff0c;Anthropic \u5f00\u6e90\u4e86 Model Context Protocol&#xff08;MCP&#xff09;&#xff0c;\u88ab\u4e1a\u754c\u79f0\u4e3a \u300cAI \u9886\u57df\u7684 USB-C\u300d\u3002\u5b83\u89e3\u51b3\u4e86 AI <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10284,11049,10997,66,73],"topic":[],"class_list":["post-96528","post","type-post","status-publish","format-standard","hentry","category-server","tag-draw-io","tag-drawio-mcp","tag-traework","tag-ai","tag-mcp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/96528.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe&#xff1a;Trae Work drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357\u4ece\u300c\u8bf4\u4e00\u53e5\u8bdd\u81ea\u52a8\u751f\u6210\u67b6\u6784\u56fe\u300d\u5230\u300cNode.js 22 \u517c\u5bb9\u6027\u4fee\u590d\u300d&#xff0c;\u8fd9\u7bc7\u535a\u6587\u8bb0\u5f55\u4e86\u5b8c\u6574\u7684\u8e29\u5751\u4e0e\u89e3\u51b3\u8fc7\u7a0b\u3002\u524d\u8a00&#xff1a;\u5f53 AI \u80fd\u753b\u56fe 2024 \u5e74 11 \u6708&#xff0c;Anthropic \u5f00\u6e90\u4e86 Model Context Protocol&#xff08;MCP&#xff09;&#xff0c;\u88ab\u4e1a\u754c\u79f0\u4e3a \u300cAI \u9886\u57df\u7684 USB-C\u300d\u3002\u5b83\u89e3\u51b3\u4e86 AI\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/96528.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-27T12:40:28+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/96528.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/96528.html\",\"name\":\"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-27T12:40:28+00:00\",\"dateModified\":\"2026-08-27T12:40:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/96528.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/96528.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/96528.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/96528.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe&#xff1a;Trae Work drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357\u4ece\u300c\u8bf4\u4e00\u53e5\u8bdd\u81ea\u52a8\u751f\u6210\u67b6\u6784\u56fe\u300d\u5230\u300cNode.js 22 \u517c\u5bb9\u6027\u4fee\u590d\u300d&#xff0c;\u8fd9\u7bc7\u535a\u6587\u8bb0\u5f55\u4e86\u5b8c\u6574\u7684\u8e29\u5751\u4e0e\u89e3\u51b3\u8fc7\u7a0b\u3002\u524d\u8a00&#xff1a;\u5f53 AI \u80fd\u753b\u56fe 2024 \u5e74 11 \u6708&#xff0c;Anthropic \u5f00\u6e90\u4e86 Model Context Protocol&#xff08;MCP&#xff09;&#xff0c;\u88ab\u4e1a\u754c\u79f0\u4e3a \u300cAI \u9886\u57df\u7684 USB-C\u300d\u3002\u5b83\u89e3\u51b3\u4e86 AI","og_url":"https:\/\/www.wsisp.com\/helps\/96528.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-27T12:40:28+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/96528.html","url":"https:\/\/www.wsisp.com\/helps\/96528.html","name":"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-27T12:40:28+00:00","dateModified":"2026-08-27T12:40:28+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/96528.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/96528.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/96528.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7528 MCP \u8ba9 AI \u66ff\u4f60\u753b\u56fe\uff1aTrae Work + drawio-mcp \u5b8c\u6574\u642d\u5efa\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/96528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=96528"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/96528\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=96528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=96528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=96528"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=96528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}