{"id":216,"date":"2025-12-15T00:19:43","date_gmt":"2025-12-14T16:19:43","guid":{"rendered":"https:\/\/www.xiewuyi.com\/?p=216"},"modified":"2025-12-15T00:19:44","modified_gmt":"2025-12-14T16:19:44","slug":"%e4%b8%80%e6%96%87%e8%af%bb%e6%87%82-function-calling-%e4%b8%8e-mcp","status":"publish","type":"post","link":"https:\/\/www.xiewuyi.com\/index.php\/2025\/12\/15\/%e4%b8%80%e6%96%87%e8%af%bb%e6%87%82-function-calling-%e4%b8%8e-mcp\/","title":{"rendered":"\u4e00\u6587\u8bfb\u61c2 Function Calling \u4e0e MCP"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u5f15\u8a00<\/h3>\n\n\n\n<p>\u5982\u679c\u8bf4 <strong>Function Calling<\/strong> \u662f\u8ba9 LLM \u957f\u51fa\u4e86\u201c\u53cc\u624b\u201d\uff0c\u90a3\u4e48 <strong>MCP (Model Context Protocol)<\/strong> \u5c31\u662f\u8d4b\u4e88\u4e86\u5b83\u4e00\u5957\u901a\u7528\u7684\u201c\u795e\u7ecf\u7cfb\u7edf\u201d\u3002<\/p>\n\n\n\n<p>\u5728\u8fc7\u53bb\uff0c\u6211\u4eec\u901a\u8fc7 Function Calling \u6559\u4f1a\u4e86 LLM \u5982\u4f55\u53bb\u6309\u8ba1\u7b97\u5668\u3001\u67e5\u5929\u6c14\u3001\u8bfb\u6570\u636e\u5e93\u3002\u4f46\u5f88\u5feb\uff0c\u6211\u4eec\u53d1\u73b0\u8fd9\u53cc\u201c\u624b\u201d\u6781\u5176\u7b28\u62d9\uff1a\u6bcf\u62ff\u8d77\u4e00\u4ef6\u65b0\u5de5\u5177\uff08\u63a5\u5165\u4e00\u4e2a\u65b0\u7684 API\uff09\uff0c\u6211\u4eec\u90fd\u8981\u50cf\u505a\u5916\u79d1\u624b\u672f\u4e00\u6837\u4fee\u6539\u6838\u5fc3\u4ee3\u7801\u6765\u9002\u914d\u3002\u6b64\u65f6\u7684\u6a21\u578b\uff0c\u4f9d\u7136\u662f\u4e00\u4e2a\u88ab\u5b64\u7acb\u5728\u6570\u636e\u5b64\u5c9b\u4e2d\u7684\u201c\u7f38\u4e2d\u4e4b\u8111\u201d\uff0c\u5b83\u867d\u7136\u806a\u660e\uff0c\u5374\u4e0e\u73b0\u5b9e\u4e16\u754c\u9694\u7740\u539a\u539a\u7684\u73bb\u7483\u5899\u3002<\/p>\n\n\n\n<p>\u968f\u7740 <strong>MCP<\/strong> \u7684\u53d1\u5e03\uff0c\u8fdb\u5316\u7684\u9f7f\u8f6e\u518d\u6b21\u8f6c\u52a8\u3002\u5b83\u4e0d\u518d\u8981\u6c42\u6a21\u578b\u53bb\u9002\u5e94\u5343\u5947\u767e\u602a\u7684\u5de5\u5177\uff0c\u800c\u662f\u8ba9\u5168\u4e16\u754c\u7684\u6570\u636e\u548c\u5de5\u5177\u5b66\u4f1a\u4e86\u201c\u81ea\u6211\u4ecb\u7ecd\u201d\u3002\u8fd9\u4e00\u8f6c\u53d8\uff0c\u6807\u5fd7\u7740 AI \u4ece\u5355\u6253\u72ec\u6597\u7684\u201c\u5de5\u5177\u4f7f\u7528\u8005\u201d\uff0c\u6b63\u5f0f\u8fdb\u5316\u4e3a\u4e07\u7269\u4e92\u8054\u7684\u201c\u751f\u6001\u4e3b\u5bb0\u8005\u201d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1 Function Calling \u7684\u672c\u8d28\u4e0e\u539f\u7406<\/h3>\n\n\n\n<p>\u5728\u63a2\u8ba8 MCP \u4e4b\u524d\uff0c\u6211\u4eec\u5fc5\u987b\u5148\u7406\u89e3\u6700\u57fa\u7840\u7684\u539f\u5b50\u80fd\u529b\u2014\u2014Function Calling\u3002\u6211\u4eec\u9700\u8981\u5398\u6e05\u4e00\u4e2a\u6838\u5fc3\u8bef\u533a\uff1aLLM \u5e76\u4e0d\u662f\u81ea\u5df1\u53bb\u70b9\u51fb\u4e86\u6309\u94ae\u3001\u8c03\u7528\u4e86API\u6216\u8fd0\u884c\u4e86\u4ee3\u7801\uff0c\u5b83\u6240\u505a\u7684\u4e00\u5207\uff0c\u4f9d\u7136\u662f\u201c\u9884\u6d4b\u4e0b\u4e00\u4e2a token \u201d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.1 \u4e0eLLM\u7684\u201c\u4e24\u6b21\u63e1\u624b\u201d<\/h4>\n\n\n\n<p>Function Calling \u7684\u672c\u8d28\uff0c\u662f<strong>\u81ea\u7136\u8bed\u8a00\u5230\u7ed3\u6784\u5316\u6307\u4ee4\uff08JSON\uff09\u7684\u7ffb\u8bd1\u5668<\/strong>\u3002\u4e3a\u4e86\u5b8c\u6210\u4e00\u6b21\u5de5\u5177\u8c03\u7528\uff0c\u7cfb\u7edf\u5b9e\u9645\u4e0a\u9700\u8981\u5728\u5e55\u540e\u8fdb\u884c<strong>\u81f3\u5c11\u4e24\u6b21 LLM \u8c03\u7528<\/strong>\u548c\u591a\u6b21\u4e0a\u4e0b\u6587\u62fc\u63a5\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7b2c\u4e00\u6b21\u8c03\u7528 (Intent &amp; Param Extraction):<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u7528\u6237\u63d0\u95ee\uff1a\u201c\u5317\u4eac\u5929\u6c14\u600e\u4e48\u6837\uff1f\u201d<\/li>\n\n\n\n<li>\u5e94\u7528\u7a0b\u5e8f\u5c06\u8fd9\u4e2a\u95ee\u9898\uff0c\u8fde\u540c\u53ef\u7528\u7684\u5de5\u5177\u5b9a\u4e49\uff08\u5982 <code>get_weather(location)<\/code>\uff09\uff0c\u4e00\u8d77\u53d1\u7ed9\u6a21\u578b\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u51b3\u7b56<\/strong>\uff1a \u6a21\u578b\u5e76\u6ca1\u6709\u56de\u7b54\u201c\u5929\u6c14\u4e0d\u9519\u201d\uff0c\u800c\u662f\u751f\u6210\u4e86\u4e00\u4e2a<strong>\u7ed3\u6784\u5316\u7684 JSON \u5bf9\u8c61<\/strong>\uff08\u5982 <code>{\"name\": \"get_weather\", \"args\": {\"location\": \"Beijing\"}}<\/code>\uff09\u3002\u540c\u65f6\uff0c\u6a21\u578b\u4f1a\u6253\u4e0a\u4e00\u4e2a\u201c\u505c\u6b62\u751f\u6210\u201d\u7684\u6807\u8bb0\uff0c\u544a\u8bc9\u5e94\u7528\u7a0b\u5e8f\uff1a\u201c\u6211\u8bdd\u6ca1\u8bf4\u5b8c\uff0c\u4f46\u6211\u9700\u8981\u4f60\u5e2e\u6211\u8dd1\u4e2a\u817f\u3002\u201d<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u4e2d\u95f4\u5c42\u6267\u884c (Execution):<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>JSON \u7684\u51c6\u786e\u6027\u4fdd\u969c\uff1a<\/strong> \u8fd9\u662f\u4e00\u4e2a\u5173\u952e\u6311\u6218\u3002\u867d\u7136\u6a21\u578b\u7ecf\u8fc7<strong>\u540e\u8bad\u7ec3<\/strong>\u80fd\u8f93\u51fa JSON\uff0c\u4f46\u4ecd\u53ef\u80fd\u51fa\u9519\uff08\u6bd4\u5982\u6f0f\u4e86\u62ec\u53f7\uff09\u3002\u73b0\u4ee3\u6846\u67b6\uff08\u5982 LangChain\uff09\u548c\u6a21\u578b\u63d0\u4f9b\u5546\uff08\u5982 OpenAI \u7684 Structured Outputs\uff09\u4f1a\u5728\u8fd9\u4e00\u6b65\u5229\u7528 <strong>JSON Schema<\/strong> \u8fdb\u884c\u6821\u9a8c\u3002\u5982\u679c\u683c\u5f0f\u9519\u8bef\uff0c\u5e94\u7528\u7a0b\u5e8f\u4f1a\u62a5\u9519\u751a\u81f3\u8ba9\u6a21\u578b\u91cd\u8bd5\uff1b\u5982\u679c\u683c\u5f0f\u6b63\u786e\uff0c\u5e94\u7528\u7a0b\u5e8f\u4f1a\u5728\u672c\u5730\u8fd0\u884c\u771f\u6b63\u7684 Python\/JS \u4ee3\u7801\uff08\u8c03\u7528\u5929\u6c14 API\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u7b2c\u4e8c\u6b21\u8c03\u7528 (Synthesis &amp; Response):<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5e94\u7528\u7a0b\u5e8f\u62ff\u5230 API \u8fd4\u56de\u7684\u7ed3\u679c\uff08<code>{\"temp\": \"25C\", \"condition\": \"Sunny\"}<\/code>\uff09\u3002<\/li>\n\n\n\n<li><strong>\u5173\u952e\u52a8\u4f5c\u2014\u2014\u4e0a\u4e0b\u6587\u7ec4\u88c5\uff1a<\/strong> \u5e94\u7528\u7a0b\u5e8f\u5c06\u201c\u7528\u6237\u7684\u539f\u59cb\u95ee\u9898\u201d + \u201c\u6a21\u578b\u7684 JSON \u6307\u4ee4\u201d + \u201cAPI \u7684\u6267\u884c\u7ed3\u679c\u201d\u4e09\u8005\u62fc\u63a5\u5728\u4e00\u8d77\uff0c\u4f5c\u4e3a\u65b0\u7684\u4e0a\u4e0b\u6587\uff0c<strong>\u518d\u6b21<\/strong>\u53d1\u9001\u7ed9\u6a21\u578b\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u6700\u7ec8\u56de\u7b54\uff1a<\/strong> \u8fd9\u4e00\u6b21\uff0c\u6a21\u578b\u770b\u5230\u4e86\u6570\u636e\uff0c\u4e8e\u662f\u5b83\u6839\u636e\u4e0a\u4e0b\u6587\u751f\u6210\u6700\u7ec8\u56de\u590d\uff1a\u201c\u5317\u4eac\u4eca\u5929\u5929\u6c14\u6674\u6717\uff0c\u6c14\u6e29 25 \u5ea6\u3002\u201d<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">1.2 \u539f\u7406\u89e3\u6790<\/h4>\n\n\n\n<p>\u8fd9\u91cc\u5b58\u5728\u4e00\u4e2a\u5e38\u89c1\u7684\u8ba4\u77e5\u6df7\u6dc6\uff1aFunction Calling \u5230\u5e95\u662f\u6a21\u578b\u540e\u8bad\u7ec3\uff08Post-training\uff09\u7684\u80fd\u529b\uff0c\u8fd8\u662f\u63d0\u793a\u8bcd\u5de5\u7a0b\uff08Prompt Engineering\uff09\u7684\u7ed3\u679c\uff1f\u7b54\u6848\u662f\uff1a<strong>\u80fd\u529b\u9760\u8bad\u7ec3\uff0c\u77e5\u8bc6\u9760\u63d0\u793a\u3002<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>LLM \u8bad\u7ec3\u540e\u83b7\u5f97\u7684\u80fd\u529b\uff08SFT \u9636\u6bb5\uff09<\/strong>\uff1a\u901a\u8fc7\u76d1\u7763\u5fae\u8c03\uff08SFT\uff09\uff0c\u6a21\u578b\u5b66\u4f1a\u4e86\u4e24\u4e2a\u6838\u5fc3\u672c\u80fd\uff1a\n<ol class=\"wp-block-list\">\n<li><strong>\u610f\u56fe\u8bc6\u522b\uff1a<\/strong> \u77e5\u9053\u4f55\u65f6\u8be5\u505c\u6b62\u95f2\u804a\uff0c\u8f6c\u800c\u8f93\u51fa\u8c03\u7528\u6307\u4ee4\u3002\u8fd9\u662f\u901a\u8fc7 Toolformer \u63d0\u51fa\u7684\u81ea\u6211\u76d1\u7763\u5b66\u4e60\u65b9\u6cd5\uff0c\u8ba9\u6a21\u578b\u5728\u8bad\u7ec3\u9636\u6bb5\u901a\u8fc7\u201c\u8bd5\u9519\u201d\u7b5b\u9009\u51fa\u9ad8\u8d28\u91cf\u7684\u5de5\u5177\u8c03\u7528\u6837\u672c\u8fdb\u884c\u5fae\u8c03\u800c\u4e60\u5f97\u7684\u3002<\/li>\n\n\n\n<li><strong>\u683c\u5f0f\u9075\u5faa\uff1a<\/strong> \u5b66\u4f1a\u4e86\u8f93\u51fa\u7b26\u5408\u4e25\u82db\u8bed\u6cd5\u7684 JSON\uff0c\u800c\u4e0d\u662f\u4e71\u5199\u6587\u672c\u3002Gorilla \u8bba\u6587\u901a\u8fc7\u68c0\u7d22\u589e\u5f3a\u8bad\u7ec3\uff0c\u6559\u4f1a\u6a21\u578b\u7406\u89e3\u590d\u6742\u7684 API \u6587\u6863\uff0c\u5e76\u901a\u8fc7 AST\uff08\u62bd\u8c61\u8bed\u6cd5\u6811\uff09\u5339\u914d\u6765\u8bc4\u4f30\u751f\u6210\u7684\u4ee3\u7801\u7ed3\u6784\u662f\u5426\u6b63\u786e\uff0c\u4ece\u800c\u5927\u5e45\u51cf\u5c11\u5e7b\u89c9\u3002<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>\u63d0\u793a\u8bcd\u89e3\u51b3\u7684\u95ee\u9898\uff08Inference \u9636\u6bb5\uff09<\/strong>\uff1a\u6a21\u578b\u867d\u7136\u61c2 JSON \u7ed3\u6784\uff0c\u4f46\u5b83\u4e0d\u77e5\u9053\u4f60\u4eca\u5929\u5177\u4f53\u6709\u54ea\u4e9b\u5de5\u5177\u3002\u5f00\u53d1\u8005\u9700\u8981\u5728 System Prompt \u4e2d\u5c06\u5177\u4f53\u7684 API \u6587\u6863\uff08\u5982 <code>get_weather<\/code> \u7684\u53c2\u6570\u5b9a\u4e49\uff09\u6ce8\u5165\u8fdb\u53bb\u3002<\/li>\n\n\n\n<li><strong>\u5e94\u7528\u7a0b\u5e8f\u903b\u8f91\u89e3\u51b3\u7684\u95ee\u9898<\/strong>\uff1a\u89e3\u6790 JSON\u3001\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\u3001\u5904\u7406 API \u62a5\u9519\u3001\u5c06\u7ed3\u679c\u56de\u586b\u7ed9\u6a21\u578b\u3002\u8fd9\u4e9b\u662f\u4f20\u7edf\u7684\u5de5\u7a0b\u4ee3\u7801\u903b\u8f91\uff08Python\/Java\/JS\uff09\uff0c\u4e0e AI \u65e0\u5173\uff0c\u662f\u7a0b\u5e8f\u7684\u201c\u8eaf\u5e72\u201d\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2 \u5de5\u7a0b\u56f0\u5883<\/h3>\n\n\n\n<p>\u5c3d\u7ba1 Function Calling \u8d4b\u4e88\u4e86\u6a21\u578b\u884c\u52a8\u80fd\u529b\uff0c\u4f46\u5728\u5b9e\u9645\u5de5\u7a0b\u843d\u5730\u4e2d\uff0c\u5374\u9677\u5165\u4e86\u6ce5\u6f6d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1 \u201c\u80f6\u6c34\u4ee3\u7801\u201d\u7684\u5730\u72f1<\/h4>\n\n\n\n<p>\u6700\u5927\u7684\u75db\u70b9\u5728\u4e8e M x N \u8fde\u63a5\u96be\u9898\u3002<\/p>\n\n\n\n<p>\u5047\u8bbe\u4f60\u6709 3 \u4e2a\u6a21\u578b\uff08GPT-5.1, Gemini 3, Llama\uff09\u9700\u8981\u8fde\u63a5 5 \u4e2a\u5de5\u5177\uff08Linear, Slack, GitHub, Postgres, Google Drive\uff09\u3002\u4f60\u4e0d\u4ec5\u9700\u8981\u4e3a\u6bcf\u4e2a\u5de5\u5177\u7f16\u5199 API \u5c01\u88c5\u5668\uff0c\u8fd8\u8981\u4e3a\u6bcf\u4e2a\u6a21\u578b\u8c03\u6574 Prompt \u683c\u5f0f\u3002\u8fd9\u610f\u5473\u7740\u4f60\u9700\u8981\u7ef4\u62a4 3*5 = 15 \u5957\u9002\u914d\u4ee3\u7801\u3002\u6bcf\u4e00\u5957\u4ee3\u7801\u90fd\u5728\u505a\u7740\u65e0\u804a\u4e14\u8106\u5f31\u7684\u683c\u5f0f\u8f6c\u6362\u548c\u8def\u7531\u5206\u53d1\u5de5\u4f5c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 \u8106\u5f31\u7684\u751f\u6001\u7cfb\u7edf<\/h4>\n\n\n\n<p>\u8fd9\u79cd\u7d27\u8026\u5408\u5bfc\u81f4\u7cfb\u7edf\u6781\u5ea6\u8106\u5f31\u3002\u4e00\u65e6 Slack \u66f4\u65b0\u4e86 API \u7684\u67d0\u4e2a\u5b57\u6bb5\u540d\uff0c\u6216\u8005\u4f60\u51b3\u5b9a\u628a\u6587\u4ef6\u5b58\u50a8\u4ece Google Drive \u8fc1\u79fb\u5230 Dropbox\uff0c\u4f60\u7684\u6574\u4e2a Agent \u4ee3\u7801\u5c31\u9700\u8981\u91cd\u6784\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.3 \u624b\u5199 ReAct \u5faa\u73af\u7684\u201c\u4e0a\u4e0b\u6587\u9ed1\u6d1e\u201d<\/h4>\n\n\n\n<p>\u9664\u4e86\u4ee3\u7801\u7ef4\u62a4\u7684\u5669\u68a6\uff0c\u66f4\u6df1\u5c42\u7684\u95ee\u9898\u5728\u4e8e<strong>\u8fd0\u884c\u903b\u8f91\u7684\u975e\u6807\u51c6\u5316<\/strong>\u3002<\/p>\n\n\n\n<p>Function Calling \u53ea\u662f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u201c\u5355\u6b21\u8c03\u7528\u201d\u7684\u80fd\u529b\u3002\u4f46\u5728\u771f\u5b9e\u7684\u590d\u6742\u4efb\u52a1\u4e2d\uff08\u4f8b\u5982\u201c\u5e2e\u6211\u5206\u6790\u8fd9\u4e2a\u4ee3\u7801\u5e93\u5e76\u4fee\u590d Bug\u201d\uff09\uff0c\u6a21\u578b\u4e0d\u80fd\u53ea\u6709\u4e00\u6b21\u884c\u52a8\uff0c\u5b83\u5fc5\u987b\u7ecf\u5386 <strong>ReAct (Reason + Act)<\/strong> \u7684\u5b8c\u6574\u5faa\u73af\uff1aThought\uff08\u601d\u8003\uff09-&gt; Act\uff08\u884c\u52a8\uff09-&gt; Obs\uff08\u89c2\u5bdf\u7ed3\u679c\uff09-&gt; Thought\uff08\u518d\u601d\u8003\uff09\u3002<\/p>\n\n\n\n<p>\u4f46\u5728\u7b80\u5355\u7684 Function Calling \u6a21\u5f0f\u4e0b\uff0c\u8fd9\u4e2a <strong>\u201cObs\uff08\u89c2\u5bdf\uff09\u201d<\/strong> \u73af\u8282\u662f\u7f3a\u5931\u6807\u51c6\u7684\uff0c\u5bfc\u81f4\u4e86\u4e24\u4e2a\u5173\u4e8e\u201c\u8bed\u5883\uff08Context\uff09\u201d\u7684\u81f4\u547d\u95ee\u9898\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u201c\u611f\u77e5\u201d\u4e0e\u201c\u884c\u52a8\u201d\u7684\u6df7\u6dc6\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>\u95ee\u9898\u73b0\u72b6\uff1a<\/strong> \u5728\u6ca1\u6709 MCP \u65f6\uff0c\u5982\u679c\u6a21\u578b\u60f3\u201c\u770b\u201d\u4e00\u4e2a\u6587\u4ef6\uff0c\u5b83\u5fc5\u987b\u201c\u8c03\u7528\u201d\u4e00\u4e2a\u5de5\u5177\uff08\u6bd4\u5982 <code>read_file()<\/code>\uff09\u3002\u8fd9\u5bf9\u6a21\u578b\u6765\u8bf4\uff0c<strong>\u201c\u770b\u201d\uff08\u611f\u77e5\uff09\u53d8\u6210\u4e86\u4e00\u79cd\u201c\u505a\u201d\uff08\u884c\u52a8\uff09<\/strong>\u3002<\/li>\n\n\n\n<li><strong>\u540e\u679c\uff1a<\/strong> \u8fd9\u5bfc\u81f4\u4e86\u4e0a\u4e0b\u6587\u7684\u6df7\u4e71\u3002\u6a21\u578b\u6267\u884c\u4e86\u201c\u8bfb\u6587\u4ef6\u201d\u64cd\u4f5c\uff0c\u8fd4\u56de\u4e86 5000 \u884c\u4ee3\u7801\u3002\u8fd9 5000 \u884c\u4ee3\u7801\u88ab\u5f53\u4f5c\u201c\u5de5\u5177\u6267\u884c\u7ed3\u679c\u201d\u585e\u8fdb\u4e86\u5bf9\u8bdd\u5386\u53f2\uff08Chat History\uff09\u4e2d\u3002\u5f53\u5bf9\u8bdd\u7ee7\u7eed\uff0c\u5386\u53f2\u8bb0\u5f55\u53d8\u5f97\u6781\u5ea6\u81c3\u80bf\uff0c\u6a21\u578b\u5f88\u96be\u533a\u5206\u54ea\u4e9b\u662f\u201c\u80cc\u666f\u8d44\u6599\u201d\uff08\u672c\u5e94\u4e00\u76f4\u5b58\u5728\uff09\uff0c\u54ea\u4e9b\u662f\u201c\u64cd\u4f5c\u53cd\u9988\u201d\uff08\u4e34\u65f6\u6027\u7684\uff09\u3002<\/li>\n\n\n\n<li><strong>\u7f3a\u4e4f\u7edf\u4e00\u8bed\u5883\uff1a<\/strong> \u8fd9\u79cd\u6df7\u6742\u4f7f\u5f97\u6a21\u578b\u5931\u53bb\u4e86\u5bf9\u201c\u5f53\u524d\u73af\u5883\u201d\u7684\u6e05\u6670\u8ba4\u77e5\u2014\u2014\u5b83\u5c31\u50cf\u4e00\u4e2a\u8499\u7740\u773c\u775b\u7684\u4eba\uff0c\u53ea\u80fd\u901a\u8fc7\u4e0d\u65ad\u4f38\u624b\uff08\u8c03\u7528\u5de5\u5177\uff09\u6765\u6478\u7d22\u4e16\u754c\uff0c\u800c\u65e0\u6cd5\u7741\u5f00\u773c\u775b\u76f4\u63a5\u770b\u5230\u4e16\u754c\uff08\u83b7\u53d6 Context\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u4e0a\u4e0b\u6587\u7ba1\u7406\u7684\u9ed1\u6d1e<\/strong>\uff1a\u5f00\u53d1\u8005\u88ab\u8feb\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7f16\u5199\u590d\u6742\u7684\u903b\u8f91\u6765\u5904\u7406\u8fd9\u4e9b\u201c\u8bfb\u53d6\u5de5\u5177\u201d\u7684\u8fd4\u56de\u503c\u3002\u5e94\u8be5\u5168\u91cf\u4fdd\u7559\u5417\uff1f\u8fd8\u662f\u622a\u65ad\uff1f\u5982\u679c\u662f\u4e8c\u8fdb\u5236\u56fe\u7247\u600e\u4e48\u529e\uff1f\u8fd9\u79cd\u624b\u5de5\u4f5c\u574a\u5f0f\u7684\u4e0a\u4e0b\u6587\u62fc\u63a5\uff0c\u6781\u5176\u5bb9\u6613\u5bfc\u81f4\u6a21\u578b\u5e7b\u89c9\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">3 \u4f7f\u7528 MCP \u91cd\u6784\u201c\u795e\u7ecf\u7cfb\u7edf\u201d<\/h3>\n\n\n\n<p>MCP \u80fd\u89e3\u51b3\u4e0a\u8ff0\u95ee\u9898\u5417\uff1f\u7b54\u6848\u662f\u80af\u5b9a\u7684\u3002MCP \u7684\u6838\u5fc3\u601d\u60f3\u4e4b\u4e00\u5c31\u662f\u5c06\u201c\u611f\u77e5\u201d\u4ece\u201c\u884c\u52a8\u201d\u4e2d\u5265\u79bb\u51fa\u6765\u3002\u5b83\u5f15\u5165\u4e86 Resources\uff08\u8d44\u6e90\uff09\u539f\u8bed\uff0c\u4e13\u95e8\u8d1f\u8d23\u201c\u770b\u201d\uff08\u6784\u5efa\u4e0a\u4e0b\u6587\uff09\uff0c\u800c\u8ba9 Tools\uff08\u5de5\u5177\uff09\u4e13\u6ce8\u4e8e\u201c\u505a\u201d\uff08\u6267\u884c\u64cd\u4f5c\uff09\u3002\u8fd9\u610f\u5473\u7740\uff0c\u6570\u636e\u4e0d\u518d\u662f\u5de5\u5177\u8c03\u7528\u7684\u201c\u526f\u4f5c\u7528\u201d\uff0c\u800c\u662f\u6a21\u578b\u601d\u8003\u7684\u201c\u524d\u7f6e\u80cc\u666f\u201d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 \u4ec0\u4e48\u662f MCP\uff1f<\/h4>\n\n\n\n<p>MCP \u662f\u4e00\u79cd\u5f00\u653e\u6807\u51c6\uff0c\u5b83\u89c4\u5b9a\u4e86 AI \u5982\u4f55\u53d1\u73b0\u6570\u636e\u3001\u8c03\u7528\u5de5\u5177\u548c\u8bfb\u53d6\u8d44\u6e90\u3002<\/p>\n\n\n\n<p>\u8fd9\u5c31\u597d\u6bd4 USB \u63a5\u53e3\u3002\u5728 USB \u4e4b\u524d\uff0c\u8fde\u63a5\u9f20\u6807\u3001\u952e\u76d8\u9700\u8981\u4e0d\u540c\u7684\u63a5\u53e3\u3002MCP \u5c31\u662f AI \u754c\u7684 USB\u2014\u2014\u5b83\u4e0d\u518d\u5173\u5fc3\u4f60\u662f Postgres \u6570\u636e\u5e93\u8fd8\u662f Linear \u5de5\u5355\u7cfb\u7edf\uff0c\u53ea\u8981\u63d2\u4e0a\uff08Connect\uff09\uff0c\u7cfb\u7edf\u5c31\u80fd\u81ea\u52a8\u8bc6\u522b\u8bbe\u5907\u7684\u80fd\u529b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 \u6838\u5fc3\u67b6\u6784\uff1aHost\u3001Client \u4e0e Server<\/h4>\n\n\n\n<p>MCP \u7684\u67b6\u6784\u5c06\u7cfb\u7edf\u62c6\u5206\u4e3a\u4e09\u4e2a\u5404\u53f8\u5176\u804c\u7684\u89d2\u8272\u3002\u8981\u7406\u89e3 MCP \u7684\u8fd0\u884c\u673a\u5236\uff0c\u9996\u5148\u8981\u641e\u61c2\u8fd9\u201c\u4e09\u9a7e\u9a6c\u8f66\u201d\u662f\u5982\u4f55\u914d\u5408\u7684\u3002<\/p>\n\n\n\n<p><strong>1. Host<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8eab\u4efd\uff1a<\/strong> \u5b83\u662f\u76f4\u63a5\u4e0e\u7528\u6237\u4ea4\u4e92\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u6bd4\u5982 <strong>Claude Desktop<\/strong>\u3001<strong>Cursor<\/strong>\u3001<strong>VS Code<\/strong> \u6216\u8005\u4f60\u81ea\u5df1\u5f00\u53d1\u7684 AI Agent \u5e94\u7528\u3002<\/li>\n\n\n\n<li><strong>\u804c\u8d23\uff1a<\/strong> \u5b83\u662f\u7cfb\u7edf\u7684\u201c\u603b\u6307\u6325\u201d\u3002\u5b83\u8d1f\u8d23\u52a0\u8f7d LLM\uff08\u5927\u8111\uff09\uff0c\u7ba1\u7406\u7528\u6237\u754c\u9762\uff0c\u4ee5\u53ca\u51b3\u5b9a\u4f55\u65f6\u8fde\u63a5\u54ea\u4e9b\u5916\u90e8\u80fd\u529b\u3002<\/li>\n\n\n\n<li><strong>\u5173\u952e\u7279\u6027\uff1a<\/strong> Host \u662f\u591a\u5bf9\u4e00\u7684\u805a\u5408\u5668\u3002\u4e00\u4e2a Host \u53ef\u4ee5\u540c\u65f6\u8fde\u63a5\u6210\u767e\u4e0a\u5343\u4e2a\u4e0d\u540c\u7684 Server\uff0c\u5c06\u5b83\u4eec\u7684\u80fd\u529b\u6c47\u805a\u5728\u4e00\u8d77\u63d0\u4f9b\u7ed9 LLM\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>2. Client<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8eab\u4efd\uff1a<\/strong> \u5b83\u662f\u8fd0\u884c\u5728 Host \u5185\u90e8\u7684\u4e00\u4e2a\u6a21\u5757\uff08\u901a\u5e38\u662f SDK \u7684\u4e00\u90e8\u5206\uff09\u3002<\/li>\n\n\n\n<li><strong>\u804c\u8d23\uff1a<\/strong> \u8d1f\u8d23\u201c\u6253\u7535\u8bdd\u201d\u3002Host \u4e0d\u76f4\u63a5\u8ddf Server \u8bf4\u8bdd\uff0c\u800c\u662f\u901a\u8fc7 Client \u4e0eServer\u5efa\u7acb\u8fde\u63a5\u3001\u53d1\u9001\u8bf7\u6c42\u3001\u63a5\u6536\u54cd\u5e94\u3002<\/li>\n\n\n\n<li><strong>\u5173\u7cfb\uff1a<\/strong> <strong>1:1 \u8fde\u63a5<\/strong>\u3002\u6bcf\u4e00\u4e2a Client \u5b9e\u4f8b\u53ea\u8d1f\u8d23\u8fde\u63a5\u4e00\u4e2a\u5177\u4f53\u7684 Server\u3002\u5982\u679c\u4f60\u5728 Host \u91cc\u8fde\u63a5\u4e86 Git \u548c Postgres\uff0c\u90a3\u4e48 Host \u5185\u90e8\u5176\u5b9e\u542f\u52a8\u4e86\u4e24\u4e2a\u72ec\u7acb\u7684 Client \u5b9e\u4f8b\uff0c\u5206\u522b\u53bb\u7ef4\u62a4\u8fd9\u4e24\u6761\u7ebf\u8def\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>3. Server<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8eab\u4efd\uff1a<\/strong> \u5b83\u662f<strong>\u72ec\u7acb\u8fd0\u884c\u7684\u8fdb\u7a0b<\/strong>\uff0c\u7531\u5de5\u5177\u63d0\u4f9b\u65b9\u7f16\u5199\uff08\u5982 Linear \u5b98\u65b9\u6216\u5f00\u6e90\u793e\u533a\uff09\u3002\u5b83\u5c31\u50cf\u662f\u4e00\u4e2a\u201c\u5916\u8bbe\u201d\u3002<\/li>\n\n\n\n<li><strong>\u804c\u8d23\uff1a<\/strong> \u5e72\u810f\u6d3b\u7d2f\u6d3b\u3002\u5b83\u8d1f\u8d23\u53bb\u8fde\u63a5\u5e95\u5c42\u7684 SQL \u6570\u636e\u5e93\u3001\u8c03\u7528\u771f\u5b9e\u7684 GitHub API\uff0c\u7136\u540e\u628a\u7ed3\u679c\u8f6c\u6362\u6210 MCP \u6807\u51c6\u683c\u5f0f\u8fd4\u56de\u7ed9 Client\u3002<\/li>\n\n\n\n<li><strong>\u72ec\u7acb\u6027\uff1a<\/strong> \u8fd9\u662f MCP \u6700\u5177\u9769\u547d\u6027\u7684\u8bbe\u8ba1\u3002Server \u662f<strong>\u8f7b\u91cf\u7ea7\u3001\u6c99\u76d2\u5316<\/strong>\u7684\u3002Server A \u5d29\u4e86\uff0c\u4e0d\u5f71\u54cd Server B\uff0c\u66f4\u4e0d\u4f1a\u5bfc\u81f4 Host \u5d29\u6e83\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u5b83\u4eec\u5982\u4f55\u534f\u4f5c\uff1f<\/strong>\u60f3\u8c61\u4e00\u4e2a <strong>\u201c\u667a\u80fd\u5bb6\u5c45\u4e2d\u63a7\u7cfb\u7edf\u201d<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Host (\u4e2d\u63a7\u5c4f)\uff1a<\/strong> \u7528\u6237\u5728\u8fd9\u91cc\u53d1\u53f7\u65bd\u4ee4\uff08\u201c\u6253\u5f00\u7535\u5f71\u6a21\u5f0f\u201d\uff09\u3002<\/li>\n\n\n\n<li><strong>Server (\u667a\u80fd\u8bbe\u5907)\uff1a<\/strong> \u6bd4\u5982\u201c\u7c73\u5bb6\u53f0\u706f\u201d\u662f\u4e00\u4e2a Server\uff0c\u201cBose \u97f3\u54cd\u201d\u662f\u53e6\u4e00\u4e2a Server\u3002\u5b83\u4eec\u5404\u81ea\u72ec\u7acb\uff0c\u4e92\u4e0d\u5e72\u6270\u3002<\/li>\n\n\n\n<li><strong>Client (\u9a71\u52a8\u7a0b\u5e8f)\uff1a<\/strong> \u4e2d\u63a7\u7cfb\u7edf\u5185\u90e8\u52a0\u8f7d\u4e86\u201c\u53f0\u706f\u9a71\u52a8\u201d\u548c\u201c\u97f3\u54cd\u9a71\u52a8\u201d\u3002<\/li>\n\n\n\n<li><strong>\u6d41\u7a0b\uff1a<\/strong> \u7528\u6237\u5bf9 Host \u8bf4\u8bdd -> Host \u8c03\u5ea6\u5185\u90e8\u7684 Client -> Client \u901a\u8fc7\u6807\u51c6\u534f\u8bae\u6307\u4ee4\uff08MCP\uff09\u63a7\u5236\u5916\u90e8\u7684 Server\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3.3 \u89e3\u6784 MCP \u7684\u4e09\u5927\u201c\u539f\u8bed\u201d (Primitives)<\/h4>\n\n\n\n<p>\u7406\u89e3\u4e86\u7269\u7406\u67b6\u6784\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b Server \u5230\u5e95\u5411 Host \u63d0\u4f9b\u4e86\u4ec0\u4e48\u3002\u4e3a\u4e86\u8bb2\u6e05\u695a MCP \u5230\u5e95\u80fd\u505a\u4ec0\u4e48\uff0c\u6211\u4eec\u4ee5 <strong>Git MCP Server<\/strong> \u4f5c\u4e3a\u6848\u4f8b\u3002\u60f3\u8c61\u4e00\u4e0b\uff0c\u4f60\u6709\u4e00\u4e2a AI \u7f16\u7a0b\u52a9\u624b\uff08Host\uff09\uff0c\u5b83\u901a\u8fc7 MCP \u8fde\u63a5\u5230\u4e00\u4e2a Git \u4ee3\u7801\u4ed3\u5e93\uff08Server\uff09\uff0cMCP Server \u5411 AI \u66b4\u9732\u4e86\u4e09\u79cd\u6838\u5fc3\u539f\u8bed\uff1a<strong>Resources\uff08\u8d44\u6e90\uff09<\/strong>\u3001<strong>Tools\uff08\u5de5\u5177\uff09<\/strong> \u548c <strong>Prompts\uff08\u63d0\u793a\u8bcd\uff09<\/strong>\u3002<\/p>\n\n\n\n<p><strong>1. Resources<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b9a\u4e49\uff08\u88ab\u52a8\u611f\u77e5 \/ State\uff09\uff1a<\/strong> \u5b83\u662f Server \u7aef\u6301\u6709\u7684\u3001\u53ef\u88ab\u76f4\u63a5\u8bfb\u53d6\u7684\u6570\u636e\u3002\u5b83\u7c7b\u4f3c\u4e8e HTTP \u7684 <code>GET<\/code> \u8bf7\u6c42\uff0c\u4ee3\u8868<strong>\u53ea\u8bfb<\/strong>\u7684\u4fe1\u606f\u3002<\/li>\n\n\n\n<li><strong>\u89e3\u51b3\u4e86\u4ec0\u4e48\u75db\u70b9\uff1f<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>\u65e7\u6a21\u5f0f\uff1a<\/strong> \u5728\u6ca1\u6709 MCP \u65f6\uff0c\u6a21\u578b\u8981\u770b\u4ee3\u7801\u5fc5\u987b\u8c03\u7528 <code>read_file()<\/code>\u3002\u8fd9\u4e0d\u4ec5\u6d88\u8017\u4e00\u6b21\u5bf9\u8bdd\u8f6e\u6b21\uff0c\u66f4\u7cdf\u7cd5\u7684\u662f\uff0c\u8fd4\u56de\u7684 5000 \u884c\u4ee3\u7801\u4f1a\u88ab\u4f5c\u4e3a\u201c\u5de5\u5177\u6267\u884c\u7ed3\u679c\u201d\u8ffd\u52a0\u5230\u5bf9\u8bdd\u5386\u53f2\uff08History\uff09\u672b\u5c3e\u3002\u6bcf\u8bfb\u4e00\u6b21\uff0c\u5386\u53f2\u5c31\u81a8\u80c0\u4e00\u6b21\uff0c\u8fc5\u901f\u6491\u7206\u4e0a\u4e0b\u6587\u7a97\u53e3\u3002<\/li>\n\n\n\n<li><strong>MCP \u6a21\u5f0f\uff1a<\/strong> Resource \u5c06\u6570\u636e\u5b9a\u4e49\u4e3a\u201c\u72b6\u6001\u201d\u800c\u975e\u201c\u4e8b\u4ef6\u201d\u3002Host \u5e94\u7528\uff08\u5982 IDE\uff09\u53ef\u4ee5\u5728\u7528\u6237\u63d0\u95ee\u4e4b\u524d\uff0c\u5c31\u76f4\u63a5\u901a\u8fc7 Resource \u534f\u8bae\u628a\u8fd9\u4e9b\u6587\u4ef6\u7684\u5185\u5bb9\u52a0\u8f7d\u5e76\u201c\u9489\u201d\u5728 System Prompt \u6216\u72ec\u7acb\u7684 Context Window \u4e2d\u3002\u5f53\u6587\u4ef6\u53d1\u751f\u53d8\u66f4\u65f6\uff0cHost \u4f1a\u539f\u5730\u66f4\u65b0\u8fd9\u90e8\u5206\u5185\u5bb9\uff0c\u800c\u4e0d\u662f\u5728\u5386\u53f2\u8bb0\u5f55\u91cc\u8ffd\u52a0\u65b0\u7684\u526f\u672c\u3002<\/li>\n\n\n\n<li><strong>\u672c\u8d28\u533a\u522b\uff1a<\/strong> \u5b83\u662f<strong>\u73af\u5883<\/strong>\u3002\u5bf9\u6a21\u578b\u6765\u8bf4\uff0cResources \u662f\u5b83\u201c\u7741\u5f00\u773c\u5c31\u80fd\u770b\u5230\u7684\u4e1c\u897f\u201d\uff0c\u662f\u601d\u8003\u7684<strong>\u524d\u7f6e\u8bed\u5883<\/strong>\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u4f8b\u5b50\uff1a<\/strong> \u4ee3\u7801\u6587\u4ef6\u5185\u5bb9\u3001\u6570\u636e\u5e93 Schema\u3001\u7cfb\u7edf\u9519\u8bef\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>2. Tools<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b9a\u4e49\uff08\u4e3b\u52a8\u884c\u52a8 \/ Action\uff09\uff1a<\/strong> \u8fd9\u5c31\u662f\u6807\u51c6\u5316\u540e\u7684 <strong>Function Calling<\/strong>\u3002\u5b83\u4ee3\u8868<strong>\u53ef\u6267\u884c\u3001\u6709\u526f\u4f5c\u7528<\/strong>\u7684\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li><strong>\u5173\u7cfb\uff1a<\/strong> \u5b83\u662f AI \u6539\u53d8\u4e16\u754c\u7684\u65b9\u5f0f\u3002\u6a21\u578b\u5728\u201c\u9605\u8bfb\u201d\u4e86 Resources\uff08\u7406\u89e3\u4e86\u73b0\u72b6\uff09\u4e4b\u540e\uff0c\u4f7f\u7528 Tools \u6765\u6539\u53d8\u73b0\u72b6\u3002<\/li>\n\n\n\n<li><strong>\u4f8b\u5b50\uff1a<\/strong> <code>git_commit<\/code>\uff08\u63d0\u4ea4\u4ee3\u7801\uff09\u3001<code>create_issue<\/code>\uff08\u521b\u5efa\u95ee\u9898\uff09\u3001<code>run_test<\/code>\uff08\u8fd0\u884c\u6d4b\u8bd5\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>3. Prompts (\u63d0\u793a\u8bcd\u6a21\u677f)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b9a\u4e49\uff08\u65b9\u6cd5\u8bba \/ Guidance\uff09\uff1a<\/strong> \u8fd9\u662f Server \u7aef\u63d0\u4f9b\u7684<strong>\u6700\u4f73\u5b9e\u8df5\u6d41\u7a0b<\/strong>\u3002\u5b83\u662f\u4e00\u6bb5\u9884\u8bbe\u597d\u7684 Prompt \u7ed3\u6784\u3002<\/li>\n\n\n\n<li><strong>\u4e3a\u4ec0\u4e48\u9700\u8981\u5b83\uff1f<\/strong> \u5b83\u662f\u8fde\u63a5 Resources \u548c Tools \u7684\u6865\u6881\u3002\u5982\u679c\u8bf4 Resources \u662f\u201c\u6750\u6599\u201d\uff0cTools \u662f\u201c\u5de5\u5177\u201d\uff0c\u90a3\u4e48 Prompts \u5c31\u662f\u201c\u65bd\u5de5\u6307\u5357\u201d\u3002\u5b83\u544a\u8bc9\u6a21\u578b\uff1a\u201c\u5728\u5904\u7406\u8fd9\u7c7b\u4efb\u52a1\u65f6\uff0c\u4f60\u5e94\u8be5\u5148\u5173\u6ce8\u54ea\u4e9b Resource\uff0c\u5e76\u4ee5\u4ec0\u4e48\u6837\u7684\u6b65\u9aa4\u4f7f\u7528 Tools\u3002\u201d<\/li>\n\n\n\n<li><strong>\u4ea4\u4e92\u4e0e\u5e94\u7528\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>\u573a\u666f\uff1a<\/strong> Git Server \u63d0\u4f9b\u4e86\u4e00\u4e2a\u540d\u4e3a <code>generate_pr<\/code> \u7684 Prompt\u3002<\/li>\n\n\n\n<li><strong>\u6d41\u7a0b\uff1a<\/strong> \u5f53\u7528\u6237\u9009\u62e9\u8fd9\u4e2a Prompt \u65f6\uff0cServer \u4f1a\u544a\u8bc9 Host\uff1a\u201c\u8bf7\u81ea\u52a8\u6293\u53d6 <code>git diff<\/code> \u8fd9\u4e2a Resource \u7684\u5185\u5bb9\u653e\u5165\u4e0a\u4e0b\u6587\uff0c\u5e76\u4f7f\u7528\u2018\u8bf7\u751f\u6210\u7b26\u5408 Conventional Commits \u89c4\u8303\u7684\u63cf\u8ff0\u2019\u4f5c\u4e3a\u7cfb\u7edf\u63d0\u793a\u8bcd\u3002\u201d\u8fd9\u8ba9\u666e\u901a\u7528\u6237\u4e5f\u80fd\u4e00\u952e\u83b7\u5f97\u4e13\u5bb6\u7684\u63d0\u95ee\u80fd\u529b\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>\u4e09\u8005\u7684\u5173\u7cfb\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Resources:<\/strong> \u6a21\u578b\u51b3\u7b56\u7684\u4f9d\u636e\u3002\u89e3\u51b3\u201c\u6211\u5728\u54ea\uff1f\u6211\u770b\u5230\u4e86\u4ec0\u4e48\uff1f\u201d\u7684\u95ee\u9898\u3002<\/li>\n\n\n\n<li><strong>Prompts:<\/strong> \u544a\u8bc9\u6a21\u578b\u201c\u8be5\u5173\u6ce8\u54ea\u4e9b\u8d44\u6e90\u201d\u4ee5\u53ca\u201c\u8be5\u8bbe\u5b9a\u4ec0\u4e48\u76ee\u6807\u201d\u3002\u89e3\u51b3\u201c\u6211\u8be5\u600e\u4e48\u5f00\u59cb\u4efb\u52a1\uff1f\u201d\u7684\u95ee\u9898\u3002<\/li>\n\n\n\n<li><strong>Tools:<\/strong> \u6a21\u578b\u4e3a\u4e86\u8fbe\u6210\u76ee\u6807\u800c\u6267\u884c\u7684\u52a8\u4f5c\u3002\u89e3\u51b3\u201c\u6211\u8be5\u5982\u4f55\u6539\u53d8\u73b0\u72b6\uff1f\u201d\u7684\u95ee\u9898\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4e00\u4e2a\u5b8c\u6574\u7684 MCP \u5de5\u4f5c\u6d41\u5f80\u5f80\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n\n\n\n<p>\u7528\u6237\u9009\u62e9\u4e00\u4e2a Prompt\uff08\u5982\u201c\u4fee\u590d Bug\u201d\uff09 -&gt; Host \u6839\u636e Prompt \u6307\u5f15\u81ea\u52a8\u52a0\u8f7d\u76f8\u5173\u7684 Resources\uff08\u5982\u9519\u8bef\u65e5\u5fd7\u548c\u4ee3\u7801\uff09\u5230\u4e0a\u4e0b\u6587\u4e2d -&gt; \u6a21\u578b\u9605\u8bfb\u4e0a\u4e0b\u6587\uff0c\u601d\u8003\u540e\u8c03\u7528 Tools\uff08\u5982\u4fee\u6539\u4ee3\u7801\uff09 -&gt; Tools \u4fee\u6539\u4e86\u6587\u4ef6\uff0c\u8fdb\u800c\u89e6\u53d1 Resources \u7684\u81ea\u52a8\u66f4\u65b0 -&gt; \u5faa\u73af\u7ed3\u675f\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.4 \u67b6\u6784\u4f18\u52bf\uff1a\u89e3\u8026\u4e0e\u81ea\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u8fd9\u79cd Host-Client-Server \u7684\u5206\u5c42\u67b6\u6784\uff0c\u914d\u5408\u4e09\u5927\u539f\u8bed\uff0c\u5e26\u6765\u4e86\u4e24\u4e2a\u5de8\u5927\u7684\u5de5\u7a0b\u4f18\u52bf\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u81ea\u63cf\u8ff0 (Self-describing)\uff1a<\/strong> Server \u542f\u52a8\u540e\uff0cHost \u4e0d\u9700\u8981\u786c\u7f16\u7801\u5b83\u6709\u4ec0\u4e48\u529f\u80fd\u3002Client \u53ea\u9700\u8981\u53d1\u4e00\u4e2a <code>tools\/list<\/code> \u8bf7\u6c42\uff0cServer \u5c31\u4f1a\u56de\u590d\uff1a\u201c\u6211\u6709 <code>git_commit<\/code> \u5de5\u5177\uff0c\u6211\u6709 <code>git:\/\/<\/code> \u8d44\u6e90\u3002\u201d \u8fd9\u79cd<strong>\u52a8\u6001\u53d1\u73b0\u80fd\u529b<\/strong>\u662f MCP \u7684\u6838\u5fc3\u3002<\/li>\n\n\n\n<li><strong>\u901a\u4fe1\u900f\u660e (Transport Agnostic)\uff1a<\/strong> Client \u548c Server \u4e4b\u95f4\u7684\u901a\u4fe1\u53ef\u4ee5\u901a\u8fc7 <strong>Stdio<\/strong>\uff08\u672c\u5730\u8fdb\u7a0b\u7ba1\u9053\uff0c\u50cf\u4f20\u7eb8\u6761\u4e00\u6837\u5feb\u4e14\u79c1\u5bc6\uff09\u8fdb\u884c\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7 <strong>SSE<\/strong>\uff08Server-Sent Events\uff0c\u50cf\u6253\u7535\u8bdd\u4e00\u6837\u4fdd\u6301\u957f\u8fde\u63a5\uff09\u8fdb\u884c\u8fdc\u7a0b\u901a\u4fe1\u3002Host \u5e76\u4e0d\u5173\u5fc3 Server \u5728\u672c\u5730\u8fd8\u662f\u4e91\u7aef\uff0c\u5b83\u53ea\u7ba1\u8c03\u7528\u6807\u51c6\u63a5\u53e3\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">4 \u5de5\u7a0b\u843d\u5730\u5168\u94fe\u8def\u6df1\u5ea6\u89e3\u6790<\/h3>\n\n\n\n<p>\u4e3a\u4e86\u5f7b\u5e95\u8bb2\u6e05\u695a\u8fb9\u754c\u548c\u6d41\u7a0b\uff0c\u6211\u4eec\u4e3e\u4e00\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.1 \u6848\u4f8b\u573a\u666f<\/h4>\n\n\n\n<p><strong>\u7528\u6237\u8bf7\u6c42\uff1a<\/strong> \u201c\u8bf7\u5e2e\u6211\u5206\u6790\u4e00\u4e0b\u2018\u82f1\u4f1f\u8fbe\u2019\u6700\u8fd1\u4e00\u5468\u7684\u80a1\u4ef7\u8d8b\u52bf\uff0c\u5e76\u628a\u5206\u6790\u62a5\u544a\u4fdd\u5b58\u5230\u6211\u7684\u672c\u5730\u7b14\u8bb0\u4e2d\u3002\u201d<\/p>\n\n\n\n<p><strong>\u73af\u5883\u914d\u7f6e\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Host:<\/strong> Claude Desktop\uff08\u96c6\u6210\u4e86 MCP Client \u4ee3\u7801\u7684\u5bbf\u4e3b\u5e94\u7528\uff09\u3002<\/li>\n\n\n\n<li><strong>Server A:<\/strong> <code>finance-server<\/code>\uff08\u72ec\u7acb\u8fdb\u7a0b\uff0c\u63d0\u4f9b\u80a1\u4ef7\u67e5\u8be2\uff09\u3002<\/li>\n\n\n\n<li><strong>Server B:<\/strong> <code>filesystem-server<\/code>\uff08\u72ec\u7acb\u8fdb\u7a0b\uff0c\u63d0\u4f9b\u6587\u4ef6\u5199\u5165\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">4.2 \u5168\u6d41\u7a0b\u65f6\u5e8f\u62c6\u89e3<\/h4>\n\n\n\n<p><strong>\u9636\u6bb5\u4e00\uff1a\u542f\u52a8\u4e0e\u63e1\u624b (Host Startup &amp; Handshake)<\/strong><\/p>\n\n\n\n<p><em>\u8fd9\u4e2a\u9636\u6bb5\u53d1\u751f\u5728\u7528\u6237\u63d0\u95ee\u4e4b\u524d\u3002<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Host \u542f\u52a8:<\/strong> Claude Desktop \u542f\u52a8\uff0c\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\uff0c\u53d1\u73b0\u9700\u8981\u52a0\u8f7d Server A \u548c Server B\u3002<\/li>\n\n\n\n<li><strong>\u5efa\u7acb\u8fde\u63a5:<\/strong> Host \u901a\u8fc7 <code>Stdio<\/code> \u542f\u52a8\u8fd9\u4e24\u4e2a Server \u7684\u5b50\u8fdb\u7a0b\u3002<\/li>\n\n\n\n<li><strong>\u52a8\u6001\u53d1\u73b0\/\u81ea\u63cf\u8ff0:<\/strong> Host \u5411\u4e24\u4e2a Server \u53d1\u9001 <code>tools\/list<\/code> \u8bf7\u6c42\u3002\n<ul class=\"wp-block-list\">\n<li>Server A \u56de\u590d\uff1a<code>JSON Schema { name: \"get_stock\", args: ... }<\/code><\/li>\n\n\n\n<li>Server B \u56de\u590d\uff1a<code>JSON Schema { name: \"write_file\", args: ... }<\/code><\/li>\n\n\n\n<li><strong>\u6ce8\uff1a<\/strong> \u6b64\u65f6 LLM \u5c1a\u672a\u4ecb\u5165\uff0c\u8fd9\u662f\u7eaf\u4ee3\u7801\u5c42\u9762\u7684\u534f\u8bae\u4ea4\u4e92\u3002Prompts \u539f\u8bed\uff08\u5982\u679c Server \u6709\u63d0\u4f9b\uff09\u4e5f\u4f1a\u5728\u6b64\u65f6\u88ab\u5217\u51fa\uff0c\u4f9b\u7528\u6237\u5728 UI \u4e0a\u9009\u62e9\uff0c\u4f46\u5728\u672c\u4f8b\u4e2d\u672a\u6d89\u53ca\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>\u9636\u6bb5\u4e8c\uff1a\u7528\u6237\u4ea4\u4e92\u4e0e\u4e0a\u4e0b\u6587\u6ce8\u5165 (Interaction &amp; Injection)<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7528\u6237\u63d0\u95ee:<\/strong> \u7528\u6237\u8f93\u5165\u8bf7\u6c42\u3002<\/li>\n\n\n\n<li><strong>\u6784\u5efa\u4e0a\u4e0b\u6587:<\/strong> Host \u5f00\u59cb\u7ec4\u88c5\u53d1\u7ed9 LLM \u7684\u6d88\u606f\uff1a\n<ul class=\"wp-block-list\">\n<li><code>System Prompt<\/code>: &#8220;\u4f60\u662f\u4e00\u4e2a\u52a9\u624b&#8230; \u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5de5\u5177\uff1a[Server A \u548c B \u8fd4\u56de\u7684 JSON Schema]&#8230;&#8221;<\/li>\n\n\n\n<li><code>User Message<\/code>: &#8220;\u8bf7\u5e2e\u6211\u5206\u6790\u82f1\u4f1f\u8fbe&#8230;&#8221;<\/li>\n\n\n\n<li><strong>\u6ce8\uff1a<\/strong> \u8fd9\u5c31\u662f LLM \u201c\u77e5\u9053\u201d\u6709\u54ea\u4e9b\u5de5\u5177\u53ef\u7528\u7684\u65f6\u523b\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>\u9636\u6bb5\u4e09\uff1a\u7b2c\u4e00\u8f6e\u63a8\u7406\u4e0e\u8def\u7531 (Reasoning &amp; Routing &#8211; Round 1)<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>LLM \u601d\u8003:<\/strong> LLM \u5904\u7406\u4e0a\u4e0b\u6587\u3002\u5b83\u901a\u8fc7 SFT \u8bad\u7ec3\u83b7\u5f97\u7684\u80fd\u529b\u5224\u65ad\u51fa\u9700\u8981\u5148\u67e5\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>LLM \u8f93\u51fa:<\/strong> LLM \u751f\u6210\u6587\u672c\uff08Thought\uff09\u548c\u6307\u4ee4\uff08Function Call JSON\uff09\uff1a<code>Call get_stock(symbol=\"NVDA\")<\/code>\u3002<\/li>\n\n\n\n<li><strong>Client \u62e6\u622a:<\/strong> Host \u7684\u4ee3\u7801\u68c0\u6d4b\u5230\u505c\u6b62\u7b26\u548c JSON\u3002\u5b83\u67e5\u627e\u5185\u90e8\u6ce8\u518c\u8868\uff0c\u53d1\u73b0 <code>get_stock<\/code> \u5c5e\u4e8e Server A\u3002<\/li>\n\n\n\n<li><strong>\u534f\u8bae\u4f20\u8f93:<\/strong> Host \u5c06 JSON \u5c01\u88c5\u6210 MCP \u534f\u8bae\u683c\u5f0f\uff0c\u901a\u8fc7\u7ba1\u9053\u53d1\u7ed9 Server A\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u9636\u6bb5\u56db\uff1a\u6267\u884c\u4e0e\u53cd\u9988 (Execution &amp; Observation)<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Server A \u6267\u884c:<\/strong> Server A \u6536\u5230\u8bf7\u6c42\uff0c\u8c03\u7528 Yahoo Finance API\uff08\u8fd9\u662f Server A \u5185\u90e8\u7684\u903b\u8f91\uff09\u3002<\/li>\n\n\n\n<li><strong>\u7ed3\u679c\u56de\u4f20:<\/strong> Server A \u62ff\u5230\u6570\u636e\uff0c\u8fd4\u56de JSON \u7ed3\u679c\u7ed9 Host\u3002<\/li>\n\n\n\n<li><strong>\u66f4\u65b0\u5386\u53f2:<\/strong> Host \u5c06\u6267\u884c\u7ed3\u679c\u5c01\u88c5\u4e3a <code>ToolMessage<\/code>\uff0c\u8ffd\u52a0\u5230\u5bf9\u8bdd\u5386\u53f2\u4e2d\u3002\u6b64\u65f6\u4e0a\u4e0b\u6587\u5305\u542b\uff1a\u7528\u6237\u95ee\u9898 + LLM \u7684\u8c03\u7528\u6307\u4ee4 + \u5de5\u5177\u7684\u8fd4\u56de\u7ed3\u679c\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u9636\u6bb5\u4e94\uff1a\u7b2c\u4e8c\u8f6e\u63a8\u7406\u4e0e\u8def\u7531 (Reasoning &amp; Routing &#8211; Round 2)<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u518d\u6b21\u8c03\u7528 LLM:<\/strong> Host \u5c06\u66f4\u65b0\u540e\u7684\u4e0a\u4e0b\u6587\u518d\u6b21\u53d1\u7ed9 LLM\u3002<\/li>\n\n\n\n<li><strong>LLM \u601d\u8003\u4e0e\u751f\u6210:<\/strong> LLM \u770b\u5230\u6570\u636e\u4e86\uff0c\u5f00\u59cb\u5206\u6790\u5e76\u5728\u5185\u5b58\u4e2d\u751f\u6210\u62a5\u544a\u6587\u672c\u3002<\/li>\n\n\n\n<li><strong>LLM \u51b3\u7b56:<\/strong> LLM \u518d\u6b21\u8f93\u51fa\u6307\u4ee4\uff1a<code>Call write_file(path=\".\/report.md\", content=\"...\")<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u5b89\u5168\u62e6\u622a:<\/strong> Host \u8bc6\u522b\u51fa <code>write_file<\/code> \u662f\u654f\u611f\u64cd\u4f5c\uff08\u57fa\u4e8e Client \u7684\u5b89\u5168\u7b56\u7565\uff09\u3002Host \u5f39\u7a97\uff1a\u201cServer B \u8bf7\u6c42\u5199\u5165\u6587\u4ef6\uff0c\u662f\u5426\u5141\u8bb8\uff1f\u201d<\/li>\n\n\n\n<li><strong>\u7528\u6237\u786e\u8ba4 &amp; \u6267\u884c:<\/strong> \u7528\u6237\u70b9\u51fb\u5141\u8bb8\u3002Server B \u6267\u884c\u5199\u5165\uff0c\u8fd4\u56de &#8220;Success&#8221;\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u9636\u6bb5\u516d\uff1a\u6700\u7ec8\u54cd\u5e94<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7b2c\u4e09\u6b21\u8c03\u7528 LLM:<\/strong> Host \u5c06 &#8220;Success&#8221; \u7ed3\u679c\u518d\u6b21\u5582\u7ed9 LLM\u3002<\/li>\n\n\n\n<li><strong>\u6700\u7ec8\u56de\u590d:<\/strong> LLM \u8f93\u51fa\uff1a\u201c\u5206\u6790\u62a5\u544a\u5df2\u751f\u6210\u5e76\u4fdd\u5b58\u3002\u201d<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">5 \u5c55\u671b\uff1a\u4ece\u201c\u5e94\u7528\u201d\u5230\u201c\u751f\u6001\u201d<\/h3>\n\n\n\n<p>MCP \u7684\u51fa\u73b0\uff0c\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a\u6280\u672f\u6807\u51c6\u7684\u5347\u7ea7\uff0c\u5b83\u9884\u793a\u7740 AI \u5e94\u7528\u751f\u6001\u7684\u91cd\u6784\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.1 \u63d0\u793a\u8bcd\u5de5\u7a0b\u7684\u8fdb\u5316<\/h4>\n\n\n\n<p>MCP \u5f15\u5165\u4e86 <strong>Prompts<\/strong> \u539f\u8bed\u3002\u8fd9\u610f\u5473\u7740\u5de5\u5177\u5f00\u53d1\u8005\uff08\u6700\u61c2\u6570\u636e\u7684\u4eba\uff09\u53ef\u4ee5\u5c06\u201c\u5982\u4f55\u6700\u597d\u5730\u67e5\u8be2\u8fd9\u4e2a\u6570\u636e\u5e93\u201d\u7684\u7ecf\u9a8c\uff0c\u5199\u6210 Prompt \u6a21\u677f\u56fa\u5316\u5728 Server \u4e2d\u3002\u7528\u6237\u4e0d\u518d\u9700\u8981\u5b66\u4e60\u590d\u6742\u7684\u63d0\u793a\u8bcd\u6280\u5de7\uff0c\u53ea\u9700\u8c03\u7528 Server \u63d0\u4f9b\u7684\u6a21\u677f\u3002\u8fd9\u662f Prompt Engineering \u4ece\u201c\u7528\u6237\u4fa7\u201d\u5411\u201c\u4f9b\u7ed9\u4fa7\u201d\u7684\u8f6c\u79fb\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.2 \u8fde\u63a5\u7684\u4ef7\u503c<\/h4>\n\n\n\n<p>\u65e2\u7136 MCP Server \u662f\u6807\u51c6\u5316\u7684\uff0c\u7ed9 AI \u589e\u52a0\u80fd\u529b\u5c31\u50cf\u7ed9\u6d4f\u89c8\u5668\u5b89\u88c5\u63d2\u4ef6\u4e00\u6837\u7b80\u5355\u3002\u70b9\u51fb\u201c\u5b89\u88c5 Linear \u80fd\u529b\u5305\u201d\uff0c\u4f60\u7684 AI \u52a9\u624b\u77ac\u95f4\u5c31\u80fd\u5904\u7406 Linear \u7684\u5de5\u5355\uff0c\u800c\u65e0\u9700\u4f60\u7f16\u5199\u4e00\u884c\u4ee3\u7801\uff0c\u5373\u63d2\u5373\u7528\uff0cAgent \u53ef\u4ee5\u4f7f\u7528\u6d77\u91cf\u7684\u5de5\u5177\u5b8c\u6210\u5404\u79cd\u590d\u6742\u5ea6\u548c\u5dee\u5f02\u5316\u7684\u4efb\u52a1\u3002<\/p>\n\n\n\n<p>AI \u7684\u5f3a\u5927\u4e0d\u4ec5\u4ec5\u5728\u4e8e\u5b83\u7684\u53c2\u6570\u91cf\uff08\u667a\u5546\uff09\uff0c\u66f4\u5728\u4e8e\u5b83\u80fd\u8fde\u63a5\u591a\u5c11\u6570\u636e\u4e0e\u5de5\u5177\uff08\u751f\u6001\uff09\uff0cMCP \u5219\u62b9\u5e73\u4e86\u8fde\u63a5\u7684\u6210\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f15\u8a00 \u5982\u679c\u8bf4 Function Calling \u662f\u8ba9 LLM \u957f\u51fa\u4e86\u201c\u53cc\u624b\u201d\uff0c\u90a3\u4e48 MCP (Model Co [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":217,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":1,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/posts\/216\/revisions\/218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/media\/217"}],"wp:attachment":[{"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiewuyi.com\/index.php\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}