{"id":46119,"date":"2025-07-30T02:26:42","date_gmt":"2025-07-29T18:26:42","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/46119.html"},"modified":"2025-07-30T02:26:42","modified_gmt":"2025-07-29T18:26:42","slug":"mcp%e5%bf%ab%e9%80%9f%e5%85%a5%e9%97%a8-%e5%bf%ab%e9%80%9f%e6%9e%84%e5%bb%ba%e8%87%aa%e5%b7%b1%e7%9a%84%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/46119.html","title":{"rendered":"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\u670d\u52a1\u5668"},"content":{"rendered":"<h3>\u5f15\u8a00<\/h3>\n<p>\u968f\u7740\u5927\u8bed\u8a00\u6a21\u578b(LLM)\u6280\u672f\u7684\u5feb\u901f\u53d1\u5c55&#xff0c;\u5982\u4f55\u6269\u5c55\u5176\u80fd\u529b\u8fb9\u754c\u6210\u4e3a\u5f00\u53d1\u8005\u5173\u6ce8\u7684\u91cd\u70b9\u3002MCP(Model Capability Protocol)\u4f5c\u4e3a\u4e00\u79cd\u534f\u8bae\u6807\u51c6&#xff0c;\u5141\u8bb8\u5f00\u53d1\u8005\u6784\u5efa\u81ea\u5b9a\u4e49\u670d\u52a1\u5668\u6765\u589e\u5f3aLLM\u7684\u529f\u80fd\u3002<\/p>\n<h3>\u6b63\u6587\u5185\u5bb9<\/h3>\n<h4>1. MCP\u6838\u5fc3\u6982\u5ff5\u4e0e\u6280\u672f\u80cc\u666f<\/h4>\n<p>MCP\u670d\u52a1\u5668\u4e3b\u8981\u63d0\u4f9b\u4e09\u79cd\u80fd\u529b\u7c7b\u578b&#xff1a;<\/p>\n<ul>\n<li>\u8d44\u6e90(Resources)&#xff1a;\u5ba2\u6237\u7aef\u53ef\u8bfb\u53d6\u7684\u7c7b\u4f3c\u6587\u4ef6\u7684\u6570\u636e&#xff08;\u5982API\u54cd\u5e94\u6216\u6587\u4ef6\u5185\u5bb9&#xff09;<\/li>\n<li>\u5de5\u5177(Tools)&#xff1a;\u7ecf\u7528\u6237\u6279\u51c6\u540eLLM\u53ef\u8c03\u7528\u7684\u51fd\u6570<\/li>\n<li>\u63d0\u793a(Prompts)&#xff1a;\u5e2e\u52a9\u7528\u6237\u5b8c\u6210\u7279\u5b9a\u4efb\u52a1\u7684\u9884\u7f16\u5199\u6a21\u677f<\/li>\n<\/ul>\n<p>\u672c\u6559\u7a0b\u5c06\u91cd\u70b9\u4ecb\u7ecd\u5de5\u5177\u7c7b\u578b\u7684\u5b9e\u73b0&#xff0c;\u901a\u8fc7\u6784\u5efa\u4e24\u4e2a\u5b9e\u7528\u5de5\u5177(get-alerts\u548cget-forecast)\u6765\u6269\u5c55Claude\u7684\u529f\u80fd&#xff0c;\u4f7f\u5176\u80fd\u591f\u83b7\u53d6\u5929\u6c14\u9884\u62a5\u548c\u6076\u52a3\u5929\u6c14\u8b66\u62a5\u3002<\/p>\n<h4>2. \u73af\u5883\u51c6\u5907\u4e0e\u9879\u76ee\u521d\u59cb\u5316<\/h4>\n<h5>2.1 \u7cfb\u7edf\u8981\u6c42<\/h5>\n<ul>\n<li>Python 3.10\u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<li>Python MCP SDK 1.2.0\u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<\/ul>\n<h5>2.2 \u5b89\u88c5uv\u5e76\u521b\u5efa\u9879\u76ee<\/h5>\n<p><span class=\"token comment\"># \u5b89\u88c5uv\u5305\u7ba1\u7406\u5668<\/span><br \/>\n<span class=\"token function\">curl<\/span> -LsSf https:\/\/astral.sh\/uv\/install.sh <span class=\"token operator\">|<\/span> <span class=\"token function\">sh<\/span><\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u9879\u76ee\u76ee\u5f55<\/span><br \/>\nuv init weather<br \/>\n<span class=\"token builtin class-name\">cd<\/span> weather<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5e76\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/span><br \/>\nuv venv<br \/>\n<span class=\"token builtin class-name\">source<\/span> .venv\/bin\/activate<\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5\u4f9d\u8d56<\/span><br \/>\nuv <span class=\"token function\">add<\/span> <span class=\"token string\">&#034;mcp[cli]&#034;<\/span> httpx<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u670d\u52a1\u5668\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">touch<\/span> weather.py<\/p>\n<h4>3. \u6784\u5efa\u5929\u6c14\u670d\u52a1\u5668<\/h4>\n<h5>3.1 \u521d\u59cb\u5316FastMCP\u5b9e\u4f8b<\/h5>\n<p><span class=\"token keyword\">from<\/span> typing <span class=\"token keyword\">import<\/span> Any<br \/>\n<span class=\"token keyword\">import<\/span> httpx<br \/>\n<span class=\"token keyword\">from<\/span> mcp<span class=\"token punctuation\">.<\/span>server<span class=\"token punctuation\">.<\/span>fastmcp <span class=\"token keyword\">import<\/span> FastMCP<\/p>\n<p><span class=\"token comment\"># \u521d\u59cb\u5316FastMCP\u670d\u52a1\u5668<\/span><br \/>\nmcp <span class=\"token operator\">&#061;<\/span> FastMCP<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;weather&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u5e38\u91cf\u5b9a\u4e49<\/span><br \/>\nNWS_API_BASE <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;https:\/\/api.weather.gov&#034;<\/span><br \/>\nUSER_AGENT <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;weather-app\/1.0&#034;<\/span><br \/>\n&#096;&#096;&#096;<\/p>\n<p>FastMCP\u7c7b\u5229\u7528Python\u7c7b\u578b\u63d0\u793a\u548c\u6587\u6863\u5b57\u7b26\u4e32\u81ea\u52a8\u751f\u6210\u5de5\u5177\u5b9a\u4e49&#xff0c;\u7b80\u5316\u4e86MCP\u5de5\u5177\u7684\u521b\u5efa\u548c\u7ef4\u62a4\u8fc7\u7a0b\u3002<\/p>\n<h5>3.2 \u5b9e\u73b0\u8f85\u52a9\u51fd\u6570<\/h5>\n<p><span class=\"token keyword\">async<\/span> <span class=\"token keyword\">def<\/span> <span class=\"token function\">make_nws_request<\/span><span class=\"token punctuation\">(<\/span>url<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">dict<\/span><span class=\"token punctuation\">[<\/span><span class=\"token builtin\">str<\/span><span class=\"token punctuation\">,<\/span> Any<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">|<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u5411NWS API\u53d1\u8d77\u8bf7\u6c42\u5e76\u5904\u7406\u9519\u8bef&#034;&#034;&#034;<\/span><br \/>\n    headers <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string\">&#034;User-Agent&#034;<\/span><span class=\"token punctuation\">:<\/span> USER_AGENT<span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;Accept&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;application\/geo&#043;json&#034;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">async<\/span> <span class=\"token keyword\">with<\/span> httpx<span class=\"token punctuation\">.<\/span>AsyncClient<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> client<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">try<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            response <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span>url<span class=\"token punctuation\">,<\/span> headers<span class=\"token operator\">&#061;<\/span>headers<span class=\"token punctuation\">,<\/span> timeout<span class=\"token operator\">&#061;<\/span><span class=\"token number\">30.0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            response<span class=\"token punctuation\">.<\/span>raise_for_status<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token keyword\">return<\/span> response<span class=\"token punctuation\">.<\/span>json<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">except<\/span> Exception<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">None<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">format_alert<\/span><span class=\"token punctuation\">(<\/span>feature<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">dict<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u683c\u5f0f\u5316\u8b66\u62a5\u7279\u5f81\u4e3a\u53ef\u8bfb\u5b57\u7b26\u4e32&#034;&#034;&#034;<\/span><br \/>\n    props <span class=\"token operator\">&#061;<\/span> feature<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;properties&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;&#034;&#034;<br \/>\nEvent: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>props<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;event&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Unknown&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\nArea: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>props<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;areaDesc&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Unknown&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\nSeverity: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>props<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;severity&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Unknown&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\nDescription: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>props<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;description&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;No description available&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\nInstructions: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>props<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;instruction&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;No specific instructions provided&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\n&#034;&#034;&#034;<\/span><\/span><\/p>\n<h5>3.3 \u5b9e\u73b0\u5de5\u5177\u529f\u80fd<\/h5>\n<p><span class=\"token decorator annotation punctuation\">&#064;mcp<span class=\"token punctuation\">.<\/span>tool<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">async<\/span> <span class=\"token keyword\">def<\/span> <span class=\"token function\">get_alerts<\/span><span class=\"token punctuation\">(<\/span>state<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u83b7\u53d6\u7f8e\u56fd\u5404\u5dde\u7684\u5929\u6c14\u8b66\u62a5<\/p>\n<p>    Args:<br \/>\n        state: \u4e24\u5b57\u6bcd\u5dde\u4ee3\u7801(\u5982CA, NY)<br \/>\n    &#034;&#034;&#034;<\/span><br \/>\n    url <span class=\"token operator\">&#061;<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>NWS_API_BASE<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\/alerts\/active\/area\/<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>state<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><br \/>\n    data <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> make_nws_request<span class=\"token punctuation\">(<\/span>url<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> data <span class=\"token keyword\">or<\/span> <span class=\"token string\">&#034;features&#034;<\/span> <span class=\"token keyword\">not<\/span> <span class=\"token keyword\">in<\/span> data<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;\u65e0\u6cd5\u83b7\u53d6\u8b66\u62a5\u6216\u672a\u53d1\u73b0\u8b66\u62a5&#034;<\/span><\/p>\n<p>    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> data<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;features&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;\u8be5\u5dde\u65e0\u6d3b\u8dc3\u8b66\u62a5&#034;<\/span><\/p>\n<p>    alerts <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span>format_alert<span class=\"token punctuation\">(<\/span>feature<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">for<\/span> feature <span class=\"token keyword\">in<\/span> data<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;features&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;\\\\n&#8212;\\\\n&#034;<\/span><span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>alerts<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token decorator annotation punctuation\">&#064;mcp<span class=\"token punctuation\">.<\/span>tool<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">async<\/span> <span class=\"token keyword\">def<\/span> <span class=\"token function\">get_forecast<\/span><span class=\"token punctuation\">(<\/span>latitude<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">float<\/span><span class=\"token punctuation\">,<\/span> longitude<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">float<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u83b7\u53d6\u67d0\u5730\u5929\u6c14\u9884\u62a5<\/p>\n<p>    Args:<br \/>\n        latitude: \u7eac\u5ea6<br \/>\n        longitude: \u7ecf\u5ea6<br \/>\n    &#034;&#034;&#034;<\/span><br \/>\n    <span class=\"token comment\"># \u9996\u5148\u83b7\u53d6\u9884\u6d4b\u7f51\u683c\u7aef\u70b9<\/span><br \/>\n    points_url <span class=\"token operator\">&#061;<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>NWS_API_BASE<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\/points\/<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>latitude<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">,<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>longitude<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><br \/>\n    points_data <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> make_nws_request<span class=\"token punctuation\">(<\/span>points_url<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> points_data<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;\u65e0\u6cd5\u83b7\u53d6\u8be5\u4f4d\u7f6e\u7684\u9884\u6d4b\u6570\u636e&#034;<\/span><\/p>\n<p>    <span class=\"token comment\"># \u4ecepoints\u54cd\u5e94\u4e2d\u83b7\u53d6\u9884\u6d4bURL<\/span><br \/>\n    forecast_url <span class=\"token operator\">&#061;<\/span> points_data<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;properties&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;forecast&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    forecast_data <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">await<\/span> make_nws_request<span class=\"token punctuation\">(<\/span>forecast_url<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> forecast_data<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;\u65e0\u6cd5\u83b7\u53d6\u8be6\u7ec6\u9884\u6d4b&#034;<\/span><\/p>\n<p>    <span class=\"token comment\"># \u5c06\u65f6\u95f4\u6bb5\u683c\u5f0f\u5316\u4e3a\u53ef\u8bfb\u9884\u6d4b<\/span><br \/>\n    periods <span class=\"token operator\">&#061;<\/span> forecast_data<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;properties&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;periods&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    forecasts <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> period <span class=\"token keyword\">in<\/span> periods<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span>  <span class=\"token comment\"># \u4ec5\u663e\u793a\u63a5\u4e0b\u67655\u4e2a\u65f6\u6bb5<\/span><br \/>\n        forecast <span class=\"token operator\">&#061;<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;&#034;&#034;<br \/>\n<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>period<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;name&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">:<br \/>\n\u6e29\u5ea6: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>period<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;temperature&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\u00b0<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>period<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;temperatureUnit&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\n\u98ce\u901f: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>period<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;windSpeed&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>period<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;windDirection&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\n\u9884\u6d4b: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>period<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;detailedForecast&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"><br \/>\n&#034;&#034;&#034;<\/span><\/span><br \/>\n        forecasts<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span>forecast<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;\\\\n&#8212;\\\\n&#034;<\/span><span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>forecasts<span class=\"token punctuation\">)<\/span><\/p>\n<h5>3.4 \u8fd0\u884c\u670d\u52a1\u5668<\/h5>\n<p><span class=\"token keyword\">if<\/span> __name__ <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#034;__main__&#034;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u521d\u59cb\u5316\u5e76\u8fd0\u884c\u670d\u52a1\u5668<\/span><br \/>\n    mcp<span class=\"token punctuation\">.<\/span>run<span class=\"token punctuation\">(<\/span>transport<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;stdio&#039;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h4>4. \u8fde\u63a5Claude for Desktop\u8fdb\u884c\u6d4b\u8bd5<\/h4>\n<h5>4.1 \u914d\u7f6e\u5ba2\u6237\u7aef<\/h5>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string\">&#034;mcpServers&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token string\">&#034;weather&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string\">&#034;command&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;uv&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string\">&#034;args&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n        <span class=\"token string\">&#034;&#8211;directory&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;\/ABSOLUTE\/PATH\/TO\/PARENT\/FOLDER\/weather&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;run&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;weather.py&#034;<\/span><br \/>\n      <span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h5>4.2 \u6d4b\u8bd5\u547d\u4ee4<\/h5>\n<ul>\n<li>\u201c\u8428\u514b\u62c9\u95e8\u6258\u7684\u5929\u6c14\u600e\u4e48\u6837&#xff1f;\u201d<\/li>\n<li>\u201c\u5fb7\u514b\u8428\u65af\u5dde\u6709\u54ea\u4e9b\u6d3b\u8dc3\u7684\u5929\u6c14\u8b66\u62a5&#xff1f;\u201d<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182635-6889125bf0140.png\" alt=\"img\" \/><\/p>\n<h4>5. \u6280\u672f\u5b9e\u73b0\u539f\u7406<\/h4>\n<p>\u5f53\u7528\u6237\u63d0\u95ee\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u7ecf\u5386\u4ee5\u4e0b\u6d41\u7a0b&#xff1a;<\/p>\n<li>\u5ba2\u6237\u7aef\u5c06\u95ee\u9898\u53d1\u9001\u7ed9Claude<\/li>\n<li>Claude\u5206\u6790\u53ef\u7528\u5de5\u5177\u5e76\u51b3\u5b9a\u4f7f\u7528\u54ea\u4e9b<\/li>\n<li>\u5ba2\u6237\u7aef\u901a\u8fc7MCP\u670d\u52a1\u5668\u6267\u884c\u9009\u5b9a\u5de5\u5177<\/li>\n<li>\u7ed3\u679c\u8fd4\u56de\u7ed9Claude<\/li>\n<li>Claude\u751f\u6210\u81ea\u7136\u8bed\u8a00\u54cd\u5e94<\/li>\n<li>\u5411\u7528\u6237\u663e\u793a\u54cd\u5e94<\/li>\n<h3>\u7ed3\u8bba<\/h3>\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Python\u548cMCP SDK\u5feb\u901f\u6784\u5efa\u4e00\u4e2a\u529f\u80fd\u5b8c\u6574\u7684\u5929\u6c14\u670d\u52a1\u5668\u3002\u901a\u8fc7\u5b9e\u73b0get-alerts\u548cget-forecast\u4e24\u4e2a\u5de5\u5177&#xff0c;\u6211\u4eec\u6210\u529f\u6269\u5c55\u4e86Claude\u7684\u80fd\u529b&#xff0c;\u4f7f\u5176\u80fd\u591f\u67e5\u8be2\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u3002\u8fd9\u79cd\u6a21\u5f0f\u53ef\u4ee5\u63a8\u5e7f\u5230\u5176\u4ed6\u9886\u57df&#xff0c;\u4e3aLLM\u6dfb\u52a0\u5404\u79cd\u5b9e\u7528\u529f\u80fd\u3002MCP\u534f\u8bae\u7684\u7075\u6d3b\u6027\u548cPython SDK\u7684\u6613\u7528\u6027\u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u5feb\u901f\u6784\u5efa\u548c\u96c6\u6210\u81ea\u5b9a\u4e49\u529f\u80fd&#xff0c;\u6781\u5927\u5730\u4e30\u5bcc\u4e86LLM\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n<p>MCP \u6838\u5fc3\u67b6\u6784\u89e3\u6790<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e50\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528MCP\u534f\u8bae\u6269\u5c55\u5927\u8bed\u8a00\u6a21\u578b\u529f\u80fd\uff0c\u91cd\u70b9\u8bb2\u89e3\u4e86\u6784\u5efa\u5929\u6c14\u670d\u52a1\u5668\u7684\u5b9e\u73b0\u8fc7\u7a0b\u3002\u9996\u5148\u6982\u8ff0\u4e86MCP\u63d0\u4f9b\u7684\u4e09\u79cd\u80fd\u529b\u7c7b\u578b\uff0c\u7136\u540e\u8be6\u7ec6\u8bf4\u660e\u4e86\u5f00\u53d1\u73af\u5883\u51c6\u5907\u3001\u9879\u76ee\u521d\u59cb\u5316\u6b65\u9aa4\u3002\u6587\u7ae0\u901a\u8fc7\u6784\u5efa\u4e24\u4e2a\u5b9e\u7528\u5de5\u5177(get-alerts\u548cget-forecast)\u6f14\u793a\u4e86\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u670d\u52a1\u5668\u521d\u59cb\u5316\u3001API\u8c03\u7528\u3001\u6570\u636e\u5904\u7406\u548c\u683c\u5f0f\u5316\u8f93\u51fa\u3002\u6700\u540e\u8bf4\u660e\u4e86\u5982\u4f55\u5c06\u5f00\u53d1\u7684MCP\u670d\u52a1\u5668\u4e0eClaude\u96c6\u6210\u6d4b\u8bd5\uff0c\u5e76\u5206\u6790\u4e86\u5176\u6280\u672f\u5b9e\u73b0\u539f\u7406\u3002\u8be5\u65b9\u6cd5\u53ef\u63a8\u5e7f\u5230\u5176\u4ed6\u9886\u57df\uff0c\u4e3aLLM\u589e\u52a0\u5404\u79cd\u5b9e\u7528\u529f\u80fd\uff0c\u5c55\u793a\u4e86MCP\u534f\u8bae\u7684\u7075\u6d3b\u6027\u548cPython SDK\u7684\u6613\u7528\u6027\u3002_\u642d\u5efamcp\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":46118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[100,43,44],"topic":[],"class_list":["post-46119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-100","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>MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\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\/46119.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e50\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528MCP\u534f\u8bae\u6269\u5c55\u5927\u8bed\u8a00\u6a21\u578b\u529f\u80fd\uff0c\u91cd\u70b9\u8bb2\u89e3\u4e86\u6784\u5efa\u5929\u6c14\u670d\u52a1\u5668\u7684\u5b9e\u73b0\u8fc7\u7a0b\u3002\u9996\u5148\u6982\u8ff0\u4e86MCP\u63d0\u4f9b\u7684\u4e09\u79cd\u80fd\u529b\u7c7b\u578b\uff0c\u7136\u540e\u8be6\u7ec6\u8bf4\u660e\u4e86\u5f00\u53d1\u73af\u5883\u51c6\u5907\u3001\u9879\u76ee\u521d\u59cb\u5316\u6b65\u9aa4\u3002\u6587\u7ae0\u901a\u8fc7\u6784\u5efa\u4e24\u4e2a\u5b9e\u7528\u5de5\u5177(get-alerts\u548cget-forecast)\u6f14\u793a\u4e86\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u670d\u52a1\u5668\u521d\u59cb\u5316\u3001API\u8c03\u7528\u3001\u6570\u636e\u5904\u7406\u548c\u683c\u5f0f\u5316\u8f93\u51fa\u3002\u6700\u540e\u8bf4\u660e\u4e86\u5982\u4f55\u5c06\u5f00\u53d1\u7684MCP\u670d\u52a1\u5668\u4e0eClaude\u96c6\u6210\u6d4b\u8bd5\uff0c\u5e76\u5206\u6790\u4e86\u5176\u6280\u672f\u5b9e\u73b0\u539f\u7406\u3002\u8be5\u65b9\u6cd5\u53ef\u63a8\u5e7f\u5230\u5176\u4ed6\u9886\u57df\uff0c\u4e3aLLM\u589e\u52a0\u5404\u79cd\u5b9e\u7528\u529f\u80fd\uff0c\u5c55\u793a\u4e86MCP\u534f\u8bae\u7684\u7075\u6d3b\u6027\u548cPython SDK\u7684\u6613\u7528\u6027\u3002_\u642d\u5efamcp\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/46119.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-29T18:26:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182635-6889125bf0140.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=\"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\/46119.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/46119.html\",\"name\":\"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-29T18:26:42+00:00\",\"dateModified\":\"2025-07-29T18:26:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/46119.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/46119.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/46119.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\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":"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\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\/46119.html","og_locale":"zh_CN","og_type":"article","og_title":"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e50\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528MCP\u534f\u8bae\u6269\u5c55\u5927\u8bed\u8a00\u6a21\u578b\u529f\u80fd\uff0c\u91cd\u70b9\u8bb2\u89e3\u4e86\u6784\u5efa\u5929\u6c14\u670d\u52a1\u5668\u7684\u5b9e\u73b0\u8fc7\u7a0b\u3002\u9996\u5148\u6982\u8ff0\u4e86MCP\u63d0\u4f9b\u7684\u4e09\u79cd\u80fd\u529b\u7c7b\u578b\uff0c\u7136\u540e\u8be6\u7ec6\u8bf4\u660e\u4e86\u5f00\u53d1\u73af\u5883\u51c6\u5907\u3001\u9879\u76ee\u521d\u59cb\u5316\u6b65\u9aa4\u3002\u6587\u7ae0\u901a\u8fc7\u6784\u5efa\u4e24\u4e2a\u5b9e\u7528\u5de5\u5177(get-alerts\u548cget-forecast)\u6f14\u793a\u4e86\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u670d\u52a1\u5668\u521d\u59cb\u5316\u3001API\u8c03\u7528\u3001\u6570\u636e\u5904\u7406\u548c\u683c\u5f0f\u5316\u8f93\u51fa\u3002\u6700\u540e\u8bf4\u660e\u4e86\u5982\u4f55\u5c06\u5f00\u53d1\u7684MCP\u670d\u52a1\u5668\u4e0eClaude\u96c6\u6210\u6d4b\u8bd5\uff0c\u5e76\u5206\u6790\u4e86\u5176\u6280\u672f\u5b9e\u73b0\u539f\u7406\u3002\u8be5\u65b9\u6cd5\u53ef\u63a8\u5e7f\u5230\u5176\u4ed6\u9886\u57df\uff0c\u4e3aLLM\u589e\u52a0\u5404\u79cd\u5b9e\u7528\u529f\u80fd\uff0c\u5c55\u793a\u4e86MCP\u534f\u8bae\u7684\u7075\u6d3b\u6027\u548cPython SDK\u7684\u6613\u7528\u6027\u3002_\u642d\u5efamcp\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/46119.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-29T18:26:42+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182635-6889125bf0140.png"}],"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\/46119.html","url":"https:\/\/www.wsisp.com\/helps\/46119.html","name":"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-29T18:26:42+00:00","dateModified":"2025-07-29T18:26:42+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/46119.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/46119.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/46119.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"MCP\u5feb\u901f\u5165\u95e8\u2014\u5feb\u901f\u6784\u5efa\u81ea\u5df1\u7684\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\/46119","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=46119"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/46119\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/46118"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=46119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=46119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=46119"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=46119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}