{"id":82639,"date":"2026-07-25T10:57:26","date_gmt":"2026-07-25T02:57:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/82639.html"},"modified":"2026-07-25T10:57:26","modified_gmt":"2026-07-25T02:57:26","slug":"%e8%a7%a3%e5%af%86-mcp-%e5%8d%8f%e8%ae%ae%ef%bc%9a%e5%a6%82%e4%bd%95%e7%94%a8-node-js-%e4%bb%8e%e9%9b%b6%e6%89%8b%e5%86%99%e4%b8%80%e4%b8%aa%e6%9c%ac%e5%9c%b0%e6%96%87%e4%bb%b6%e8%af%bb%e5%8f%96-mcp","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/82639.html","title":{"rendered":"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668"},"content":{"rendered":"<\/p>\n<h4>\u89e3\u5bc6 MCP \u534f\u8bae&#xff1a;\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668<\/h4>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u4e3a\u4ec0\u4e48\u9700\u8981 MCP&#xff1f;\u5b83\u89e3\u51b3\u4e86\u4ec0\u4e48\u95ee\u9898&#xff1f;<\/li>\n<li>\u5f00\u53d1\u51c6\u5907<\/li>\n<li>\u6838\u5fc3\u5b9e\u73b0&#xff1a;\u624b\u5199 &#096;simple-read-mcp&#096; \u670d\u52a1<\/li>\n<li>\n<ul>\n<li>\u4ee3\u7801\u6df1\u5ea6\u89e3\u6790<\/li>\n<\/ul>\n<\/li>\n<li>\u843d\u5730\u96c6\u6210&#xff1a;\u63a5\u5165 AI \u7814\u53d1\u73af\u5883<\/li>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<h2>\u524d\u8a00<\/h2>\n<p>\u5728\u5f53\u4e0b\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u4e0e AI Agent \u6280\u672f\u7206\u53d1\u7684\u65f6\u4ee3&#xff0c;AI \u52a9\u624b\u5728\u7f16\u5199\u4ee3\u7801\u3001\u89e3\u7b54\u7591\u95ee\u65f6\u8868\u73b0\u5f97\u8d8a\u53d1\u6210\u719f\u3002\u7136\u800c&#xff0c;\u53d7\u9650\u4e8e\u81ea\u8eab\u7684\u8bad\u7ec3\u6570\u636e\u4e0e\u8fd0\u884c\u6c99\u7bb1&#xff0c;AI \u5728\u6267\u884c\u201c\u5b9e\u65f6\u4efb\u52a1\u201d\u6216\u201c\u89e6\u8fbe\u672c\u5730\u751f\u6001\u201d\u65f6\u5e38\u663e\u5f97\u65e0\u80fd\u4e3a\u529b\u2014\u2014\u5b83\u65e2\u65e0\u6cd5\u611f\u77e5\u4f60\u7684\u672c\u5730\u6587\u4ef6&#xff0c;\u4e5f\u65e0\u6cd5\u76f4\u63a5\u8c03\u7528\u4f60\u7684\u4e13\u5c5e\u5de5\u5177\u3002<\/p>\n<p>\u4e3a\u4e86\u6253\u7834\u8fd9\u79cd\u201c\u8ba4\u77e5\u6c99\u7bb1\u201d&#xff0c;Anthropic \u63a8\u51fa\u4e86 MCP&#xff08;Model Context Protocol&#xff0c;\u6a21\u578b\u4e0a\u4e0b\u6587\u534f\u8bae&#xff09;\u3002\u5b83\u7edf\u4e00\u4e86 AI \u4e0e\u5916\u90e8\u6570\u636e\u6e90\u3001\u5de5\u5177\u4e4b\u95f4\u7684\u901a\u4fe1\u6807\u51c6\u3002<\/p>\n<p>\u672c\u6587\u5c06\u8df3\u8fc7\u590d\u6742\u7684\u7406\u8bba\u704c\u8f93&#xff0c;\u901a\u8fc7\u57fa\u4e8e Node.js \u7684\u539f\u751f\u5f00\u53d1\u89c6\u89d2&#xff0c;\u5e26\u4f60\u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u5177\u5907\u672c\u5730\u6587\u4ef6\u8bfb\u53d6\u80fd\u529b&#xff08;File System Server&#xff09;\u7684 MCP \u670d\u52a1&#xff0c;\u5e76\u5c06\u5176\u63a5\u5165\u5230\u73b0\u4ee3\u5316 AI IDE \u4e2d\u3002\u8bfb\u5b8c\u672c\u6587&#xff0c;\u4f60\u4e0d\u4ec5\u80fd\u638c\u63e1 MCP \u7684\u5e95\u5c42\u901a\u4fe1\u903b\u8f91&#xff0c;\u66f4\u80fd\u4eb2\u624b\u4e3a\u4f60\u7684 AI \u52a9\u624b\u88c5\u4e0a\u4e00\u53cc\u89e6\u8fbe\u672c\u5730\u7cfb\u7edf\u7684\u201c\u624b\u201d\u3002<\/p>\n<hr \/>\n<h2>\u4e3a\u4ec0\u4e48\u9700\u8981 MCP&#xff1f;\u5b83\u89e3\u51b3\u4e86\u4ec0\u4e48\u95ee\u9898&#xff1f;<\/h2>\n<p>\u5728 MCP \u51fa\u73b0\u4e4b\u524d&#xff0c;\u5982\u679c\u4f60\u60f3\u8ba9 AI \u8bfb\u53d6\u672c\u5730\u9879\u76ee\u7ed3\u6784\u6216\u6587\u4ef6&#xff0c;\u901a\u5e38\u9700\u8981\u901a\u8fc7 IDE \u63d2\u4ef6\u6216\u662f\u81ea\u5b9a\u4e49\u811a\u672c\u6765\u786c\u7f16\u7801\u62fc\u51d1 Prompt\u3002\u8fd9\u79cd\u6a21\u5f0f\u5b58\u5728\u4e24\u4e2a\u6838\u5fc3\u75db\u70b9&#xff1a;<\/p>\n<li>\u63a5\u53e3\u6807\u51c6\u4e0d\u4e00&#xff1a;\u6bcf\u4e2a\u5e94\u7528\u3001\u6bcf\u4e2a\u6269\u5c55\u90fd\u6709\u81ea\u5df1\u7684\u6570\u636e\u7ec4\u7ec7\u5f62\u5f0f&#xff0c;\u5f00\u53d1\u8fc1\u79fb\u6210\u672c\u6781\u9ad8\u3002<\/li>\n<li>\u4e0a\u4e0b\u6587\u5b64\u7acb&#xff1a;\u5927\u6a21\u578b\u65e0\u6cd5\u4ee5\u7ed3\u6784\u5316\u3001\u53ef\u611f\u77e5\u7684\u65b9\u5f0f\u786e\u8ba4\u81ea\u5df1\u662f\u5426\u62e5\u6709\u67d0\u79cd\u80fd\u529b&#xff0c;\u96be\u4ee5\u8fdb\u884c\u7cbe\u51c6\u7684\u5de5\u5177\u51b3\u7b56\u3002<\/li>\n<p>MCP \u5c31\u50cf\u662f AI \u65f6\u4ee3\u7684\u201cUSB \u63a5\u53e3\u534f\u8bae\u201d\u3002\u5b83\u5b9a\u4e49\u4e86\u4e00\u4e2a\u6807\u51c6\u7684 C\/S&#xff08;Client\/Server&#xff09;\u67b6\u6784&#xff1a;<\/p>\n<ul>\n<li>MCP Host \/ Client&#xff08;\u5bbf\u4e3b\/\u5ba2\u6237\u7aef&#xff09;&#xff1a;\u4f8b\u5982\u96c6\u6210\u4e86 AI \u80fd\u529b\u7684\u5f00\u53d1\u5de5\u5177&#xff08;Trae\u3001VS Code \u6216\u662f Claude Desktop&#xff09;\u3002\u5b83\u4eec\u8d1f\u8d23\u63a5\u6536\u7528\u6237\u7684\u81ea\u7136\u8bed\u8a00\u6307\u4ee4&#xff0c;\u5e76\u5c06\u6307\u4ee4\u7ffb\u8bd1\u7ed9 AI\u3002<\/li>\n<li>MCP Server&#xff08;\u670d\u52a1\u5668&#xff09;&#xff1a;\u7531\u5f00\u53d1\u8005\u7f16\u5199\u7684\u72ec\u7acb\u670d\u52a1&#xff0c;\u8d1f\u8d23\u66b4\u9732\u5177\u4f53\u7684\u201c\u5de5\u5177&#xff08;Tools&#xff09;\u201d\u6216\u201c\u8d44\u6e90&#xff08;Resources&#xff09;\u201d\u3002<\/li>\n<\/ul>\n<p>\u5f53\u7528\u6237\u53d1\u51fa\u6307\u4ee4\u65f6&#xff0c;\u6574\u4f53\u7684\u5de5\u4f5c\u6d41\u5982\u4e0b\u6240\u793a&#xff1a;<\/p>\n<li>\u7528\u6237\u4e0b\u8fbe\u6307\u4ee4&#xff1a;\u5728 AI \u804a\u5929\u6846\u8f93\u5165&#xff1a;\u201c\u5e2e\u6211\u770b\u770b\u672c\u5730 config.json \u91cc\u5199\u4e86\u4ec0\u4e48\u201d\u3002<\/li>\n<li>\u5ba2\u6237\u7aef\u4e0e\u5927\u6a21\u578b\u51b3\u7b56&#xff1a;Host \u63a5\u6536 Prompt \u4f20\u7ed9 LLM&#xff0c;LLM \u5206\u6790\u4e0a\u4e0b\u6587\u53d1\u73b0\u9700\u8981\u8bfb\u53d6\u6587\u4ef6&#xff0c;\u4e8e\u662f\u9009\u4e2d\u4e86\u6ce8\u518c\u5728\u5ba2\u6237\u7aef\u5185\u7684 read_file \u5de5\u5177\u3002<\/li>\n<li>\u534f\u8bae\u4f20\u8f93&#xff08;Stdio \u7ba1\u9053&#xff09;&#xff1a;\u5ba2\u6237\u7aef\u901a\u8fc7\u6807\u51c6\u8f93\u5165&#xff08;stdin&#xff09;\u5411 MCP Server \u53d1\u9001\u4e00\u6761 JSON-RPC \u8bf7\u6c42\u3002<\/li>\n<li>\u670d\u52a1\u5668\u6267\u884c&#xff1a;MCP Server \u63a5\u6536\u8bf7\u6c42&#xff0c;\u8c03\u7528\u5e95\u5c42\u7684 fs \u6a21\u5757\u6267\u884c\u672c\u5730\u6587\u4ef6\u8bfb\u53d6&#xff0c;\u5e76\u5c06\u7ed3\u679c\u901a\u8fc7\u6807\u51c6\u8f93\u51fa&#xff08;stdout&#xff09;\u8fd4\u56de\u3002<\/li>\n<li>\u751f\u6210\u6700\u7ec8\u54cd\u5e94&#xff1a;\u5ba2\u6237\u7aef&#xff08;Host&#xff09;\u5c06\u8bfb\u53d6\u5230\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587\u5582\u7ed9 LLM&#xff0c;LLM \u6839\u636e\u6700\u65b0\u7684\u5b8c\u6574\u6570\u636e\u751f\u6210\u6700\u7ec8\u56de\u590d\u8fd4\u8fd8\u7ed9\u7528\u6237\u3002<\/li>\n<p>\u901a\u8fc7\u8fd9\u4e00\u5c42\u6807\u51c6\u5316\u7684\u5c01\u88c5&#xff0c;LLM \u53ef\u4ee5\u5728\u4e0d\u9700\u8981\u77e5\u9053\u672c\u5730\u7ec6\u8282\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5b89\u5168\u3001\u52a8\u6001\u5730\u8c03\u7528\u5404\u7c7b\u672c\u5730\u6216\u8005\u4e91\u7aef\u670d\u52a1\u3002<\/p>\n<hr \/>\n<h2>\u5f00\u53d1\u51c6\u5907<\/h2>\n<p>\u5728\u5f00\u59cb\u52a8\u624b\u4e4b\u524d&#xff0c;\u6211\u4eec\u9700\u8981\u521d\u59cb\u5316\u4e00\u4e2a Node.js \u9879\u76ee\u5e76\u5f15\u5165\u76f8\u5173\u7684\u4f9d\u8d56\u3002\u8fd9\u91cc\u4e3b\u8981\u4f9d\u8d56\u4e24\u4e2a\u6838\u5fc3\u5e93&#xff1a;<\/p>\n<li>&#064;modelcontextprotocol\/sdk&#xff1a;\u5b98\u65b9\u63d0\u4f9b\u7684\u534f\u8bae SDK&#xff0c;\u5e2e\u52a9\u6211\u4eec\u5feb\u6377\u5b9e\u73b0\u7b26\u5408 MCP \u89c4\u8303\u7684\u5e95\u5c42\u901a\u4fe1\u4e0e\u751f\u547d\u5468\u671f\u7ba1\u7406\u3002<\/li>\n<li>zod&#xff1a;\u4e00\u4e2a\u5f3a\u7c7b\u578b Schema \u58f0\u660e\u4e0e\u9a8c\u8bc1\u5e93\u3002\u7531\u4e8e MCP \u6838\u5fc3\u9700\u8981\u5411 LLM \u58f0\u660e\u5de5\u5177\u7684\u8f93\u5165\u53c2\u6570\u683c\u5f0f&#xff0c;Zod \u80fd\u591f\u63d0\u4f9b\u6781\u7b80\u4e14\u4e25\u8c28\u7684\u6821\u9a8c\u80fd\u529b&#xff0c;\u907f\u514d\u624b\u5199\u7e41\u7410\u7684 JSON Schema\u3002<\/li>\n<p>\u9996\u5148&#xff0c;\u5728\u4f60\u7684\u7ec8\u7aef\u4e2d\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u4f9d\u8d56\u5b89\u88c5&#xff1a;<\/p>\n<p><span class=\"token function\">pnpm<\/span> i zod &#064;modelcontextprotocol\/sdk<\/p>\n<hr \/>\n<h2>\u6838\u5fc3\u5b9e\u73b0&#xff1a;\u624b\u5199 simple-read-mcp \u670d\u52a1<\/h2>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a app.service.mjs&#xff08;\u6216\u8005\u5176\u4ed6\u7b26\u5408 ECMAScript Modules \u89c4\u8303\u7684\u547d\u540d&#xff09;\u7684\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684\u6838\u5fc3\u4ee3\u7801\u5b9e\u73b0&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> McpServer <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;&#064;modelcontextprotocol\/sdk\/server\/mcp.js&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> StdioServerTransport <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;&#064;modelcontextprotocol\/sdk\/server\/stdio.js&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> z <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;zod&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> fs <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;fs\/promises&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 1. \u5b9e\u4f8b\u5316 MCP \u670d\u52a1\u7aef<\/span><br \/>\n<span class=\"token keyword\">const<\/span> server <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">McpServer<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token literal-property property\">name<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;simple-read-mcp&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token literal-property property\">version<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;1.0.0&#039;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 2. \u5229\u7528\u65b0\u7248\u6781\u7b80\u5de5\u5177\u6ce8\u518c\u5668\u6ce8\u518c read_file \u5de5\u5177<\/span><br \/>\nserver<span class=\"token punctuation\">.<\/span><span class=\"token function\">tool<\/span><span class=\"token punctuation\">(<\/span><br \/>\n  <span class=\"token string\">&#034;read_file&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;\u8bfb\u53d6\u6307\u5b9a\u8def\u5f84\u7684\u672c\u5730\u6587\u4ef6\u5185\u5bb9&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">path<\/span><span class=\"token operator\">:<\/span> z<span class=\"token punctuation\">.<\/span><span class=\"token function\">string<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">describe<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u6587\u4ef6\u7684\u7edd\u5bf9\u6216\u76f8\u5bf9\u8def\u5f84&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token comment\">\/\/ \u6821\u9a8c\u53c2\u6570\u662f\u5426\u4e3a\u5b57\u7b26\u4e32&#xff0c;\u5e76\u63d0\u4f9b\u63cf\u8ff0\u4f9b LLM \u7406\u89e3<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token keyword\">async<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token parameter\"><span class=\"token punctuation\">{<\/span> path <span class=\"token punctuation\">}<\/span><\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token comment\">\/\/ \u6267\u884c\u672c\u5730\u5f02\u6b65\u6587\u4ef6\u8bfb\u53d6<\/span><br \/>\n      <span class=\"token keyword\">const<\/span> content <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> fs<span class=\"token punctuation\">.<\/span><span class=\"token function\">readFile<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;utf-8&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>      <span class=\"token comment\">\/\/ \u4e25\u683c\u6309\u7167 MCP \u89c4\u8303\u8fd4\u56de text \u7c7b\u578b\u7684\u4e0a\u4e0b\u6587\u6570\u636e<\/span><br \/>\n      <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token literal-property property\">content<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">type<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;text&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token literal-property property\">text<\/span><span class=\"token operator\">:<\/span> content <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 punctuation\">}<\/span> <span class=\"token keyword\">catch<\/span> <span class=\"token punctuation\">(<\/span>err<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token comment\">\/\/ \u5bb9\u9519\u5904\u7406&#xff1a;\u82e5\u6587\u4ef6\u4e0d\u5b58\u5728\u6216\u65e0\u6743\u9650&#xff0c;\u8fd4\u56de error \u6807\u8bc6\u5e76\u9644\u5e26\u9519\u8bef\u539f\u56e0<\/span><br \/>\n      <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token literal-property property\">isError<\/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\">content<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">type<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;text&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token literal-property property\">text<\/span><span class=\"token operator\">:<\/span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">\u8bfb\u53d6\u6587\u4ef6\u5931\u8d25&#xff1a;<\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>err<span class=\"token punctuation\">.<\/span>message<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/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 punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 3. \u5f02\u6b65\u542f\u52a8\u51fd\u6570&#xff0c;\u5efa\u7acb\u6807\u51c6\u8f93\u5165\u8f93\u51fa\u901a\u4fe1\u901a\u9053<\/span><br \/>\n<span class=\"token keyword\">async<\/span> <span class=\"token keyword\">function<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">const<\/span> transport <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">StdioServerTransport<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token keyword\">await<\/span> server<span class=\"token punctuation\">.<\/span><span class=\"token function\">connect<\/span><span class=\"token punctuation\">(<\/span>transport<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  console<span class=\"token punctuation\">.<\/span><span class=\"token function\">error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;MCP read_file \u670d\u52a1\u5df2\u542f\u52a8&#xff08;stdio\u6a21\u5f0f&#xff09;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">catch<\/span><span class=\"token punctuation\">(<\/span>console<span class=\"token punctuation\">.<\/span>error<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h3>\u4ee3\u7801\u6df1\u5ea6\u89e3\u6790<\/h3>\n<p>\u5f88\u591a\u5f00\u53d1\u8005\u5728\u63a5\u89e6 MCP \u65f6&#xff0c;\u5bb9\u6613\u88ab\u7e41\u7410\u7684\u534f\u8bae\u7ec6\u8282\u529d\u9000\u3002\u4e0a\u9762\u7684\u4ee3\u7801\u5229\u7528\u4e86\u65b0\u7248\u5b98\u65b9 SDK \u7684\u9ad8\u5c42\u62bd\u8c61&#xff0c;\u975e\u5e38\u4f18\u96c5\u5730\u5b8c\u6210\u4e86\u529f\u80fd\u5b9e\u73b0\u3002\u6211\u4eec\u6765\u91cd\u70b9\u62c6\u89e3\u5b83\u7684\u51e0\u4e2a\u5173\u952e\u8bbe\u8ba1&#xff1a;<\/p>\n<ul>\n<li>new McpServer(&#8230;)&#xff1a;\u521d\u59cb\u5316 MCP \u670d\u52a1\u7684\u5b9e\u4f8b\u3002\u670d\u52a1\u540d&#xff08;name&#xff09;\u548c\u7248\u672c&#xff08;version&#xff09;\u4f1a\u5728 Client \u4e0e Server \u5efa\u7acb\u8fde\u63a5\u65f6\u8fdb\u884c\u63e1\u624b\u4ea4\u6362&#xff0c;\u4fbf\u4e8e\u5ba2\u6237\u7aef\u8bc6\u522b\u548c\u7ba1\u7406\u3002<\/li>\n<li>server.tool(&#8230;) \u5185\u7684 Schema \u58f0\u660e&#xff1a;\u8fd9\u662f MCP \u7684\u7cbe\u9ad3\u6240\u5728\u3002\u6211\u4eec\u4e0d\u9700\u8981\u7528\u590d\u6742\u7684 JSON \u683c\u5f0f\u53bb\u5199\u5b9a\u4e49&#xff0c;\u800c\u662f\u76f4\u63a5\u4f20\u5165 read_file \u7684\u540d\u5b57\u3001\u529f\u80fd\u7684\u81ea\u7136\u8bed\u8a00\u63cf\u8ff0&#xff0c;\u4ee5\u53ca\u4e00\u4e2a Zod \u5bf9\u8c61 { path: z.string().describe(&#8230;) }\u3002\u5927\u6a21\u578b\u5c31\u662f\u901a\u8fc7\u8fd9\u4e9b\u201c\u63cf\u8ff0\u6587\u5b57&#xff08;Description&#xff09;\u201d\u6765\u611f\u77e5\u8fd9\u4e2a\u5de5\u5177\u6709\u4ec0\u4e48\u7528\u3001\u9700\u8981\u4ec0\u4e48\u53c2\u6570\u7684\u3002\u5f53\u5927\u6a21\u578b\u51b3\u5b9a\u8c03\u7528\u65f6&#xff0c;Zod \u4f1a\u5728\u5e95\u5c42\u81ea\u52a8\u62e6\u622a\u5e76\u6821\u9a8c\u5165\u53c2\u662f\u5426\u5408\u6cd5\u3002<\/li>\n<li>\u8fd4\u56de\u503c\u7ed3\u6784\u4f53&#xff1a;MCP \u534f\u8bae\u89c4\u5b9a\u4e86 Server \u8fd4\u56de\u7ed9\u5927\u6a21\u578b\u7684\u4e0a\u4e0b\u6587\u683c\u5f0f\u3002\u5fc5\u987b\u7b26\u5408 { content: [{ type: &#034;text&#034;, text: &#8230; }] } \u7684\u6570\u7ec4\u5d4c\u5957\u7ed3\u6784\u3002\u5982\u679c\u4e2d\u9014\u53d1\u751f\u5f02\u5e38&#xff08;\u4f8b\u5982\u65e0\u6743\u9650\u3001\u8def\u5f84\u4e0d\u5b58\u5728&#xff09;&#xff0c;\u5219\u9700\u63d0\u4f9b isError: true \u6807\u8bb0&#xff0c;\u544a\u77e5\u5927\u6a21\u578b\u6267\u884c\u5931\u8d25&#xff0c;\u4ee5\u4fbf\u5927\u6a21\u578b\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u8fdb\u884c\u8c03\u6574\u6216\u5411\u7528\u6237\u62a5\u9519\u3002<\/li>\n<li>StdioServerTransport \u4e0e console.error \u7684\u8bbe\u8ba1\u5999\u5904&#xff1a; \u5728\u4e3b\u51fd\u6570 main \u4e2d&#xff0c;\u6211\u4eec\u91c7\u7528\u4e86 Stdio&#xff08;\u6807\u51c6\u8f93\u5165\u8f93\u51fa&#xff09;\u8fdb\u7a0b\u7ba1\u9053\u8fdb\u884c\u901a\u4fe1\u3002\u8fd9\u610f\u5473\u7740\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u4f20\u9012 JSON-RPC \u6570\u636e\u662f\u901a\u8fc7 process.stdin \u548c process.stdout \u5b8c\u6210\u7684\u3002 \u56e0\u6b64&#xff0c;\u670d\u52a1\u5668\u4ee3\u7801\u4e2d\u7edd\u5bf9\u4e0d\u80fd\u51fa\u73b0\u666e\u901a\u7684 console.log\u3002\u56e0\u4e3a\u4efb\u4f55 console.log \u90fd\u4f1a\u6c61\u67d3 stdout \u7ba1\u9053&#xff0c;\u5bfc\u81f4\u5ba2\u6237\u7aef\u89e3\u6790 JSON \u62a5\u9519\u3002\u8fd9\u5c31\u89e3\u91ca\u4e86\u4e3a\u4ec0\u4e48\u4ee3\u7801\u4e2d\u63d0\u793a\u670d\u52a1\u542f\u52a8\u7684\u65e5\u5fd7\u5fc5\u987b\u4f7f\u7528 console.error \u8f93\u51fa\u2014\u2014\u56e0\u4e3a stderr \u4e0d\u4f1a\u5f71\u54cd\u4e3b\u901a\u4fe1\u7ba1\u9053&#xff0c;\u5b83\u662f\u5b89\u5168\u7684\u65e5\u5fd7\u8f93\u51fa\u901a\u9053\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u843d\u5730\u96c6\u6210&#xff1a;\u63a5\u5165 AI \u7814\u53d1\u73af\u5883<\/h2>\n<p>\u7f16\u5199\u5b8c\u4ee3\u7801\u540e&#xff0c;\u5982\u4f55\u8ba9\u6211\u4eec\u7684 AI \u7f16\u8f91\u5668&#xff08;\u5982 Trae \/ VS Code \u7b49&#xff09;\u7528\u4e0a\u8fd9\u4e2a\u5de5\u5177\u5462&#xff1f;<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u7f16\u8f91\u5668\u652f\u6301\u7684 MCP \u914d\u7f6e\u6587\u4ef6&#xff08;\u901a\u5e38\u4f4d\u4e8e\u9879\u76ee\u6839\u76ee\u5f55\u7684 .trae\/mcp.json \u6216\u5168\u5c40\u914d\u7f6e\u4e2d&#xff09;\u6765\u5bfc\u5165\u8be5\u670d\u52a1\u3002\u914d\u7f6e\u7684\u6838\u5fc3\u903b\u8f91\u662f\u544a\u8bc9 Host \u5982\u4f55\u7528 Node \u542f\u52a8\u6211\u4eec\u5199\u597d\u7684\u811a\u672c&#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;simple-read-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;node&#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 string\">&#034;\/\u4f60\u7684\u9879\u76ee\u7edd\u5bf9\u8def\u5f84\/app.service.mjs&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;disabled&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/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><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725025724-6a642614ae21b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u6253\u5f00\u7f16\u8f91\u5668\u7684 MCP \u7ba1\u7406\u9762\u677f&#xff0c;\u4f60\u4f1a\u770b\u5230\u5982\u56fe\u6240\u793a\u7684\u754c\u9762&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725025725-6a6426151f305.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5f53\u770b\u5230 simple-read-mcp \u663e\u793a\u4e3a\u542f\u7528\u72b6\u6001\u4e14\u5e26\u6709\u7eff\u8272\u5bf9\u52fe\u65f6&#xff0c;\u8bf4\u660e\u5bbf\u4e3b\u5ba2\u6237\u7aef\u5df2\u7ecf\u6210\u529f\u901a\u8fc7 Stdio \u7ba1\u9053\u62c9\u8d77\u4e86\u6211\u4eec\u7684 Node.js \u8fdb\u7a0b&#xff0c;\u5e76\u5b8c\u6210\u4e86\u80fd\u529b\u63e1\u624b\u3002<\/p>\n<p>\u73b0\u5728&#xff0c;\u4f60\u53ef\u4ee5\u5728\u804a\u5929\u5bf9\u8bdd\u6846\u6216\u8005 Agent \u6a21\u5f0f\u4e0b\u76f4\u63a5\u5bf9 AI \u8bf4&#xff1a;\u201c\u5e2e\u6211\u5206\u6790\u4e00\u4e0b\u7cfb\u7edf\u91cc\u6839\u76ee\u5f55\u4e0b\u7684 package.json\u201d\u3002AI \u5c06\u5728\u540e\u53f0\u81ea\u52a8\u8bc6\u522b\u5e76\u8c03\u7528 read_file \u5de5\u5177&#xff0c;\u8bfb\u53d6\u5185\u5bb9\u5e76\u7ed9\u51fa\u4e13\u4e1a\u7684\u89e3\u7b54\u3002<\/p>\n<hr \/>\n<h2>\u603b\u7ed3<\/h2>\n<p>MCP \u534f\u8bae\u7684\u51fa\u73b0&#xff0c;\u5728 LLM \u4e0e\u672c\u5730\u7269\u7406\u4e16\u754c\u4e4b\u95f4\u67b6\u8d77\u4e86\u4e00\u5ea7\u6807\u51c6\u5316\u7684\u6865\u6881\u3002\u901a\u8fc7\u672c\u6587\u7684\u5b9e\u8df5&#xff0c;\u6211\u4eec\u4ec5\u7528\u4e86\u4e0d\u5230 40 \u884c\u7684 Node.js \u4ee3\u7801&#xff0c;\u5c31\u5b9e\u73b0\u4e86\u4e00\u4e2a\u5b89\u5168\u3001\u89c4\u8303\u7684\u672c\u5730\u6587\u4ef6\u8bfb\u53d6\u670d\u52a1\u5668\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u7684\u751f\u4ea7\u5b9e\u8df5\u4e2d&#xff0c;\u4f60\u53ef\u4ee5\u57fa\u4e8e\u6b64\u67b6\u6784\u8fdb\u884c\u66f4\u5e7f\u9614\u7684\u6269\u5c55&#xff1a;<\/p>\n<ul>\n<li>\u5b89\u5168\u6027\u63a7\u5236&#xff1a;\u5728 read_file \u4e2d\u52a0\u5165\u6c99\u7bb1\u8def\u5f84\u6821\u9a8c&#xff0c;\u9632\u6b62 AI \u88ab\u63d0\u793a\u8bcd\u653b\u51fb&#xff08;Prompt Injection&#xff09;\u8fdb\u800c\u8bfb\u53d6\u7cfb\u7edf\u654f\u611f\u6587\u4ef6&#xff08;\u5982 .env \u6216 ~\/.ssh&#xff09;\u3002<\/li>\n<li>\u591a\u529f\u80fd\u96c6\u6210&#xff1a;\u5728\u540c\u4e00\u4e2a McpServer \u5b9e\u4f8b\u4e0a&#xff0c;\u901a\u8fc7 server.tool \u7ee7\u7eed\u6302\u8f7d\u6570\u636e\u5e93\u67e5\u8be2\u3001\u5916\u90e8 API \u8054\u52a8\u3001\u81ea\u52a8\u5316\u7f16\u8bd1\u7b49\u66f4\u591a\u5de5\u5177\u3002<\/li>\n<\/ul>\n<p>\u638c\u63e1 MCP&#xff0c;\u5c31\u662f\u638c\u63e1\u4e86\u8ba9 AI Agent \u8d70\u5411\u52a1\u5b9e\u843d\u5730\u7684\u94a5\u5319\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u4f60\u987a\u5229\u5f00\u542f\u81ea\u5b9a\u4e49 AI \u5de5\u5177\u5e93\u7684\u5927\u95e8&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u5bc6 MCP \u534f\u8bae&#xff1a;\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668\u524d\u8a00\u4e3a\u4ec0\u4e48\u9700\u8981 MCP&#xff1f;\u5b83\u89e3\u51b3\u4e86\u4ec0\u4e48\u95ee\u9898&#xff1f;\u5f00\u53d1\u51c6\u5907\u6838\u5fc3\u5b9e\u73b0&#xff1a;\u624b\u5199 simple-read-mcp \u670d\u52a1\u4ee3\u7801\u6df1\u5ea6\u89e3\u6790\u843d\u5730\u96c6\u6210&#xff1a;\u63a5\u5165 AI \u7814\u53d1\u73af\u5883\u603b\u7ed3\u524d\u8a00<br \/>\n\u5728\u5f53\u4e0b\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u4e0e AI Agent \u6280\u672f\u7206\u53d1\u7684\u65f6\u4ee3&#xff0c;AI \u52a9\u624b\u5728\u7f16\u5199\u4ee3\u7801\u3001\u89e3\u7b54\u7591\u95ee\u65f6\u8868\u73b0\u5f97\u8d8a\u53d1\u6210\u719f\u3002\u7136\u800c&amp;#xff0<\/p>\n","protected":false},"author":2,"featured_media":82637,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[186,43,44],"topic":[],"class_list":["post-82639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-node-js","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668 - \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\/82639.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u89e3\u5bc6 MCP \u534f\u8bae&#xff1a;\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668\u524d\u8a00\u4e3a\u4ec0\u4e48\u9700\u8981 MCP&#xff1f;\u5b83\u89e3\u51b3\u4e86\u4ec0\u4e48\u95ee\u9898&#xff1f;\u5f00\u53d1\u51c6\u5907\u6838\u5fc3\u5b9e\u73b0&#xff1a;\u624b\u5199 simple-read-mcp \u670d\u52a1\u4ee3\u7801\u6df1\u5ea6\u89e3\u6790\u843d\u5730\u96c6\u6210&#xff1a;\u63a5\u5165 AI \u7814\u53d1\u73af\u5883\u603b\u7ed3\u524d\u8a00 \u5728\u5f53\u4e0b\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u4e0e AI Agent \u6280\u672f\u7206\u53d1\u7684\u65f6\u4ee3&#xff0c;AI \u52a9\u624b\u5728\u7f16\u5199\u4ee3\u7801\u3001\u89e3\u7b54\u7591\u95ee\u65f6\u8868\u73b0\u5f97\u8d8a\u53d1\u6210\u719f\u3002\u7136\u800c&amp;#xff0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/82639.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-25T02:57:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725025724-6a642614ae21b.png\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82639.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/82639.html\",\"name\":\"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-25T02:57:26+00:00\",\"dateModified\":\"2026-07-25T02:57:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/82639.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/82639.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82639.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668\"}]},{\"@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":"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668 - \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\/82639.html","og_locale":"zh_CN","og_type":"article","og_title":"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u89e3\u5bc6 MCP \u534f\u8bae&#xff1a;\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668\u524d\u8a00\u4e3a\u4ec0\u4e48\u9700\u8981 MCP&#xff1f;\u5b83\u89e3\u51b3\u4e86\u4ec0\u4e48\u95ee\u9898&#xff1f;\u5f00\u53d1\u51c6\u5907\u6838\u5fc3\u5b9e\u73b0&#xff1a;\u624b\u5199 simple-read-mcp \u670d\u52a1\u4ee3\u7801\u6df1\u5ea6\u89e3\u6790\u843d\u5730\u96c6\u6210&#xff1a;\u63a5\u5165 AI \u7814\u53d1\u73af\u5883\u603b\u7ed3\u524d\u8a00 \u5728\u5f53\u4e0b\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u4e0e AI Agent \u6280\u672f\u7206\u53d1\u7684\u65f6\u4ee3&#xff0c;AI \u52a9\u624b\u5728\u7f16\u5199\u4ee3\u7801\u3001\u89e3\u7b54\u7591\u95ee\u65f6\u8868\u73b0\u5f97\u8d8a\u53d1\u6210\u719f\u3002\u7136\u800c&amp;#xff0","og_url":"https:\/\/www.wsisp.com\/helps\/82639.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-25T02:57:26+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725025724-6a642614ae21b.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/82639.html","url":"https:\/\/www.wsisp.com\/helps\/82639.html","name":"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-25T02:57:26+00:00","dateModified":"2026-07-25T02:57:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/82639.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/82639.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/82639.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u89e3\u5bc6 MCP \u534f\u8bae\uff1a\u5982\u4f55\u7528 Node.js \u4ece\u96f6\u624b\u5199\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u8bfb\u53d6 MCP \u670d\u52a1\u5668"}]},{"@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\/82639","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=82639"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/82639\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/82637"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=82639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=82639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=82639"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=82639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}