{"id":47461,"date":"2025-07-30T07:57:28","date_gmt":"2025-07-29T23:57:28","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/47461.html"},"modified":"2025-07-30T07:57:28","modified_gmt":"2025-07-29T23:57:28","slug":"fastmcp-mcpconfig%e5%a4%9a%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%bd%bf%e7%94%a8%e6%a1%88%e4%be%8b%ef%bc%9bsse%e3%80%81stdio%e3%80%81streamable-http%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/47461.html","title":{"rendered":"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528"},"content":{"rendered":"<h2>1\u3001sse\u3001stdio\u3001streamable-http\u4f7f\u7528<\/h2>\n<p>\u53c2\u8003&#xff1a;https:\/\/gofastmcp.com\/deployment\/running-server#the-run-method<\/p>\n<p>stdio\u672c\u5730\u4f7f\u7528&#xff1b;sse\u3001streamable-http\u8fdc\u7a0b\u8c03\u7528&#xff08;<br \/>\nStreamable HTTP\u2014New in version: 2.3.0&#xff09;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235724-68895fe4e9a1c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235725-68895fe5bc102.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8c03\u7528&#xff1a;<br \/>\nstdio\u3001sse<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235726-68895fe625ec5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\nstreamable-http<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235726-68895fe64a600.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>2\u3001 MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b<\/h2>\n<p>\u53c2\u8003&#xff1a;<br \/>\nhttps:\/\/gofastmcp.com\/clients\/client<\/p>\n<h3>\u4ee3\u7801<\/h3>\n<p>config\u5982\u679c\u53ea\u6709\u4e00\u4e2a\u670d\u52a1&#xff0c;\u90a3call_tool\u51fd\u6570\u4e0d\u7528\u524d\u7f00\u76f4\u63a5\u5de5\u5177\u51fd\u6570\u540d&#xff0c;\u5982\u679c\u591a\u4e2a\u670d\u52a1&#xff0c;\u9700\u8981\u6dfb\u52a0\u524d\u7f00<\/p>\n<p>from fastmcp import Client<\/p>\n<p># Standard MCP configuration with multiple servers<br \/>\nconfig &#061; {<br \/>\n    &#034;mcpServers&#034;: {<br \/>\n        &#034;trip&#034;: {&#034;url&#034;: &#034;http:\/\/localhost:8000\/sse&#034;},<br \/>\n        &#034;math&#034;:{<br \/>\n            &#034;command&#034;: &#034;python&#034;,<br \/>\n            &#034;args&#034;: [&#034;.\/api_mcp_server_math.py&#034;],<br \/>\n            &#034;env&#034;: {&#034;DEBUG&#034;: &#034;true&#034;}<br \/>\n        }<\/p>\n<p>    }<br \/>\n}<\/p>\n<p>async def main():<br \/>\n    async with Client(config) as client:<\/p>\n<p>        tools &#061; await client.list_tools()<br \/>\n        print(&#034;Available tools:&#034;)<br \/>\n        for tool in tools:   ###\u6253\u5370\u7ed3\u679c\u7cfb\u7edf\u4e5f\u81ea\u52a8\u52a0\u4e86\u524d\u7f00<br \/>\n            print(f&#034;  &#8211; {tool.name}: {tool.description}&#034;)<\/p>\n<p>        hotel_response &#061; await client.call_tool(&#034;trip_check_hotel&#034;, {&#034;cityname&#034;: &#034;\u5e7f\u5dde&#034;,&#034;date&#034;: &#034;\u540e\u5929&#034;})<br \/>\n        math_response &#061; await client.call_tool(&#034;math_add&#034;, {&#034;a&#034;: 1, &#034;b&#034;: 2})<br \/>\n        print(&#034;Math response:&#034;, math_response)<br \/>\n        print(&#034;Hotel response:&#034;, hotel_response)<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    import asyncio<br \/>\n    asyncio.run(main())<\/p>\n<p>for tool in tools:   ###\u6253\u5370\u7ed3\u679c\u7cfb\u7edf\u4e5f\u81ea\u52a8\u52a0\u4e86\u524d\u7f00<br \/>\nprint(f&#034;  &#8211; {tool.name}: {tool.description}&#034;)<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235726-68895fe6f392d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235727-68895fe769de6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>\u5927\u6a21\u578b\u81ea\u52a8\u8c03\u7528\u5de5\u5177\u6267\u884c<\/h4>\n<p>\u6a21\u578b\u81ea\u52a8\u8c03\u7528\u5de5\u5177&#xff0c;LLM \u6839\u636e\u7528\u6237\u8f93\u5165\u81ea\u52a8\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177&#xff1b;\u4f7f\u7528\u767e\u70bcqwen3\u601d\u8003\u6a21\u578b\u6d41\u5f0f\u8f93\u51fa<\/p>\n<p>#!\/usr\/bin\/python3<br \/>\n# -*- coding: utf-8 -*-<\/p>\n<p>import json<br \/>\nimport asyncio<br \/>\nfrom typing import List, Dict, Optional<\/p>\n<p>from openai import OpenAI<br \/>\nfrom fastmcp import Client<\/p>\n<p>class IntegratedMCPClient:<br \/>\n    def __init__(self, config: Dict, model&#061;&#034;qwen3-235b-a22b&#034;):<br \/>\n        &#034;&#034;&#034;<br \/>\n        \u521d\u59cb\u5316\u96c6\u6210\u7684 MCP \u5ba2\u6237\u7aef<\/p>\n<p>        Args:<br \/>\n            config: MCP \u670d\u52a1\u5668\u914d\u7f6e\u5b57\u5178<br \/>\n            model: \u4f7f\u7528\u7684\u6a21\u578b\u540d\u79f0<br \/>\n        &#034;&#034;&#034;<br \/>\n        self.config &#061; config<br \/>\n        self.model &#061; model<\/p>\n<p>        # \u521d\u59cb\u5316 OpenAI \u5ba2\u6237\u7aef<br \/>\n        self.client &#061; OpenAI(<br \/>\n            api_key&#061;&#034;sk-424971&#034;,<br \/>\n            base_url&#061;&#034;https:\/\/dashscope.ale-mode\/v1&#034;<br \/>\n        )<\/p>\n<p>        # \u521d\u59cb\u5316 MCP \u5ba2\u6237\u7aef<br \/>\n        self.session &#061; Client(config)<br \/>\n        self.tools &#061; []<br \/>\n        self.server_tool_mapping &#061; {}  # \u8bb0\u5f55\u5de5\u5177\u6765\u81ea\u54ea\u4e2a\u670d\u52a1\u5668<\/p>\n<p>    async def prepare_tools(self):<br \/>\n        &#034;&#034;&#034;\u51c6\u5907\u6240\u6709\u53ef\u7528\u7684\u5de5\u5177&#034;&#034;&#034;<br \/>\n        try:<br \/>\n            # \u83b7\u53d6\u6240\u6709\u5de5\u5177<br \/>\n            tools &#061; await self.session.list_tools()<br \/>\n            print(f&#034;\u53d1\u73b0 {len(tools)} \u4e2a\u53ef\u7528\u5de5\u5177:&#034;)<\/p>\n<p>            self.tools &#061; []<br \/>\n            self.server_tool_mapping &#061; {}<\/p>\n<p>            for tool in tools:<br \/>\n                print(f&#034;  &#8211; {tool.name}: {tool.description}&#034;)<\/p>\n<p>                # \u6784\u5efa\u5de5\u5177\u63cf\u8ff0<br \/>\n                tool_def &#061; {<br \/>\n                    &#034;type&#034;: &#034;function&#034;,<br \/>\n                    &#034;function&#034;: {<br \/>\n                        &#034;name&#034;: tool.name,<br \/>\n                        &#034;description&#034;: tool.description,<br \/>\n                        &#034;parameters&#034;: tool.inputSchema,<br \/>\n                    }<br \/>\n                }<br \/>\n                self.tools.append(tool_def)<\/p>\n<p>                # \u8bb0\u5f55\u5de5\u5177\u6620\u5c04&#xff08;\u5982\u679c\u9700\u8981\u533a\u5206\u6765\u6e90&#xff09;<br \/>\n                # \u8fd9\u91cc\u53ef\u4ee5\u901a\u8fc7\u5de5\u5177\u540d\u524d\u7f00\u6216\u5176\u4ed6\u65b9\u5f0f\u6765\u8bc6\u522b\u6765\u6e90\u670d\u52a1\u5668<br \/>\n                if tool.name.startswith(&#034;trip_&#034;):<br \/>\n                    self.server_tool_mapping[tool.name] &#061; &#034;trip&#034;<br \/>\n                elif tool.name.startswith(&#034;math_&#034;):<br \/>\n                    self.server_tool_mapping[tool.name] &#061; &#034;math&#034;<br \/>\n                else:<br \/>\n                    self.server_tool_mapping[tool.name] &#061; &#034;unknown&#034;<\/p>\n<p>        except Exception as e:<br \/>\n            print(f&#034;\u51c6\u5907\u5de5\u5177\u65f6\u51fa\u9519: {e}&#034;)<br \/>\n            self.tools &#061; []<\/p>\n<p>    async def chat(self, messages: List[Dict]) -&gt; Optional[object]:<br \/>\n        &#034;&#034;&#034;\u5904\u7406\u804a\u5929\u5bf9\u8bdd&#xff0c;\u652f\u6301\u5de5\u5177\u8c03\u7528&#034;&#034;&#034;<br \/>\n        if not self.tools:<br \/>\n            await self.prepare_tools()<\/p>\n<p>        try:<br \/>\n            # \u4f7f\u7528\u6d41\u5f0f\u54cd\u5e94&#xff0c;\u542f\u7528\u601d\u8003\u8fc7\u7a0b<br \/>\n            response &#061; self.client.chat.completions.create(<br \/>\n                model&#061;self.model,<br \/>\n                messages&#061;messages,<br \/>\n                tools&#061;self.tools if self.tools else None,<br \/>\n                temperature&#061;0,<br \/>\n                max_tokens&#061;16000,<br \/>\n                stream&#061;True,<br \/>\n                logprobs&#061;False,<br \/>\n                stream_options&#061;{&#034;include_usage&#034;: True},<br \/>\n                extra_body&#061;{<br \/>\n                    &#034;enable_thinking&#034;: True  # \u542f\u7528\u601d\u8003\u8fc7\u7a0b<br \/>\n                }<br \/>\n            )<\/p>\n<p>            # \u6536\u96c6\u6d41\u5f0f\u54cd\u5e94<br \/>\n            collected_content &#061; &#034;&#034;<br \/>\n            collected_tool_calls &#061; []<br \/>\n            finish_reason &#061; None<\/p>\n<p>            print(&#034;AI: &#034;, end&#061;&#034;&#034;, flush&#061;True)<\/p>\n<p>            for chunk in response:<br \/>\n                # \u5b89\u5168\u68c0\u67e5&#xff1a;\u9632\u6b62\u7a7a\u7684 choices<br \/>\n                if not chunk.choices:<br \/>\n                    continue<\/p>\n<p>                delta &#061; chunk.choices[0].delta<br \/>\n                finish_reason &#061; chunk.choices[0].finish_reason<\/p>\n<p>                # \u6253\u5370\u601d\u8003\u8fc7\u7a0b&#xff08;Qwen \u7279\u6709\u5b57\u6bb5&#xff09;<br \/>\n                reasoning &#061; getattr(delta, &#034;reasoning_content&#034;, None)<br \/>\n                if reasoning:<br \/>\n                    print(f&#034;{reasoning}&#034;, end&#061;&#034;&#034;, flush&#061;True)<\/p>\n<p>                # \u6253\u5370\u5e38\u89c4\u5185\u5bb9<br \/>\n                if delta.content:<br \/>\n                    print(delta.content, end&#061;&#034;&#034;, flush&#061;True)<br \/>\n                    collected_content &#043;&#061; delta.content<\/p>\n<p>                # \u6536\u96c6\u5de5\u5177\u8c03\u7528<br \/>\n                if hasattr(delta, &#039;tool_calls&#039;) and delta.tool_calls:<br \/>\n                    if not collected_tool_calls:<br \/>\n                        collected_tool_calls &#061; [<br \/>\n                            {&#034;id&#034;: &#034;&#034;, &#034;function&#034;: {&#034;name&#034;: &#034;&#034;, &#034;arguments&#034;: &#034;&#034;}}<br \/>\n                            for _ in delta.tool_calls<br \/>\n                        ]<\/p>\n<p>                    for i, tool_call_delta in enumerate(delta.tool_calls):<br \/>\n                        if tool_call_delta.id:<br \/>\n                            collected_tool_calls[i][&#034;id&#034;] &#061; tool_call_delta.id<br \/>\n                        if tool_call_delta.function:<br \/>\n                            if tool_call_delta.function.name:<br \/>\n                                collected_tool_calls[i][&#034;function&#034;][&#034;name&#034;] &#061; tool_call_delta.function.name<br \/>\n                            if tool_call_delta.function.arguments:<br \/>\n                                collected_tool_calls[i][&#034;function&#034;][&#034;arguments&#034;] &#043;&#061; tool_call_delta.function.arguments<\/p>\n<p>            print()  # \u6362\u884c<\/p>\n<p>            # \u5982\u679c\u6ca1\u6709\u5de5\u5177\u8c03\u7528&#xff0c;\u8fd4\u56de\u6536\u96c6\u7684\u5185\u5bb9<br \/>\n            if finish_reason !&#061; &#039;tool_calls&#039; or not collected_tool_calls:<br \/>\n                class SimpleMessage:<br \/>\n                    def __init__(self, content):<br \/>\n                        self.content &#061; content<br \/>\n                return SimpleMessage(collected_content)<\/p>\n<p>            # \u5904\u7406\u5de5\u5177\u8c03\u7528<br \/>\n            print(&#034;\\\\n[\u6b63\u5728\u8c03\u7528\u5de5\u5177&#8230;]&#034;)<br \/>\n            assistant_message &#061; {<br \/>\n                &#039;role&#039;: &#039;assistant&#039;,<br \/>\n                &#039;content&#039;: collected_content,<br \/>\n                &#039;tool_calls&#039;: [<br \/>\n                    {<br \/>\n                        &#034;id&#034;: tc[&#034;id&#034;],<br \/>\n                        &#034;type&#034;: &#034;function&#034;,<br \/>\n                        &#034;function&#034;: {<br \/>\n                            &#034;name&#034;: tc[&#034;function&#034;][&#034;name&#034;],<br \/>\n                            &#034;arguments&#034;: tc[&#034;function&#034;][&#034;arguments&#034;]<br \/>\n                        }<br \/>\n                    }<br \/>\n                    for tc in collected_tool_calls<br \/>\n                ]<br \/>\n            }<\/p>\n<p>            print(f&#034;[\u52a9\u624b\u6d88\u606f]: \u8c03\u7528\u4e86 {len(collected_tool_calls)} \u4e2a\u5de5\u5177&#034;)<br \/>\n            messages.append(assistant_message)<\/p>\n<p>            # \u6267\u884c\u6bcf\u4e2a\u5de5\u5177\u8c03\u7528<br \/>\n            for tool_call in collected_tool_calls:<br \/>\n                try:<br \/>\n                    tool_name &#061; tool_call[&#039;function&#039;][&#039;name&#039;]<br \/>\n                    tool_args &#061; json.loads(tool_call[&#039;function&#039;][&#039;arguments&#039;])<br \/>\n                    server_name &#061; self.server_tool_mapping.get(tool_name, &#034;unknown&#034;)<\/p>\n<p>                    print(f&#034;\\\\n[\u6267\u884c\u5de5\u5177]: {tool_name} (\u6765\u81ea\u670d\u52a1\u5668: {server_name})&#034;)<br \/>\n                    print(f&#034;[\u5de5\u5177\u53c2\u6570]: {tool_args}&#034;)<\/p>\n<p>                    # \u8c03\u7528\u5de5\u5177<br \/>\n                    result &#061; await self.session.call_tool(tool_name, tool_args)<\/p>\n<p>                    # \u5904\u7406\u7ed3\u679c<br \/>\n                    result_content &#061; &#034;&#034;<br \/>\n                    if result:<br \/>\n                        if isinstance(result, list) and len(result) &gt; 0:<br \/>\n                            if hasattr(result[0], &#039;text&#039;):<br \/>\n                                result_content &#061; result[0].text<br \/>\n                            else:<br \/>\n                                result_content &#061; str(result[0])<br \/>\n                        else:<br \/>\n                            result_content &#061; str(result)<br \/>\n                    else:<br \/>\n                        result_content &#061; &#034;No result&#034;<\/p>\n<p>                    # \u6dfb\u52a0\u5de5\u5177\u7ed3\u679c\u5230\u6d88\u606f\u4e2d<br \/>\n                    messages.append({<br \/>\n                        &#039;role&#039;: &#039;tool&#039;,<br \/>\n                        &#039;tool_call_id&#039;: tool_call[&#039;id&#039;],<br \/>\n                        &#039;content&#039;: result_content<br \/>\n                    })<\/p>\n<p>                    print(f&#034;[\u5de5\u5177\u7ed3\u679c]: {result_content}&#034;)<\/p>\n<p>                except Exception as e:<br \/>\n                    print(f&#034;[\u5de5\u5177\u8c03\u7528\u9519\u8bef]: {e}&#034;)<br \/>\n                    messages.append({<br \/>\n                        &#039;role&#039;: &#039;tool&#039;,<br \/>\n                        &#039;tool_call_id&#039;: tool_call[&#039;id&#039;],<br \/>\n                        &#039;content&#039;: f&#034;Error executing tool: {str(e)}&#034;<br \/>\n                    })<\/p>\n<p>            # \u4f7f\u7528\u5de5\u5177\u7ed3\u679c\u83b7\u53d6\u6700\u7ec8\u54cd\u5e94<br \/>\n            print(&#034;\\\\n[\u751f\u6210\u6700\u7ec8\u56de\u7b54&#8230;]&#034;)<br \/>\n            return await self.chat(messages)<\/p>\n<p>        except Exception as e:<br \/>\n            print(f&#034;\u804a\u5929\u8fc7\u7a0b\u4e2d\u51fa\u9519: {e}&#034;)<br \/>\n            class ErrorMessage:<br \/>\n                def __init__(self, content):<br \/>\n                    self.content &#061; content<br \/>\n            return ErrorMessage(f&#034;\u62b1\u6b49&#xff0c;\u5904\u7406\u60a8\u7684\u8bf7\u6c42\u65f6\u51fa\u73b0\u9519\u8bef: {str(e)}&#034;)<\/p>\n<p>    async def loop(self):<br \/>\n        &#034;&#034;&#034;\u4ea4\u4e92\u5f0f\u804a\u5929\u5faa\u73af&#034;&#034;&#034;<br \/>\n        print(&#034;&#061;&#061;&#061; \u96c6\u6210 MCP \u5ba2\u6237\u7aef\u542f\u52a8 &#061;&#061;&#061;&#034;)<br \/>\n        print(&#034;\u652f\u6301\u7684\u547d\u4ee4:&#034;)<br \/>\n        print(&#034;  &#8211; quit\/exit\/bye: \u9000\u51fa\u7a0b\u5e8f&#034;)<br \/>\n        print(&#034;  &#8211; tools: \u663e\u793a\u53ef\u7528\u5de5\u5177&#034;)<br \/>\n        print(&#034;  &#8211; clear: \u6e05\u9664\u5bf9\u8bdd\u5386\u53f2&#034;)<br \/>\n        print(&#034;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;\\\\n&#034;)<\/p>\n<p>        conversation_history &#061; []<\/p>\n<p>        while True:<br \/>\n            try:<br \/>\n                async with self.session:<br \/>\n                    # \u5982\u679c\u662f\u7b2c\u4e00\u6b21\u8fdb\u5165&#xff0c;\u51c6\u5907\u5de5\u5177<br \/>\n                    if not self.tools:<br \/>\n                        await self.prepare_tools()<\/p>\n<p>                    question &#061; input(&#034;\\\\nUser: &#034;).strip()<\/p>\n<p>                    # \u5904\u7406\u7279\u6b8a\u547d\u4ee4<br \/>\n                    if question.lower() in [&#039;quit&#039;, &#039;exit&#039;, &#039;bye&#039;]:<br \/>\n                        print(&#034;\u518d\u89c1&#xff01;&#034;)<br \/>\n                        break<br \/>\n                    elif question.lower() &#061;&#061; &#039;tools&#039;:<br \/>\n                        print(f&#034;\\\\n\u53ef\u7528\u5de5\u5177 ({len(self.tools)} \u4e2a):&#034;)<br \/>\n                        for tool in self.tools:<br \/>\n                            func &#061; tool[&#039;function&#039;]<br \/>\n                            server &#061; self.server_tool_mapping.get(func[&#039;name&#039;], &#039;unknown&#039;)<br \/>\n                            print(f&#034;  &#8211; {func[&#039;name&#039;]} (\u670d\u52a1\u5668: {server})&#034;)<br \/>\n                            print(f&#034;    \u63cf\u8ff0: {func[&#039;description&#039;]}&#034;)<br \/>\n                        continue<br \/>\n                    elif question.lower() &#061;&#061; &#039;clear&#039;:<br \/>\n                        conversation_history &#061; []<br \/>\n                        print(&#034;\u5bf9\u8bdd\u5386\u53f2\u5df2\u6e05\u9664&#034;)<br \/>\n                        continue<br \/>\n                    elif not question:<br \/>\n                        continue<\/p>\n<p>                    # \u6dfb\u52a0\u7528\u6237\u6d88\u606f\u5230\u5386\u53f2<br \/>\n                    user_message &#061; {&#034;role&#034;: &#034;user&#034;, &#034;content&#034;: question}<br \/>\n                    current_messages &#061; conversation_history &#043; [user_message]<\/p>\n<p>                    # \u83b7\u53d6\u54cd\u5e94<br \/>\n                    response &#061; await self.chat(current_messages.copy())<\/p>\n<p>                    if response and hasattr(response, &#039;content&#039;):<br \/>\n                        print(f&#034;\\\\n\u56de\u7b54: {response.content}&#034;)<\/p>\n<p>                        # \u66f4\u65b0\u5bf9\u8bdd\u5386\u53f2<br \/>\n                        conversation_history.append(user_message)<br \/>\n                        conversation_history.append({&#034;role&#034;: &#034;assistant&#034;, &#034;content&#034;: response.content})<\/p>\n<p>                        # \u9650\u5236\u5386\u53f2\u957f\u5ea6&#xff0c;\u907f\u514d\u4e0a\u4e0b\u6587\u8fc7\u957f<br \/>\n                        if len(conversation_history) &gt; 20:  # \u4fdd\u7559\u6700\u8fd110\u8f6e\u5bf9\u8bdd<br \/>\n                            conversation_history &#061; conversation_history[-20:]<\/p>\n<p>            except KeyboardInterrupt:<br \/>\n                print(&#034;\\\\n\\\\n\u7a0b\u5e8f\u88ab\u7528\u6237\u4e2d\u65ad&#034;)<br \/>\n                break<br \/>\n            except Exception as e:<br \/>\n                print(f&#034;\u5faa\u73af\u8fc7\u7a0b\u4e2d\u51fa\u9519: {e}&#034;)<br \/>\n                continue<\/p>\n<p>    async def single_query(self, query: str) -&gt; str:<br \/>\n        &#034;&#034;&#034;\u5355\u6b21\u67e5\u8be2\u63a5\u53e3&#xff0c;\u9002\u7528\u4e8e\u975e\u4ea4\u4e92\u5f0f\u4f7f\u7528&#034;&#034;&#034;<br \/>\n        try:<br \/>\n            async with self.session:<br \/>\n                if not self.tools:<br \/>\n                    await self.prepare_tools()<\/p>\n<p>                messages &#061; [{&#034;role&#034;: &#034;user&#034;, &#034;content&#034;: query}]<br \/>\n                response &#061; await self.chat(messages)<\/p>\n<p>                return response.content if response and hasattr(response, &#039;content&#039;) else &#034;\u65e0\u54cd\u5e94&#034;<\/p>\n<p>        except Exception as e:<br \/>\n            return f&#034;\u67e5\u8be2\u5931\u8d25: {str(e)}&#034;<\/p>\n<p>async def main():<br \/>\n    &#034;&#034;&#034;\u4e3b\u51fd\u6570&#034;&#034;&#034;<br \/>\n    # MCP \u914d\u7f6e<br \/>\n    config &#061; {<br \/>\n        &#034;mcpServers&#034;: {<br \/>\n            &#034;trip&#034;: {&#034;url&#034;: &#034;http:\/\/localhost:8000\/sse&#034;},<br \/>\n            &#034;math&#034;: {<br \/>\n                &#034;command&#034;: &#034;python&#034;,<br \/>\n                &#034;args&#034;: [&#034;.\/api_mcp_server_math.py&#034;],<br \/>\n                &#034;env&#034;: {&#034;DEBUG&#034;: &#034;true&#034;}<br \/>\n            }<br \/>\n        }<br \/>\n    }<\/p>\n<p>    print(&#034;\u6b63\u5728\u521d\u59cb\u5316\u96c6\u6210 MCP \u5ba2\u6237\u7aef&#8230;&#034;)<br \/>\n    mcp_client &#061; IntegratedMCPClient(config)<\/p>\n<p>    # \u542f\u52a8\u4ea4\u4e92\u5f0f\u5faa\u73af<br \/>\n    await mcp_client.loop()<\/p>\n<p>async def test_single_queries():<br \/>\n    &#034;&#034;&#034;\u6d4b\u8bd5\u5355\u6b21\u67e5\u8be2\u7684\u793a\u4f8b&#034;&#034;&#034;<br \/>\n    config &#061; {<br \/>\n        &#034;mcpServers&#034;: {<br \/>\n            &#034;trip&#034;: {&#034;url&#034;: &#034;http:\/\/localhost:8000\/sse&#034;},<br \/>\n            &#034;math&#034;: {<br \/>\n                &#034;command&#034;: &#034;python&#034;,<br \/>\n                &#034;args&#034;: [&#034;.\/api_mcp_server_math.py&#034;],<br \/>\n                &#034;env&#034;: {&#034;DEBUG&#034;: &#034;true&#034;}<br \/>\n            }<br \/>\n        }<br \/>\n    }<\/p>\n<p>    mcp_client &#061; IntegratedMCPClient(config)<\/p>\n<p>    # \u6d4b\u8bd5\u67e5\u8be2<br \/>\n    test_queries &#061; [<br \/>\n        &#034;\u5e2e\u6211\u67e5\u8be2\u5e7f\u5dde\u540e\u5929\u7684\u9152\u5e97\u4fe1\u606f&#034;,<br \/>\n        &#034;\u8ba1\u7b97 15 \u52a0 27 \u7b49\u4e8e\u591a\u5c11&#034;,<br \/>\n        &#034;\u6211\u60f3\u77e5\u9053\u5317\u4eac\u660e\u5929\u6709\u4ec0\u4e48\u597d\u7684\u9152\u5e97\u63a8\u8350&#034;,<br \/>\n        &#034;\u8ba1\u7b97 100 \u4e58\u4ee5 50&#034;,<br \/>\n        &#034;\u4f60\u597d&#xff0c;\u8bf7\u4ecb\u7ecd\u4e00\u4e0b\u4f60\u7684\u529f\u80fd&#034;<br \/>\n    ]<\/p>\n<p>    for query in test_queries:<br \/>\n        print(f&#034;\\\\n{&#039;&#061;&#039;*50}&#034;)<br \/>\n        print(f&#034;\u6d4b\u8bd5\u67e5\u8be2: {query}&#034;)<br \/>\n        print(f&#034;{&#039;&#061;&#039;*50}&#034;)<\/p>\n<p>        result &#061; await mcp_client.single_query(query)<br \/>\n        print(f&#034;\u7ed3\u679c: {result}&#034;)<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    # \u8fd0\u884c\u4ea4\u4e92\u5f0f\u6a21\u5f0f<br \/>\n    asyncio.run(main())<\/p>\n<p>    # \u6216\u8005\u8fd0\u884c\u6d4b\u8bd5\u6a21\u5f0f<br \/>\n    # asyncio.run(test_single_queries())<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235727-68895fe79ca45.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb570\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528fastmcp\u5e93\u7684Client\u7c7b\u914d\u7f6e\u548c\u8c03\u7528\u591a\u670d\u52a1\u5de5\u5177\u3002\u793a\u4f8b\u4ee3\u7801\u6f14\u793a\u4e86\u540c\u65f6\u914d\u7f6e&quot;trip&quot;\u548c&quot;math&quot;\u4e24\u4e2a\u670d\u52a1\uff0c\u5206\u522b\u901a\u8fc7HTTP\u548c\u547d\u4ee4\u884c\u542f\u52a8\u3002\u901a\u8fc7call_tool\u65b9\u6cd5\u8c03\u7528\u4e0d\u540c\u524d\u7f00\u7684\u670d\u52a1\u5de5\u5177\uff08\u5982&quot;trip_check_hotel&quot;\u548c&quot;math_add&quot;\uff09\uff0c\u5e76\u5904\u7406\u8fd4\u56de\u7ed3\u679c\u3002\u5f53\u914d\u7f6e\u591a\u4e2a\u670d\u52a1\u65f6\u9700\u8981\u6dfb\u52a0\u524d\u7f00\u533a\u5206\uff0c\u800c\u5355\u670d\u52a1\u914d\u7f6e\u5219\u53ef\u76f4\u63a5\u8c03\u7528\u5de5\u5177\u51fd\u6570\u540d\u3002\u4ee3\u7801\u91c7\u7528\u5f02\u6b65\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u786e\u4fdd\u8d44\u6e90\u6b63\u786e\u91ca\u653e\u3002_fastmcp sse<\/p>\n","protected":false},"author":2,"featured_media":47454,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[74,73,4545,43],"topic":[],"class_list":["post-47461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-agent","tag-mcp","tag-ai","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528 - \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\/47461.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb570\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528fastmcp\u5e93\u7684Client\u7c7b\u914d\u7f6e\u548c\u8c03\u7528\u591a\u670d\u52a1\u5de5\u5177\u3002\u793a\u4f8b\u4ee3\u7801\u6f14\u793a\u4e86\u540c\u65f6\u914d\u7f6e&quot;trip&quot;\u548c&quot;math&quot;\u4e24\u4e2a\u670d\u52a1\uff0c\u5206\u522b\u901a\u8fc7HTTP\u548c\u547d\u4ee4\u884c\u542f\u52a8\u3002\u901a\u8fc7call_tool\u65b9\u6cd5\u8c03\u7528\u4e0d\u540c\u524d\u7f00\u7684\u670d\u52a1\u5de5\u5177\uff08\u5982&quot;trip_check_hotel&quot;\u548c&quot;math_add&quot;\uff09\uff0c\u5e76\u5904\u7406\u8fd4\u56de\u7ed3\u679c\u3002\u5f53\u914d\u7f6e\u591a\u4e2a\u670d\u52a1\u65f6\u9700\u8981\u6dfb\u52a0\u524d\u7f00\u533a\u5206\uff0c\u800c\u5355\u670d\u52a1\u914d\u7f6e\u5219\u53ef\u76f4\u63a5\u8c03\u7528\u5de5\u5177\u51fd\u6570\u540d\u3002\u4ee3\u7801\u91c7\u7528\u5f02\u6b65\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u786e\u4fdd\u8d44\u6e90\u6b63\u786e\u91ca\u653e\u3002_fastmcp sse\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/47461.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-29T23:57:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235724-68895fe4e9a1c.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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47461.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/47461.html\",\"name\":\"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-29T23:57:28+00:00\",\"dateModified\":\"2025-07-29T23:57:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/47461.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/47461.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47461.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528\"}]},{\"@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":"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528 - \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\/47461.html","og_locale":"zh_CN","og_type":"article","og_title":"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb570\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528fastmcp\u5e93\u7684Client\u7c7b\u914d\u7f6e\u548c\u8c03\u7528\u591a\u670d\u52a1\u5de5\u5177\u3002\u793a\u4f8b\u4ee3\u7801\u6f14\u793a\u4e86\u540c\u65f6\u914d\u7f6e&quot;trip&quot;\u548c&quot;math&quot;\u4e24\u4e2a\u670d\u52a1\uff0c\u5206\u522b\u901a\u8fc7HTTP\u548c\u547d\u4ee4\u884c\u542f\u52a8\u3002\u901a\u8fc7call_tool\u65b9\u6cd5\u8c03\u7528\u4e0d\u540c\u524d\u7f00\u7684\u670d\u52a1\u5de5\u5177\uff08\u5982&quot;trip_check_hotel&quot;\u548c&quot;math_add&quot;\uff09\uff0c\u5e76\u5904\u7406\u8fd4\u56de\u7ed3\u679c\u3002\u5f53\u914d\u7f6e\u591a\u4e2a\u670d\u52a1\u65f6\u9700\u8981\u6dfb\u52a0\u524d\u7f00\u533a\u5206\uff0c\u800c\u5355\u670d\u52a1\u914d\u7f6e\u5219\u53ef\u76f4\u63a5\u8c03\u7528\u5de5\u5177\u51fd\u6570\u540d\u3002\u4ee3\u7801\u91c7\u7528\u5f02\u6b65\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u786e\u4fdd\u8d44\u6e90\u6b63\u786e\u91ca\u653e\u3002_fastmcp sse","og_url":"https:\/\/www.wsisp.com\/helps\/47461.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-29T23:57:28+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729235724-68895fe4e9a1c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/47461.html","url":"https:\/\/www.wsisp.com\/helps\/47461.html","name":"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-29T23:57:28+00:00","dateModified":"2025-07-29T23:57:28+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/47461.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/47461.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/47461.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"fastmcp MCPConfig\u591a\u670d\u52a1\u5668\u4f7f\u7528\u6848\u4f8b\uff1bsse\u3001stdio\u3001streamable-http\u4f7f\u7528"}]},{"@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\/47461","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=47461"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47461\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/47454"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=47461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=47461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=47461"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=47461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}