{"id":82044,"date":"2026-07-25T06:36:07","date_gmt":"2026-07-24T22:36:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/82044.html"},"modified":"2026-07-25T06:36:07","modified_gmt":"2026-07-24T22:36:07","slug":"5%e5%88%86%e9%92%9f%e6%90%ad%e5%bb%bamcp%e5%b7%a5%e5%85%b7%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%9a%e7%94%a8model-context-protocol%e8%ae%a9ai%e8%bf%9e%e6%8e%a5%e4%b8%80%e5%88%87","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/82044.html","title":{"rendered":"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u4f60\u662f\u5426\u9047\u5230\u8fc7\u8fd9\u4e9b\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u60f3\u8ba9AI\u5e2e\u4f60\u67e5\u6570\u636e\u5e93&#xff0c;\u4f46\u5b83\u53ea\u80fd\u770b\u4ee3\u7801&#xff0c;\u770b\u4e0d\u5230\u5b9e\u9645\u6570\u636e<\/li>\n<li>\u60f3\u8ba9AI\u76f4\u63a5\u64cd\u4f5cGitHub&#xff0c;\u4f46\u5b83\u53ea\u80fd\u751f\u6210\u547d\u4ee4&#xff0c;\u65e0\u6cd5\u771f\u6b63\u6267\u884c<\/li>\n<li>\u4e0d\u540cAI\u5de5\u5177\u5404\u6709\u5404\u7684\u63d2\u4ef6\u7cfb\u7edf&#xff0c;\u6362\u4e2a\u5de5\u5177\u5c31\u8981\u91cd\u65b0\u914d\u7f6e<\/li>\n<\/ul>\n<p>Model Context Protocol&#xff08;MCP&#xff09; \u6b63\u662f\u4e3a\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u800c\u751f\u7684\u3002<\/p>\n<p>MCP\u662fAnthropic\u63a8\u51fa\u7684\u5f00\u653e\u6807\u51c6\u534f\u8bae&#xff0c;\u8ba9AI\u5e94\u7528\u80fd\u591f\u4ee5\u7edf\u4e00\u7684\u65b9\u5f0f\u8fde\u63a5\u5404\u79cd\u5916\u90e8\u5de5\u5177\u548c\u6570\u636e\u6e90\u3002\u672c\u6587\u5c06\u624b\u628a\u624b\u6559\u4f60\u642d\u5efa\u81ea\u5df1\u7684MCP\u5de5\u5177\u670d\u52a1\u5668&#xff0c;\u8ba9AI\u771f\u6b63\u6210\u4e3a\u4f60\u7684\u300c\u5168\u80fd\u52a9\u624b\u300d\u3002<\/p>\n<h3>\u4e00\u3001MCP\u534f\u8bae\u6838\u5fc3\u539f\u7406<\/h3>\n<h4>1.1 \u4e3a\u4ec0\u4e48\u9700\u8981MCP&#xff1f;<\/h4>\n<p>\u4f20\u7edf\u7684AI\u5de5\u5177\u96c6\u6210\u662f\u8fd9\u6837\u7684&#xff1a;<\/p>\n<p>AI\u5e94\u7528 \u2192 \u4e13\u7528\u63d2\u4ef6A \u2192 \u4e13\u7528\u63d2\u4ef6B \u2192 \u4e13\u7528\u63d2\u4ef6C<br \/>\n         (\u6bcf\u4e2a\u63d2\u4ef6\u72ec\u7acb\u5f00\u53d1&#xff0c;\u65e0\u6cd5\u590d\u7528)<\/p>\n<p>MCP\u6539\u53d8\u4e86\u8fd9\u4e2a\u67b6\u6784&#xff1a;<\/p>\n<p>AI\u5e94\u7528 \u2190\u2192 MCP\u534f\u8bae \u2190\u2192 MCP\u670d\u52a1\u5668A<br \/>\n                  \u2190\u2192 MCP\u670d\u52a1\u5668B<br \/>\n                  \u2190\u2192 MCP\u670d\u52a1\u5668C<br \/>\n         (\u6240\u6709\u670d\u52a1\u5668\u4f7f\u7528\u540c\u4e00\u534f\u8bae&#xff0c;\u5373\u63d2\u5373\u7528)<\/p>\n<p>MCP\u7684\u6838\u5fc3\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li>\u6807\u51c6\u5316&#xff1a;\u4e00\u5957\u534f\u8bae&#xff0c;\u8fde\u63a5\u6240\u6709\u5de5\u5177<\/li>\n<li>\u53ef\u53d1\u73b0\u6027&#xff1a;MCP\u542f\u52a8\u65f6\u81ea\u52a8\u66b4\u9732\u6240\u6709\u53ef\u7528\u5de5\u5177\u53ca\u53c2\u6570<\/li>\n<li>\u53cc\u5411\u901a\u4fe1&#xff1a;AI\u4e0d\u4ec5\u80fd\u8c03\u7528\u5de5\u5177&#xff0c;\u8fd8\u80fd\u8bfb\u53d6\u8d44\u6e90\u3001\u83b7\u53d6\u63d0\u793a<\/li>\n<\/ul>\n<h4>1.2 MCP\u7684\u4e09\u79cd\u80fd\u529b<\/h4>\n<p>MCP\u670d\u52a1\u5668\u5411AI\u66b4\u9732\u4e09\u79cd\u80fd\u529b&#xff1a;<\/p>\n<p>MCP\u670d\u52a1\u5668<br \/>\n\u251c\u2500\u2500 Tools&#xff08;\u5de5\u5177&#xff09;     \u2192 AI\u53ef\u4ee5\u8c03\u7528\u7684\u51fd\u6570<br \/>\n\u251c\u2500\u2500 Resources&#xff08;\u8d44\u6e90&#xff09; \u2192 AI\u53ef\u4ee5\u8bfb\u53d6\u7684\u6570\u636e<br \/>\n\u2514\u2500\u2500 Prompts&#xff08;\u63d0\u793a&#xff09;   \u2192 \u9884\u5b9a\u4e49\u7684\u63d0\u793a\u6a21\u677f<\/p>\n<h3>\u4e8c\u3001\u5feb\u901f\u642d\u5efaMCP\u670d\u52a1\u5668<\/h3>\n<h4>2.1 \u73af\u5883\u51c6\u5907<\/h4>\n<p><span class=\"token comment\"># Node.js \u73af\u5883&#xff08;\u63a8\u8350 v18&#043;&#xff09;<\/span><br \/>\n<span class=\"token function\">node<\/span> <span class=\"token parameter variable\">&#8211;version<\/span><\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u9879\u76ee<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> my-mcp-server <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token builtin class-name\">cd<\/span> my-mcp-server<br \/>\n<span class=\"token function\">npm<\/span> init <span class=\"token parameter variable\">-y<\/span><\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5 MCP SDK<\/span><br \/>\n<span class=\"token function\">npm<\/span> <span class=\"token function\">install<\/span> &#064;modelcontextprotocol\/sdk<\/p>\n<h4>2.2 \u521b\u5efa\u7b2c\u4e00\u4e2aMCP\u670d\u52a1\u5668<\/h4>\n<p>\u521b\u5efa\u4e00\u4e2a\u5929\u6c14\u67e5\u8be2\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ server.js<\/span><br \/>\n<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><\/p>\n<p><span class=\"token comment\">\/\/ \u521b\u5efa\u670d\u52a1\u5668\u5b9e\u4f8b<\/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\">&#034;weather-server&#034;<\/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\">&#034;1.0.0&#034;<\/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\">\/\/ \u6ce8\u518c\u5929\u6c14\u67e5\u8be2\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;get_weather&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;\u67e5\u8be2\u6307\u5b9a\u57ce\u5e02\u7684\u5929\u6c14\u4fe1\u606f&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">city<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">type<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;string&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token literal-property property\">description<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;\u57ce\u5e02\u540d\u79f0&#xff0c;\u5982\u5317\u4eac\u3001\u4e0a\u6d77&#034;<\/span> <span class=\"token punctuation\">}<\/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> city <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 comment\">\/\/ \u6a21\u62dfAPI\u8c03\u7528<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> weatherData <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      city<span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token literal-property property\">temperature<\/span><span class=\"token operator\">:<\/span> Math<span class=\"token punctuation\">.<\/span><span class=\"token function\">round<\/span><span class=\"token punctuation\">(<\/span>Math<span class=\"token punctuation\">.<\/span><span class=\"token function\">random<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">15<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">15<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token literal-property property\">condition<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;\u6674&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u591a\u4e91&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u5c0f\u96e8&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span>Math<span class=\"token punctuation\">.<\/span><span class=\"token function\">floor<\/span><span class=\"token punctuation\">(<\/span>Math<span class=\"token punctuation\">.<\/span><span class=\"token function\">random<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token literal-property property\">humidity<\/span><span class=\"token operator\">:<\/span> Math<span class=\"token punctuation\">.<\/span><span class=\"token function\">round<\/span><span class=\"token punctuation\">(<\/span>Math<span class=\"token punctuation\">.<\/span><span class=\"token function\">random<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">40<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">40<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <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><br \/>\n        <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 constant\">JSON<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">stringify<\/span><span class=\"token punctuation\">(<\/span>weatherData<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">null<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/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><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\">\/\/ \u542f\u52a8\u670d\u52a1\u5668<\/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 \/>\nserver<span class=\"token punctuation\">.<\/span><span class=\"token function\">run<\/span><span class=\"token punctuation\">(<\/span>transport<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>2.3 \u5728Claude Code\u4e2d\u96c6\u6210<\/h4>\n<p><span class=\"token comment\"># \u6dfb\u52a0MCP\u670d\u52a1\u5668<\/span><br \/>\nclaude mcp <span class=\"token function\">add<\/span> weather &#8212; npx tsx server.js<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u662f\u5426\u6dfb\u52a0\u6210\u529f<\/span><br \/>\nclaude mcp list<\/p>\n<p>\u73b0\u5728\u4f60\u5c31\u53ef\u4ee5\u8fd9\u6837\u548cClaude\u5bf9\u8bdd&#xff1a;<\/p>\n<p>\u7528\u6237&#xff1a;\u5e2e\u6211\u67e5\u4e00\u4e0b\u4e0a\u6d77\u7684\u5929\u6c14<\/p>\n<p>Claude&#xff1a;[\u81ea\u52a8\u8c03\u7528get_weather\u5de5\u5177]<br \/>\n\u8fd4\u56de&#xff1a;\u4e0a\u6d77\u4eca\u5929\u6674&#xff0c;\u6c14\u6e2923\u00b0C&#xff0c;\u6e7f\u5ea665%<\/p>\n<h3>\u4e09\u3001\u5b9e\u6218&#xff1a;\u642d\u5efa\u6587\u4ef6\u7ba1\u7406MCP\u670d\u52a1\u5668<\/h3>\n<p>\u8fd9\u662f\u4e00\u4e2a\u66f4\u5b9e\u7528\u7684\u4f8b\u5b50&#xff0c;\u8ba9AI\u80fd\u591f\u8bfb\u53d6\u3001\u641c\u7d22\u3001\u7f16\u8f91\u9879\u76ee\u6587\u4ef6&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ filesystem-server.js<\/span><br \/>\n<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> readdir<span class=\"token punctuation\">,<\/span> readFile<span class=\"token punctuation\">,<\/span> writeFile<span class=\"token punctuation\">,<\/span> glob <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;fs\/promises&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> join <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#034;path&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><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\">&#034;filesystem-server&#034;<\/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\">&#034;1.0.0&#034;<\/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\">\/\/ \u5217\u51fa\u76ee\u5f55\u6587\u4ef6<\/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;list_files&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;\u5217\u51fa\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">directory<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">type<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;string&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token literal-property property\">description<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;\u76ee\u5f55\u8def\u5f84&#034;<\/span> <span class=\"token punctuation\">}<\/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> directory <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\">const<\/span> files <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> <span class=\"token function\">readdir<\/span><span class=\"token punctuation\">(<\/span>directory<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/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> <span class=\"token constant\">JSON<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">stringify<\/span><span class=\"token punctuation\">(<\/span>files<span class=\"token punctuation\">)<\/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><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u641c\u7d22\u6587\u4ef6\u5185\u5bb9<\/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;search_files&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;\u5728\u6587\u4ef6\u4e2d\u641c\u7d22\u5173\u952e\u8bcd&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token literal-property property\">pattern<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">type<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;string&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token literal-property property\">description<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;\u641c\u7d22\u6a21\u5f0f&#xff0c;\u5982 *.js&#034;<\/span> <span class=\"token punctuation\">}<\/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 literal-property property\">type<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;string&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token literal-property property\">description<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;\u8981\u641c\u7d22\u7684\u5185\u5bb9&#034;<\/span> <span class=\"token punctuation\">}<\/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> pattern<span class=\"token punctuation\">,<\/span> content <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\">const<\/span> results <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u7b80\u5316\u793a\u4f8b&#xff0c;\u5b9e\u9645\u9700\u8981\u904d\u5386\u6587\u4ef6<\/span><br \/>\n    results<span class=\"token punctuation\">.<\/span><span class=\"token function\">push<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token literal-property property\">file<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;example.js&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token literal-property property\">matches<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">\u7b2c15\u884c: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>content<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/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> <span class=\"token constant\">JSON<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">stringify<\/span><span class=\"token punctuation\">(<\/span>results<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">null<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/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><span class=\"token punctuation\">;<\/span><\/p>\n<p><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 \/>\nserver<span class=\"token punctuation\">.<\/span><span class=\"token function\">run<\/span><span class=\"token punctuation\">(<\/span>transport<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h3>\u56db\u3001\u5e38\u7528MCP\u670d\u52a1\u5668\u63a8\u8350<\/h3>\n<h4>4.1 \u5b98\u65b9\u7ef4\u62a4\u7684MCP\u670d\u52a1\u5668<\/h4>\n<table>\n<tr>\u670d\u52a1\u5668\u529f\u80fd\u5b89\u88c5\u547d\u4ee4<\/tr>\n<tbody>\n<tr>\n<td>filesystem<\/td>\n<td>\u672c\u5730\u6587\u4ef6\u8bfb\u5199<\/td>\n<td>npx -y &#064;modelcontextprotocol\/server-filesystem \/path<\/td>\n<\/tr>\n<tr>\n<td>github<\/td>\n<td>GitHub API\u64cd\u4f5c<\/td>\n<td>npx -y &#064;modelcontextprotocol\/server-github<\/td>\n<\/tr>\n<tr>\n<td>slack<\/td>\n<td>Slack\u6d88\u606f\u53d1\u9001<\/td>\n<td>npx -y &#064;modelcontextprotocol\/server-slack<\/td>\n<\/tr>\n<tr>\n<td>postgres<\/td>\n<td>PostgreSQL\u6570\u636e\u5e93<\/td>\n<td>npx -y &#064;modelcontextprotocol\/server-postgres<\/td>\n<\/tr>\n<tr>\n<td>memory<\/td>\n<td>\u6301\u4e45\u5316\u8bb0\u5fc6<\/td>\n<td>npx -y &#064;modelcontextprotocol\/server-memory<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.2 \u793e\u533a\u70ed\u95e8MCP\u670d\u52a1\u5668<\/h4>\n<table>\n<tr>\u670d\u52a1\u5668\u529f\u80fd\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>puppeteer<\/td>\n<td>\u6d4f\u89c8\u5668\u81ea\u52a8\u5316<\/td>\n<td>\u7f51\u9875\u622a\u56fe\u3001\u6570\u636e\u6293\u53d6<\/td>\n<\/tr>\n<tr>\n<td>sentry<\/td>\n<td>\u9519\u8bef\u8ffd\u8e2a\u67e5\u8be2<\/td>\n<td>Bug\u6392\u67e5<\/td>\n<\/tr>\n<tr>\n<td>figma<\/td>\n<td>\u8bbe\u8ba1\u7a3f\u8bfb\u53d6<\/td>\n<td>\u524d\u7aef\u5f00\u53d1<\/td>\n<\/tr>\n<tr>\n<td>notion<\/td>\n<td>\u7b14\u8bb0\u8bfb\u5199<\/td>\n<td>\u4e2a\u4eba\u77e5\u8bc6\u7ba1\u7406<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e94\u3001MCP\u534f\u8bae\u5de5\u4f5c\u539f\u7406\u56fe\u89e3<\/h3>\n<h4>5.1 \u67b6\u6784\u56fe<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724223604-6a63e8d4857c1.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502                    AI \u5e94\u7528                              \u2502<br \/>\n\u2502              (Claude Code \/ Cursor)                     \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n                      \u2502 MCP\u534f\u8bae<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502                   MCP Host                               \u2502<br \/>\n\u2502              (\u8d1f\u8d23\u7ba1\u7406\u591a\u4e2aMCP\u670d\u52a1\u5668\u8fde\u63a5)                   \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n       \u2502              \u2502              \u2502<br \/>\n       \u25bc              \u25bc              \u25bc<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502  Server  \u2502   \u2502  Server  \u2502   \u2502  Server  \u2502<br \/>\n\u2502 (\u6587\u4ef6\u7cfb\u7edf) \u2502   \u2502 (GitHub) \u2502   \u2502 (\u6570\u636e\u5e93) \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<h4>5.2 \u8bf7\u6c42\u6d41\u7a0b<\/h4>\n<p>1. \u7528\u6237\u63d0\u95ee: &#034;\u5e2e\u6211\u770b\u770b\u8fd9\u4e2a\u9879\u76ee\u7684README&#034;<br \/>\n         \u2502<br \/>\n         \u25bc<br \/>\n2. AI\u5206\u6790\u9700\u8981\u8c03\u7528readFile\u5de5\u5177<br \/>\n         \u2502<br \/>\n         \u25bc<br \/>\n3. MCP\u534f\u8bae\u53d1\u9001\u8bf7\u6c42\u5230filesystem\u670d\u52a1\u5668<br \/>\n         \u2502<br \/>\n         \u25bc<br \/>\n4. \u670d\u52a1\u5668\u8bfb\u53d6\u6587\u4ef6&#xff0c;\u8fd4\u56de\u5185\u5bb9<br \/>\n         \u2502<br \/>\n         \u25bc<br \/>\n5. AI\u6574\u5408\u7ed3\u679c&#xff0c;\u8fd4\u56de\u7ed9\u7528\u6237<\/p>\n<h3>\u516d\u3001\u907f\u5751\u6307\u5357<\/h3>\n<h4>\u274c \u5e38\u89c1\u9519\u8bef<\/h4>\n<p>1. \u8def\u5f84\u6743\u9650\u4e0d\u8db3<\/p>\n<p><span class=\"token comment\"># \u9519\u8bef&#xff1a;\u76ee\u5f55\u6ca1\u6709\u8bfb\u53d6\u6743\u9650<\/span><br \/>\nclaude mcp <span class=\"token function\">add<\/span> fs &#8212; npx <span class=\"token parameter variable\">-y<\/span> &#064;modelcontextprotocol\/server-filesystem \/root<\/p>\n<p><span class=\"token comment\"># \u6b63\u786e&#xff1a;\u4f7f\u7528\u6709\u6743\u9650\u7684\u76ee\u5f55<\/span><br \/>\nclaude mcp <span class=\"token function\">add<\/span> fs &#8212; npx <span class=\"token parameter variable\">-y<\/span> &#064;modelcontextprotocol\/server-filesystem ~\/projects<\/p>\n<p>2. Node\u7248\u672c\u8fc7\u4f4e<\/p>\n<p><span class=\"token comment\"># MCP SDK\u9700\u8981Node 18&#043;<\/span><br \/>\n<span class=\"token function\">node<\/span> <span class=\"token parameter variable\">&#8211;version<\/span>  <span class=\"token comment\"># \u786e\u4fdd &gt;&#061; 18.0.0<\/span><\/p>\n<p>3. Windows\u8def\u5f84\u683c\u5f0f\u9519\u8bef<\/p>\n<p><span class=\"token comment\"># Windows\u9700\u8981\u4f7f\u7528\u53cc\u53cd\u659c\u6760\u6216\u6b63\u659c\u6760<\/span><br \/>\nclaude mcp <span class=\"token function\">add<\/span> fs &#8212; npx <span class=\"token parameter variable\">-y<\/span> &#064;modelcontextprotocol\/server-filesystem C:\/Users\/Projects<\/p>\n<h4>\u2705 \u6700\u4f73\u5b9e\u8df5<\/h4>\n<li>\u9650\u5236\u8bbf\u95ee\u8303\u56f4&#xff1a;\u59cb\u7ec8\u9650\u5236MCP\u670d\u52a1\u5668\u7684\u8bbf\u95ee\u76ee\u5f55&#xff0c;\u9632\u6b62\u8d8a\u6743<\/li>\n<li>\u654f\u611f\u4fe1\u606f\u5904\u7406&#xff1a;\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u4f20\u9012API Key&#xff0c;\u4e0d\u8981\u786c\u7f16\u7801<\/li>\n<li>\u9519\u8bef\u5904\u7406&#xff1a;\u4e3a\u6bcf\u4e2a\u5de5\u5177\u6dfb\u52a0try-catch\u548c\u9519\u8bef\u63d0\u793a<\/li>\n<li>\u7c7b\u578b\u5b9a\u4e49&#xff1a;\u4f7f\u7528TypeScript\u83b7\u5f97\u66f4\u597d\u7684\u7c7b\u578b\u68c0\u67e5<\/li>\n<h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<p>MCP\u534f\u8bae\u8ba9AI\u5de5\u5177\u96c6\u6210\u53d8\u5f97\u524d\u6240\u672a\u6709\u7684\u7b80\u5355&#xff1a;<\/p>\n<ul>\n<li>\u6807\u51c6\u5316&#xff1a;\u4e00\u5957\u534f\u8bae\u8fde\u63a5\u6240\u6709\u5de5\u5177<\/li>\n<li>\u53ef\u590d\u7528&#xff1a;\u5199\u4e00\u6b21MCP\u670d\u52a1\u5668&#xff0c;\u6240\u6709MCP\u5ba2\u6237\u7aef\u90fd\u80fd\u7528<\/li>\n<li>\u751f\u6001\u4e30\u5bcc&#xff1a;\u5b98\u65b9&#043;\u793e\u533a\u5df2\u6709\u6570\u767e\u4e2a\u73b0\u6210\u670d\u52a1\u5668<\/li>\n<\/ul>\n<p>\u4e0b\u4e00\u6b65\u5efa\u8bae&#xff1a;<\/p>\n<li>\u5c1d\u8bd5\u5b98\u65b9filesystem\u670d\u52a1\u5668&#xff0c;\u719f\u6089\u57fa\u672c\u7528\u6cd5<\/li>\n<li>\u57fa\u4e8e\u672c\u6587\u793a\u4f8b&#xff0c;\u642d\u5efa\u81ea\u5df1\u7684\u4e1a\u52a1\u5de5\u5177\u670d\u52a1\u5668<\/li>\n<li>\u63a2\u7d22\u793e\u533aMCP\u670d\u52a1\u5668&#xff0c;\u627e\u5230\u9002\u5408\u4f60\u5de5\u4f5c\u6d41\u7684\u5de5\u5177<\/li>\n<hr \/>\n<p>\u76f8\u5173\u8d44\u6e90&#xff1a;<\/p>\n<ul>\n<li>MCP\u5b98\u65b9\u6587\u6863&#xff1a;https:\/\/modelcontextprotocol.io<\/li>\n<li>Claude Code MCP\u547d\u4ee4&#xff1a;https:\/\/docs.anthropic.com\/en\/docs\/claude-code\/mcp<\/li>\n<\/ul>\n<p>\u5982\u679c\u672c\u6587\u5bf9\u4f60\u6709\u5e2e\u52a9&#xff0c;\u6b22\u8fce\u70b9\u8d5e\u3001\u6536\u85cf&#xff01;\u6709\u95ee\u9898\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u7559\u8a00&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00<br \/>\n\u4f60\u662f\u5426\u9047\u5230\u8fc7\u8fd9\u4e9b\u95ee\u9898&#xff1a;<br \/>\n\u60f3\u8ba9AI\u5e2e\u4f60\u67e5\u6570\u636e\u5e93&#xff0c;\u4f46\u5b83\u53ea\u80fd\u770b\u4ee3\u7801&#xff0c;\u770b\u4e0d\u5230\u5b9e\u9645\u6570\u636e\u60f3\u8ba9AI\u76f4\u63a5\u64cd\u4f5cGitHub&#xff0c;\u4f46\u5b83\u53ea\u80fd\u751f\u6210\u547d\u4ee4&#xff0c;\u65e0\u6cd5\u771f\u6b63\u6267\u884c\u4e0d\u540cAI\u5de5\u5177\u5404\u6709\u5404\u7684\u63d2\u4ef6\u7cfb\u7edf&#xff0c;\u6362\u4e2a\u5de5\u5177\u5c31\u8981\u91cd\u65b0\u914d\u7f6e<br \/>\nModel Context Protocol&#xff08;MCP&#xff09; \u6b63\u662f\u4e3a\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u800c\u751f\u7684\u3002<br \/>\nMCP\u662fAnthropic\u63a8\u51fa\u7684\u5f00\u653e\u6807\u51c6\u534f\u8bae&#xff0c;\u8ba9AI\u5e94\u7528\u80fd\u591f\u4ee5\u7edf\u4e00\u7684\u65b9\u5f0f\u8fde\u63a5<\/p>\n","protected":false},"author":2,"featured_media":82043,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50,43,44],"topic":[],"class_list":["post-82044","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-50","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>5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207 - \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\/82044.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 \u4f60\u662f\u5426\u9047\u5230\u8fc7\u8fd9\u4e9b\u95ee\u9898&#xff1a; \u60f3\u8ba9AI\u5e2e\u4f60\u67e5\u6570\u636e\u5e93&#xff0c;\u4f46\u5b83\u53ea\u80fd\u770b\u4ee3\u7801&#xff0c;\u770b\u4e0d\u5230\u5b9e\u9645\u6570\u636e\u60f3\u8ba9AI\u76f4\u63a5\u64cd\u4f5cGitHub&#xff0c;\u4f46\u5b83\u53ea\u80fd\u751f\u6210\u547d\u4ee4&#xff0c;\u65e0\u6cd5\u771f\u6b63\u6267\u884c\u4e0d\u540cAI\u5de5\u5177\u5404\u6709\u5404\u7684\u63d2\u4ef6\u7cfb\u7edf&#xff0c;\u6362\u4e2a\u5de5\u5177\u5c31\u8981\u91cd\u65b0\u914d\u7f6e Model Context Protocol&#xff08;MCP&#xff09; \u6b63\u662f\u4e3a\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u800c\u751f\u7684\u3002 MCP\u662fAnthropic\u63a8\u51fa\u7684\u5f00\u653e\u6807\u51c6\u534f\u8bae&#xff0c;\u8ba9AI\u5e94\u7528\u80fd\u591f\u4ee5\u7edf\u4e00\u7684\u65b9\u5f0f\u8fde\u63a5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/82044.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-24T22:36:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724223604-6a63e8d4857c1.jpg\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82044.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/82044.html\",\"name\":\"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-24T22:36:07+00:00\",\"dateModified\":\"2026-07-24T22:36:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/82044.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/82044.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82044.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207\"}]},{\"@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":"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207 - \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\/82044.html","og_locale":"zh_CN","og_type":"article","og_title":"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00 \u4f60\u662f\u5426\u9047\u5230\u8fc7\u8fd9\u4e9b\u95ee\u9898&#xff1a; \u60f3\u8ba9AI\u5e2e\u4f60\u67e5\u6570\u636e\u5e93&#xff0c;\u4f46\u5b83\u53ea\u80fd\u770b\u4ee3\u7801&#xff0c;\u770b\u4e0d\u5230\u5b9e\u9645\u6570\u636e\u60f3\u8ba9AI\u76f4\u63a5\u64cd\u4f5cGitHub&#xff0c;\u4f46\u5b83\u53ea\u80fd\u751f\u6210\u547d\u4ee4&#xff0c;\u65e0\u6cd5\u771f\u6b63\u6267\u884c\u4e0d\u540cAI\u5de5\u5177\u5404\u6709\u5404\u7684\u63d2\u4ef6\u7cfb\u7edf&#xff0c;\u6362\u4e2a\u5de5\u5177\u5c31\u8981\u91cd\u65b0\u914d\u7f6e Model Context Protocol&#xff08;MCP&#xff09; \u6b63\u662f\u4e3a\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u800c\u751f\u7684\u3002 MCP\u662fAnthropic\u63a8\u51fa\u7684\u5f00\u653e\u6807\u51c6\u534f\u8bae&#xff0c;\u8ba9AI\u5e94\u7528\u80fd\u591f\u4ee5\u7edf\u4e00\u7684\u65b9\u5f0f\u8fde\u63a5","og_url":"https:\/\/www.wsisp.com\/helps\/82044.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-24T22:36:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724223604-6a63e8d4857c1.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/82044.html","url":"https:\/\/www.wsisp.com\/helps\/82044.html","name":"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-24T22:36:07+00:00","dateModified":"2026-07-24T22:36:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/82044.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/82044.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/82044.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"5\u5206\u949f\u642d\u5efaMCP\u5de5\u5177\u670d\u52a1\u5668\uff1a\u7528Model Context Protocol\u8ba9AI\u8fde\u63a5\u4e00\u5207"}]},{"@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\/82044","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=82044"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/82044\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/82043"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=82044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=82044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=82044"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=82044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}