{"id":110961,"date":"2026-09-30T00:16:44","date_gmt":"2026-09-29T16:16:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/110961.html"},"modified":"2026-09-30T00:16:44","modified_gmt":"2026-09-29T16:16:44","slug":"%e7%94%a8-bifrost-error-test-server-%e7%b3%bb%e7%bb%9f%e6%80%a7%e6%bc%94%e7%bb%83-mcp-%e9%94%99%e8%af%af%e5%a4%84%e7%90%86%ef%bc%9astdio-%e6%95%85%e9%9a%9c%e6%b3%a8%e5%85%a5%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/110961.html","title":{"rendered":"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357"},"content":{"rendered":"<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><\/li>\n<li><span class=\"gcb-tag\">LLM \u7f51\u5173<\/span><\/li>\n<li><span class=\"gcb-tag\">API\u7f51\u5173<\/span><\/li>\n<li><span class=\"gcb-tag\">\u540e\u7aef<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011bifrost<\/h3>\n<p class=\"gcb-project-desc\">Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000&#043; models support &amp; &lt;100 \u00b5s overhead at 5k RPS.<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/bifrost31\/bifrost<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<p>Bifrost \u4ed3\u5e93\u4e2d\u7684 examples\/mcps\/error-test-server \u662f\u4e00\u4e2a\u4e13\u4e3a MCP \u9519\u8bef\u573a\u666f\u4e0e\u8fb9\u7f18\u60c5\u51b5\u8bbe\u8ba1\u7684 STDIO \u6d4b\u8bd5\u670d\u52a1\u5668&#xff0c;\u80fd\u591f\u6309\u9700\u6ce8\u5165\u7578\u5f62 JSON\u3001\u8d85\u65f6\u3001\u968f\u673a\u5931\u8d25\u3001\u7f51\u7edc\u5f02\u5e38\u3001\u8d85\u5927\u54cd\u5e94\u4e0e\u622a\u65ad\u54cd\u5e94\u7b49\u6545\u969c\u3002\u672c\u6587\u4ee5\u8be5\u670d\u52a1\u5668\u4e3a\u6838\u5fc3&#xff0c;\u5b8c\u6574\u68b3\u7406\u5176 TypeScript \u4e0e Go \u53cc\u7248\u672c\u7684\u5de5\u5177\u6e05\u5355\u3001\u53c2\u6570\u8bed\u4e49\u3001\u6784\u5efa\u8fd0\u884c\u65b9\u5f0f&#xff0c;\u5e76\u57fa\u4e8e Bifrost \u5b98\u65b9 MCP \u6587\u6863\u4e0e core\/internal\/mcptests \u4e2d\u7684\u96c6\u6210\u6d4b\u8bd5&#xff0c;\u6f14\u793a\u5982\u4f55\u628a\u5b83\u63a5\u5165 Bifrost \u7f51\u5173\u5e76\u9010\u7c7b\u9a8c\u8bc1\u9519\u8bef\u5904\u7406\u94fe\u8def\u3002\u8bfb\u5b8c\u672c\u6587&#xff0c;\u4f60\u5c06\u638c\u63e1\u4e00\u5957\u53ef\u590d\u5236\u7684&#034;\u6545\u969c\u6ce8\u5165 \u2192 \u7f51\u5173\u6267\u884c \u2192 \u9519\u8bef\u65ad\u8a00&#034;\u6d4b\u8bd5\u65b9\u6cd5\u8bba\u3002<\/p>\n<h3>\u4e00\u3001error-test-server \u662f\u4ec0\u4e48&#xff1a;\u4e3a\u9519\u8bef\u5904\u7406\u800c\u751f\u7684\u6545\u969c\u6ce8\u5165\u5668<\/h3>\n<p>\u5728 MCP&#xff08;Model Context Protocol&#xff09;\u96c6\u6210\u5f00\u53d1\u4e2d&#xff0c;\u6700\u5bb9\u6613\u51fa\u95ee\u9898\u4e5f\u6700\u96be\u590d\u73b0\u7684&#xff0c;\u6070\u6070\u662f\u5404\u7c7b\u5f02\u5e38\u8def\u5f84&#xff1a;\u5de5\u5177\u8fd4\u56de\u4e86\u65e0\u6cd5\u89e3\u6790\u7684 JSON\u3001\u5de5\u5177\u957f\u65f6\u95f4\u6302\u8d77\u3001\u54cd\u5e94\u4f53\u8d85\u5927\u3001\u8fde\u63a5\u5c42\u62a5\u9519\u3001\u4e0a\u6e38\u968f\u673a\u5931\u8d25\u3002\u771f\u5b9e\u4e1a\u52a1\u670d\u52a1\u5668\u901a\u5e38\u4e0d\u4f1a&#034;\u914d\u5408&#034;\u4f60\u5236\u9020\u8fd9\u4e9b\u6545\u969c&#xff0c;\u56e0\u6b64\u9700\u8981\u4e00\u7c7b\u4e13\u95e8\u7528\u4e8e\u5236\u9020\u6545\u969c\u7684\u6d4b\u8bd5\u670d\u52a1\u5668\u3002<\/p>\n<p>examples\/mcps\/error-test-server&#xff08;README&#xff09;\u6b63\u662f\u8fd9\u6837\u4e00\u4e2a\u5de5\u5177&#xff1a;\u5b83\u662f\u4e00\u4e2a MCP STDIO server&#xff0c;\u4f18\u5316\u76ee\u6807\u662f&#034;\u6d4b\u8bd5\u9519\u8bef\u573a\u666f\u548c\u8fb9\u7f18\u60c5\u51b5&#034;\u3002\u5b83\u901a\u8fc7 MCP \u534f\u8bae\u66b4\u9732\u4e00\u7ec4\u5de5\u5177&#xff0c;\u6bcf\u4e2a\u5de5\u5177\u8d1f\u8d23\u6a21\u62df\u4e00\u7c7b\u5178\u578b\u6545\u969c&#xff0c;\u8ba9\u8c03\u7528\u65b9&#xff08;\u5982 Bifrost \u7f51\u5173&#xff09;\u53ef\u4ee5\u5728\u53d7\u63a7\u6761\u4ef6\u4e0b\u9a8c\u8bc1\u81ea\u5df1\u7684\u5bb9\u9519\u903b\u8f91\u3002<\/p>\n<p>\u4ece\u4ed3\u5e93\u7ed3\u6784\u770b&#xff0c;\u8be5\u793a\u4f8b\u540c\u65f6\u63d0\u4f9b\u4e86\u4e24\u5957\u5b9e\u73b0&#xff08;\u53ef\u4ee5\u63a8\u65ad\u5176\u8bbe\u8ba1\u610f\u56fe\u662f\u8986\u76d6\u4e24\u79cd\u4e3b\u6d41\u6280\u672f\u6808\u7684\u96c6\u6210\u6d4b\u8bd5&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u5b9e\u73b0\u5165\u53e3\u6587\u4ef6\u4f9d\u8d56\u5de5\u5177\u96c6<\/tr>\n<tbody>\n<tr>\n<td>TypeScript<\/td>\n<td>src\/index.ts<\/td>\n<td>&#064;modelcontextprotocol\/sdk 1.29.0 &#043; zod 3.24.1<\/td>\n<td>7 \u4e2a\u6545\u969c\u5de5\u5177<\/td>\n<\/tr>\n<tr>\n<td>Go<\/td>\n<td>main.go<\/td>\n<td>github.com\/mark3labs\/mcp-go v0.43.2<\/td>\n<td>5 \u4e2a\u6545\u969c\u5de5\u5177<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e24\u5957\u5b9e\u73b0\u6ce8\u518c\u7684 Server \u540d\u79f0\u5747\u4e3a error-test-server\u3001\u7248\u672c 1.0.0&#xff0c;\u4e14\u90fd\u901a\u8fc7 STDIO \u4f20\u8f93\u5c42&#xff08;TypeScript \u4f7f\u7528 StdioServerTransport&#xff0c;Go \u4f7f\u7528 server.ServeStdio&#xff09;\u5bf9\u5916\u670d\u52a1&#xff0c;\u53ef\u76f4\u63a5\u88ab Bifrost \u4ee5\u5b50\u8fdb\u7a0b\u65b9\u5f0f\u62c9\u8d77\u3002<\/p>\n<h3>\u4e8c\u3001TypeScript \u7248&#xff1a;7 \u4e2a\u6545\u969c\u6ce8\u5165\u5de5\u5177\u7684\u5b8c\u6574\u53c2\u6570\u8bf4\u660e<\/h3>\n<p>TypeScript \u5b9e\u73b0\u4f4d\u4e8e src\/index.ts&#xff0c;\u4f7f\u7528\u5b98\u65b9 &#064;modelcontextprotocol\/sdk \u6784\u5efa Server&#xff0c;\u901a\u8fc7 ListToolsRequestSchema \u6ce8\u518c\u5de5\u5177\u6e05\u5355\u3001CallToolRequestSchema \u5206\u53d1\u8c03\u7528&#xff0c;\u5e76\u7528 zod \u505a\u5165\u53c2\u89e3\u6790\u3002\u5176 7 \u4e2a\u5de5\u5177\u8986\u76d6\u4e86 MCP \u5de5\u5177\u8c03\u7528\u6700\u5e38\u89c1\u7684\u5f02\u5e38\u7c7b\u522b&#xff1a;<\/p>\n<h4>2.1 malformed_json \u2014\u2014 \u7578\u5f62 JSON<\/h4>\n<p>\u8fd4\u56de\u5185\u5bb9\u975e\u6cd5 JSON \u7684\u6587\u672c&#xff0c;json_type \u51b3\u5b9a\u7578\u5f62\u65b9\u5f0f&#xff08;\u679a\u4e3e\u503c&#xff0c;\u53ef\u9009&#xff0c;\u9ed8\u8ba4 truncated&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u679a\u4e3e\u503c\u6a21\u62df\u7684\u7578\u5f62\u7c7b\u578b\u5b9e\u9645\u8fd4\u56de\u5185\u5bb9<\/tr>\n<tbody>\n<tr>\n<td>truncated<\/td>\n<td>JSON \u622a\u65ad<\/td>\n<td>{&#034;status&#034;: &#034;success&#034;, &#034;data&#034;: {&#034;items&#034;: [1, 2, 3&#xff08;\u7f3a\u5c11\u7ed3\u5c3e&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>invalid_escape<\/td>\n<td>\u975e\u6cd5\u8f6c\u4e49\u5e8f\u5217<\/td>\n<td>{&#034;status&#034;: &#034;success&#034;, &#034;message&#034;: &#034;Invalid \\\\x escape&#034;}<\/td>\n<\/tr>\n<tr>\n<td>unclosed_bracket<\/td>\n<td>\u672a\u95ed\u5408\u62ec\u53f7<\/td>\n<td>{&#034;status&#034;: &#034;success&#034;, &#034;data&#034;: [1, 2, 3]<\/td>\n<\/tr>\n<tr>\n<td>mixed_types<\/td>\n<td>\u6df7\u5408\u975e\u6cd5\u7c7b\u578b<\/td>\n<td>{&#034;status&#034;: &#034;success&#034;, &#034;value&#034;: NaN, &#034;other&#034;: undefined}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8c03\u7528\u793a\u4f8b&#xff08;\u6765\u81ea README&#xff09;&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;name&#034;: &#034;malformed_json&#034;,<br \/>\n  &#034;arguments&#034;: {<br \/>\n    &#034;id&#034;: &#034;test-1&#034;,<br \/>\n    &#034;json_type&#034;: &#034;truncated&#034;<br \/>\n  }<br \/>\n}<\/p>\n<p>\u6d4b\u8bd5\u8981\u70b9&#xff1a;MCP \u534f\u8bae\u5c42\u4f1a\u5305\u88c5\u8fd4\u56de\u5185\u5bb9&#xff0c;\u7578\u5f62 JSON \u51fa\u73b0\u5728 content[].text \u4e2d\u3002\u9a8c\u8bc1\u7684\u662f&#034;\u7f51\u5173\u62ff\u5230\u7578\u5f62\u5185\u5bb9\u65f6\u4e0d\u5d29\u6e83\u3001\u80fd\u4f18\u96c5\u5904\u7406&#034;\u2014\u2014\u6b63\u5982\u6d4b\u8bd5\u6ce8\u91ca\u6240\u5199&#xff1a;&#034;MCP protocol should handle this gracefully&#034;&#xff08;\u89c1\u4e0b\u6587\u7b2c\u56db\u8282&#xff09;\u3002<\/p>\n<h4>2.2 timeout_tool \u2014\u2014 \u4e3b\u52a8\u6302\u8d77<\/h4>\n<p>\u6309 timeout_ms&#xff08;\u6beb\u79d2&#xff0c;\u53ef\u9009&#xff0c;\u9ed8\u8ba4 5000&#xff09;\u6302\u8d77\u540e\u8fd4\u56de\u3002\u6e90\u7801\u5b9e\u73b0\u4e3a await new Promise((resolve) &#061;&gt; setTimeout(resolve, timeoutMs))&#xff0c;\u82e5\u7f51\u5173\u914d\u7f6e\u7684\u5de5\u5177\u6267\u884c\u8d85\u65f6\u77ed\u4e8e\u8be5\u503c&#xff0c;\u8c03\u7528\u5c06\u89e6\u53d1\u8d85\u65f6\u8def\u5f84\u3002<\/p>\n<p>{<br \/>\n  &#034;name&#034;: &#034;timeout_tool&#034;,<br \/>\n  &#034;arguments&#034;: {<br \/>\n    &#034;id&#034;: &#034;test-2&#034;,<br \/>\n    &#034;timeout_ms&#034;: 3000<br \/>\n  }<br \/>\n}<\/p>\n<h4>2.3 intermittent_fail \u2014\u2014 \u968f\u673a\u5931\u8d25<\/h4>\n<p>\u6309 fail_rate&#xff08;0&#xff5e;1 \u4e4b\u95f4&#xff0c;\u53ef\u9009&#xff0c;\u9ed8\u8ba4 0.5&#xff09;\u6982\u7387\u8fd4\u56de isError: true \u7684\u5931\u8d25\u7ed3\u679c\u3002\u5b9e\u73b0\u662f Math.random() &lt; failRate \u65f6\u8fd4\u56de\u5931\u8d25&#xff0c;\u5426\u5219\u8fd4\u56de\u6210\u529f JSON\u3002\u9002\u5408\u9a8c\u8bc1\u7f51\u5173\u7684\u91cd\u8bd5\u903b\u8f91\u4e0e\u9519\u8bef\u8ba1\u6570\u662f\u5426\u6309\u6982\u7387\u6536\u655b\u3002<\/p>\n<p>{<br \/>\n  &#034;name&#034;: &#034;intermittent_fail&#034;,<br \/>\n  &#034;arguments&#034;: {<br \/>\n    &#034;id&#034;: &#034;test-3&#034;,<br \/>\n    &#034;fail_rate&#034;: 0.7<br \/>\n  }<br \/>\n}<\/p>\n<h4>2.4 network_error \u2014\u2014 \u6a21\u62df\u7f51\u7edc\u5c42\u9519\u8bef<\/h4>\n<p>\u6309 error_type&#xff08;\u679a\u4e3e&#xff0c;\u53ef\u9009&#xff0c;\u9ed8\u8ba4 connection_refused&#xff09;\u8fd4\u56de\u5bf9\u5e94\u9519\u8bef\u6587\u6848&#xff0c;\u4e14\u603b\u662f\u5e26 isError: true&#xff1a;<\/p>\n<table>\n<tr>\u679a\u4e3e\u503c\u6a21\u62df\u573a\u666f\u8fd4\u56de\u9519\u8bef\u4fe1\u606f<\/tr>\n<tbody>\n<tr>\n<td>connection_refused<\/td>\n<td>\u8fde\u63a5\u88ab\u62d2\u7edd<\/td>\n<td>Connection refused: Unable to connect to remote server<\/td>\n<\/tr>\n<tr>\n<td>timeout<\/td>\n<td>\u8bf7\u6c42\u8d85\u65f6<\/td>\n<td>Request timeout: Server did not respond within timeout period<\/td>\n<\/tr>\n<tr>\n<td>dns_failure<\/td>\n<td>DNS \u89e3\u6790\u5931\u8d25<\/td>\n<td>DNS resolution failed: Unable to resolve hostname<\/td>\n<\/tr>\n<tr>\n<td>ssl_error<\/td>\n<td>SSL \u63e1\u624b\u5931\u8d25<\/td>\n<td>SSL handshake failed: Certificate verification error<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f&#xff1a;\u8be5\u5de5\u5177\u6a21\u62df\u7684\u662f&#034;\u5de5\u5177\u7ed3\u679c\u91cc\u51fa\u73b0\u7684\u7f51\u7edc\u7c7b\u9519\u8bef&#034;&#xff0c;\u800c\u975e\u771f\u6b63\u7684\u8fde\u63a5\u5c42\u6545\u969c\u3002<\/p>\n<h4>2.5 large_payload \u2014\u2014 \u8d85\u5927\u54cd\u5e94\u4f53<\/h4>\n<p>\u6309 size_kb&#xff08;KB&#xff0c;\u53ef\u9009&#xff0c;\u9ed8\u8ba4 100&#xff09;\u751f\u6210\u7ea6 size_kb KB \u7684\u6587\u672c\u8d1f\u8f7d&#xff08;\u5185\u90e8\u6309 1KB \u5206\u5757\u62fc\u63a5&#xff09;&#xff0c;\u7528\u4e8e\u6d4b\u8bd5\u7f51\u5173\u7684\u54cd\u5e94\u5927\u5c0f\u9650\u5236\u4e0e\u5185\u5b58\u5360\u7528\u3002<\/p>\n<p>{<br \/>\n  &#034;name&#034;: &#034;large_payload&#034;,<br \/>\n  &#034;arguments&#034;: {<br \/>\n    &#034;id&#034;: &#034;test-4&#034;,<br \/>\n    &#034;size_kb&#034;: 500<br \/>\n  }<br \/>\n}<\/p>\n<h4>2.6 partial_response \u2014\u2014 \u4e0d\u5b8c\u6574\u54cd\u5e94<\/h4>\n<p>\u6309 break_at&#xff08;\u679a\u4e3e&#xff0c;\u53ef\u9009&#xff0c;\u9ed8\u8ba4 middle&#xff09;\u8fd4\u56de\u5728&#034;\u5f00\u5934 \/ \u4e2d\u95f4 \/ \u7ed3\u5c3e&#034;\u65ad\u5f00\u7684\u54cd\u5e94&#xff1a;<\/p>\n<table>\n<tr>\u679a\u4e3e\u503c\u8fd4\u56de\u5185\u5bb9<\/tr>\n<tbody>\n<tr>\n<td>start<\/td>\n<td>{&#034;sta<\/td>\n<\/tr>\n<tr>\n<td>middle<\/td>\n<td>{&#034;status&#034;: &#034;success&#034;, &#034;data&#034;: {&#034;incomplete<\/td>\n<\/tr>\n<tr>\n<td>end<\/td>\n<td>{&#034;status&#034;: &#034;success&#034;, &#034;data&#034;: {&#034;complete&#034;: true}, &#034;message&#034;: &#034;Almost done&#034;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2.7 invalid_content_type \u2014\u2014 \u5185\u5bb9\u7c7b\u578b\u4e0e\u58f0\u660e\u4e0d\u5339\u914d<\/h4>\n<p>\u8fd4\u56de\u4e00\u6bb5&#034;\u81ea\u79f0\u662f JSON \u4f46\u5b9e\u9645\u4e0d\u662f JSON&#034;\u7684\u6587\u672c&#xff1a;&#034;This is not valid JSON content but the server says it is&#034;&#xff0c;\u7528\u4e8e\u6d4b\u8bd5\u8c03\u7528\u65b9\u5bf9 content-type \u58f0\u660e\u4e0e\u771f\u5b9e\u5185\u5bb9\u4e0d\u4e00\u81f4\u65f6\u7684\u5904\u7406\u3002<\/p>\n<h4>2.8 \u515c\u5e95\u884c\u4e3a<\/h4>\n<p>\u8c03\u7528\u672a\u77e5\u5de5\u5177\u65f6\u629b\u51fa Unknown tool: &lt;name&gt; \u5e76\u8fdb\u5165\u901a\u7528 catch \u5206\u652f&#xff0c;\u6700\u7ec8\u4ee5 isError: true \u8fd4\u56de Error: &lt;message&gt;&#xff0c;\u4fdd\u8bc1\u670d\u52a1\u5668\u672c\u8eab\u4e0d\u5d29\u6e83\u3002<\/p>\n<h3>\u4e09\u3001Go \u7248&#xff1a;\u540c\u4e00\u601d\u8def\u7684 mcp-go \u5b9e\u73b0<\/h3>\n<p>Go \u5b9e\u73b0\u4f4d\u4e8e main.go&#xff0c;\u57fa\u4e8e github.com\/mark3labs\/mcp-go \u6784\u5efa&#xff0c;\u5165\u53e3\u6d41\u7a0b\u4e3a&#xff1a;\u521b\u5efa server.NewMCPServer(&#034;error-test-server&#034;, &#034;1.0.0&#034;, server.WithToolCapabilities(true)) \u2192 \u6ce8\u518c 5 \u4e2a\u5de5\u5177 \u2192 server.ServeStdio(s)\u3002\u5b83\u5728 TypeScript \u7248\u57fa\u7840\u4e0a\u8865\u5145\u4e86\u8d44\u6e90\u8017\u5c3d\u4e0e\u9519\u8bef\u5206\u7c7b\u4e24\u7c7b\u573a\u666f&#xff1a;<\/p>\n<h4>3.1 timeout_after \u2014\u2014 \u6309\u79d2\u6302\u8d77&#xff08;\u4e0a\u4e0b\u6587\u611f\u77e5&#xff09;<\/h4>\n<p>\u53c2\u6570 seconds&#xff08;\u5fc5\u586b&#xff0c;\u79d2&#xff09;\u3002\u4e0e TypeScript \u7248\u4e0d\u540c&#xff0c;Go \u7248\u4f7f\u7528 context-aware \u7761\u7720&#xff1a;<\/p>\n<p>select {<br \/>\ncase &lt;-time.After(duration):<br \/>\n    \/\/ \u6b63\u5e38\u8fd4\u56de<br \/>\ncase &lt;-ctx.Done():<br \/>\n    return mcp.NewToolResultError(&#034;Operation cancelled or timed out&#034;), nil<br \/>\n}<\/p>\n<p>\u5373&#xff1a;\u5f53 Bifrost \u4fa7\u8d85\u65f6\u5e76\u53d6\u6d88\u4e0a\u4e0b\u6587\u65f6&#xff0c;\u670d\u52a1\u5668\u80fd\u611f\u77e5\u53d6\u6d88\u5e76\u8fd4\u56de&#034;Operation cancelled or timed out&#034;&#xff0c;\u800c\u4e0d\u662f\u4e00\u76f4\u7a7a\u8f6c\u3002\u8fd9\u662f\u6d4b\u8bd5&#034;\u7f51\u5173\u8d85\u65f6\u80fd\u5426\u771f\u6b63\u53d6\u6d88\u4e0a\u6e38&#034;\u7684\u5173\u952e\u7ec6\u8282\u3002<\/p>\n<h4>3.2 return_malformed_json \u2014\u2014 \u8fd4\u56de\u7834\u635f JSON<\/h4>\n<p>\u8fd4\u56de {&#034;key&#034;: &#034;value&#034;, &#034;broken&#034;: }&#xff0c;\u6ce8\u91ca\u660e\u786e\u6307\u51fa&#034;\u5185\u5bb9\u672c\u8eab\u662f\u975e\u6cd5 JSON&#xff0c;MCP \u534f\u8bae\u5c42\u5e94\u8d1f\u8d23\u5904\u7406&#034;&#xff0c;\u4e0e TypeScript \u7248 malformed_json \u76f8\u547c\u5e94\u3002<\/p>\n<h4>3.3 return_error \u2014\u2014 \u6309\u7c7b\u578b\u8fd4\u56de\u9519\u8bef<\/h4>\n<p>\u53c2\u6570 error_type&#xff08;\u5fc5\u586b&#xff0c;\u679a\u4e3e&#xff1a;validation\u3001runtime\u3001network\u3001timeout\u3001permission&#xff09;&#xff0c;\u5206\u522b\u8fd4\u56de\u5bf9\u5e94\u6587\u6848\u7684\u9519\u8bef\u7ed3\u679c\u3002\u8fd9\u662f Bifrost \u96c6\u6210\u6d4b\u8bd5\u4e2d\u9010\u7c7b\u9a8c\u8bc1\u9519\u8bef\u4f20\u64ad\u7684\u4e3b\u529b\u5de5\u5177&#xff08;\u89c1\u7b2c\u56db\u8282&#xff09;\u3002<\/p>\n<h4>3.4 intermittent_fail \u2014\u2014 \u6309\u767e\u5206\u6bd4\u968f\u673a\u5931\u8d25<\/h4>\n<p>\u53c2\u6570 fail_rate&#xff08;\u5fc5\u586b&#xff0c;0&#xff5e;100&#xff09;&#xff0c;\u8d85\u51fa\u8303\u56f4\u8fd4\u56de &#034;Fail rate must be between 0 and 100&#034;\u3002\u5b9e\u73b0\u4e3a rand.Float64() * 100 &lt; failRate \u65f6\u5931\u8d25&#xff0c;\u5931\u8d25\u7ed3\u679c\u9644\u5e26\u968f\u673a\u6570\u4fbf\u4e8e\u8c03\u8bd5\u3002<\/p>\n<h4>3.5 memory_intensive \u2014\u2014 \u5185\u5b58\u5206\u914d<\/h4>\n<p>\u53c2\u6570 size_mb&#xff08;\u5fc5\u586b&#xff0c;\u6574\u6570 MB&#xff09;&#xff0c;\u4e3a\u9632\u5d29\u6e83\u9650\u5236 100MB \u4e0a\u9650&#xff0c;\u5206\u914d\u540e\u4ee5\u6a21\u5f0f\u586b\u5145\u5e76\u8ba1\u7b97 checksum \u9a8c\u8bc1\u5206\u914d\u771f\u5b9e\u53d1\u751f&#xff0c;\u6700\u540e\u7f6e\u7a7a\u91ca\u653e\u3002\u9002\u5408\u6d4b\u8bd5\u7f51\u5173\/\u5bb9\u5668\u7684\u8d44\u6e90\u9650\u5236\u4e0e OOM \u9632\u62a4\u3002<\/p>\n<h3>\u56db\u3001\u5728 Bifrost \u4e2d\u63a5\u5165&#xff1a;STDIO \u5ba2\u6237\u7aef\u914d\u7f6e\u4e0e\u5de5\u5177\u6267\u884c\u94fe\u8def<\/h3>\n<p>error-test-server \u8bbe\u8ba1\u4e0a\u5c31\u662f&#034;Bifrost MCP \u96c6\u6210\u4e2d\u6d4b\u8bd5\u9519\u8bef\u5904\u7406&#034;\u7684 STDIO \u6d4b\u8bd5\u670d\u52a1\u5668&#xff08;README \u660e\u786e\u8bf4\u660e\u6b64\u5b9a\u4f4d&#xff09;\u3002\u8981\u628a\u5b83\u63a5\u8fdb Bifrost&#xff0c;\u9700\u8981\u8d70\u6807\u51c6\u7684 MCP \u5ba2\u6237\u7aef\u6ce8\u518c\u6d41\u7a0b\u3002<\/p>\n<h4>4.1 \u6784\u5efa\u4e8c\u8fdb\u5236<\/h4>\n<p>Go \u7248\u9700\u8981\u5148\u7f16\u8bd1\u51fa\u53ef\u6267\u884c\u6587\u4ef6&#xff08;fixtures.go \u4e2d\u7684\u6d4b\u8bd5\u914d\u7f6e\u76f4\u63a5\u6307\u5411 bin\/error-test-server&#xff09;&#xff1a;<\/p>\n<p>cd examples\/mcps\/error-test-server<br \/>\ngo build -o bin\/error-test-server<\/p>\n<p>TypeScript \u7248\u5219\u6309 README \u7684\u6b65\u9aa4\u5b89\u88c5\u4f9d\u8d56\u3001\u7f16\u8bd1\u3001\u8fd0\u884c&#xff1a;<\/p>\n<p>npm install        # \u5b89\u88c5\u4f9d\u8d56<br \/>\nnpm run build      # tsc \u7f16\u8bd1\u5230 dist\/&#xff08;package.json \u4e2d build \u4e3a &#034;tsc &amp;&amp; chmod &#043;x dist\/index.js&#034;&#xff09;<br \/>\nnode dist\/index.js # \u4ee5 STDIO \u65b9\u5f0f\u8fd0\u884c<\/p>\n<h4>4.2 \u5728 Bifrost \u4e2d\u6ce8\u518c\u4e3a STDIO MCP Client<\/h4>\n<p>Bifrost \u7684 MCP \u96c6\u6210\u4e2d&#xff0c;\u6bcf\u4e2a\u4e0a\u6e38\u8fde\u63a5\u79f0\u4e3a\u4e00\u4e2a MCP Client&#xff0c;\u652f\u6301 STDIO \/ HTTP \/ SSE \u4e09\u79cd\u8fde\u63a5\u7c7b\u578b&#xff08;\u8be6\u89c1 docs\/mcp\/connecting-to-servers.mdx&#xff09;\u3002STDIO \u7c7b\u578b\u4f1a\u62c9\u8d77\u5b50\u8fdb\u7a0b\u5e76\u901a\u8fc7 stdin\/stdout \u901a\u4fe1&#xff0c;\u6700\u9002\u5408\u672c\u5730\u6d4b\u8bd5\u670d\u52a1\u5668\u3002\u53c2\u7167\u6d4b\u8bd5\u5939\u5177 GetErrorTestServerConfig \u4e2d\u7684\u5b9e\u9645\u914d\u7f6e&#xff0c;\u4e00\u4e2a\u6700\u5c0f\u53ef\u7528\u7684\u5ba2\u6237\u7aef\u914d\u7f6e\u5982\u4e0b&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;id&#034;: &#034;error-test-server&#034;,<br \/>\n  &#034;name&#034;: &#034;ErrorTestServer&#034;,<br \/>\n  &#034;connection_type&#034;: &#034;stdio&#034;,<br \/>\n  &#034;stdio_config&#034;: {<br \/>\n    &#034;command&#034;: &#034;\/absolute\/path\/to\/examples\/mcps\/error-test-server\/bin\/error-test-server&#034;,<br \/>\n    &#034;args&#034;: []<br \/>\n  },<br \/>\n  &#034;auth_type&#034;: &#034;none&#034;,<br \/>\n  &#034;tools_to_execute&#034;: [&#034;*&#034;],<br \/>\n  &#034;tools_to_auto_execute&#034;: [],<br \/>\n  &#034;is_code_mode_client&#034;: true<br \/>\n}<\/p>\n<p>\u8981\u70b9\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>connection_type: &#034;stdio&#034;&#xff1a;\u5b50\u8fdb\u7a0b\u901a\u4fe1&#xff0c;STDIO \u7ee7\u627f\u5b50\u8fdb\u7a0b\u73af\u5883\u3001\u65e0 per-call \u8ba4\u8bc1&#xff0c;\u8ba4\u8bc1\u7c7b\u578b\u4f7f\u7528 none\u3002<\/li>\n<li>tools_to_execute&#xff1a;\u63a7\u5236\u54ea\u4e9b\u5de5\u5177\u5141\u8bb8\u6267\u884c&#xff0c;[&#034;*&#034;] \u8868\u793a\u5168\u91cf\u653e\u884c&#xff0c;\u53ef\u7528\u4e8e\u89c2\u5bdf\u9519\u8bef\u5de5\u5177\u5bf9 Bifrost \u7684\u5f71\u54cd\u9762\u3002<\/li>\n<li>\u5de5\u5177\u540d\u524d\u7f00&#xff1a;\u63a5\u5165\u540e\u5de5\u5177\u4f1a\u5e26\u4e0a\u5ba2\u6237\u7aef\u540d\u524d\u7f00&#xff0c;\u4f8b\u5982 Go \u7248\u5de5\u5177\u5728\u6d4b\u8bd5\u4e2d\u5b9e\u9645\u4ee5 ErrorTestServer-return_error\u3001ErrorTestServer-timeout_after\u3001ErrorTestServer-intermittent_fail \u7684\u5f62\u5f0f\u88ab\u8c03\u7528&#xff08;\u89c1 error_handling_protocol_test.go&#xff09;&#xff0c;\u7528\u4e8e\u4fdd\u8bc1\u591a\u5ba2\u6237\u7aef\u4e0b\u7684\u552f\u4e00\u6027\u3002<\/li>\n<\/ul>\n<h4>4.3 \u5de5\u5177\u6267\u884c\u7684\u5b8c\u6574\u94fe\u8def<\/h4>\n<p>Bifrost \u7684\u5de5\u5177\u6267\u884c\u6d41\u7a0b\u4e3a&#034;Chat Request \u2192 Review Tool Calls \u2192 Execute Tools \u2192 Continue Conversation&#034;&#xff08;\u8be6\u89c1 docs\/mcp\/tool-execution.mdx&#xff09;&#xff1a;LLM \u8fd4\u56de tool_calls \u540e&#xff0c;\u5e94\u7528\u663e\u5f0f\u8c03\u7528 \/v1\/mcp\/tool\/execute \u6267\u884c\u3002\u6d4b\u8bd5\u4ee3\u7801\u4e2d\u7684\u7b49\u4ef7\u8c03\u7528\u662f bifrost.ExecuteChatMCPTool(ctx, &amp;toolCall)\u3002\u8fd9\u610f\u5473\u7740\u6545\u969c\u5de5\u5177\u8fd4\u56de\u7684\u9519\u8bef\u65e2\u53ef\u4ee5\u4f5c\u4e3a&#034;\u6267\u884c\u9519\u8bef&#034;&#xff08;bifrostErr&#xff09;\u5192\u51fa\u6765&#xff0c;\u4e5f\u53ef\u80fd\u4f5c\u4e3a&#034;\u5de5\u5177\u6d88\u606f\u5185\u5bb9&#034;&#xff08;result.Content&#xff09;\u8fd4\u56de\u2014\u2014\u4e24\u79cd\u5f62\u6001\u90fd\u5e94\u88ab\u6b63\u786e\u5904\u7406&#xff0c;\u8fd9\u6b63\u662f error-test-server \u8981\u53cd\u590d\u9a8c\u8bc1\u7684\u6838\u5fc3\u5951\u7ea6\u3002<\/p>\n<h3>\u4e94\u3001\u7aef\u5230\u7aef\u9a8c\u8bc1&#xff1a;Bifrost \u96c6\u6210\u6d4b\u8bd5\u5982\u4f55\u7528\u8fd9\u4e9b\u5de5\u5177\u505a\u65ad\u8a00<\/h3>\n<p>\u4ed3\u5e93\u7684 core\/internal\/mcptests\/error_handling_protocol_test.go \u662f error-test-server \u6700\u76f4\u63a5\u7684&#034;\u7528\u6237&#034;&#xff0c;\u5b83\u628a\u4e0a\u8ff0\u6545\u969c\u5de5\u5177\u6620\u5c04\u4e3a\u4e00\u7ec4\u53ef\u65ad\u8a00\u7684\u6d4b\u8bd5\u573a\u666f&#xff0c;\u662f\u7406\u89e3\u6bcf\u4e2a\u5de5\u5177\u7528\u9014\u7684\u6700\u4f73\u53c2\u8003&#xff1a;<\/p>\n<h4>5.1 \u9010\u7c7b\u9a8c\u8bc1\u9519\u8bef\u7c7b\u578b&#xff08;return_error&#xff09;<\/h4>\n<p>TestErrorHandling_STDIO_MCPErrorResponse \u904d\u5386 validation \/ runtime \/ network \/ timeout \/ permission \u4e94\u79cd\u9519\u8bef\u7c7b\u578b\u8c03\u7528 ErrorTestServer-return_error&#xff0c;\u65ad\u8a00&#034;\u9519\u8bef\u8981\u4e48\u4f5c\u4e3a\u6267\u884c\u9519\u8bef\u8fd4\u56de&#xff08;\u9519\u8bef\u6d88\u606f\u975e\u7a7a&#xff09;&#xff0c;\u8981\u4e48\u4f5c\u4e3a\u5de5\u5177\u6d88\u606f\u5185\u5bb9\u8fd4\u56de&#xff08;role \u4e3a tool&#xff09;&#034;&#xff0c;\u4e8c\u8005\u5c45\u5176\u4e00\u5373\u89c6\u4e3a\u6b63\u786e\u5904\u7406\u3002<\/p>\n<h4>5.2 \u9a8c\u8bc1\u8d85\u65f6\u8fb9\u754c&#xff08;timeout_after&#xff09;<\/h4>\n<p>TestErrorHandling_STDIO_TimeoutScenario \u5148\u628a\u5de5\u5177\u7ba1\u7406\u5668\u8d85\u65f6\u914d\u7f6e\u4e3a 2 \u79d2&#xff1a;<\/p>\n<p>manager.UpdateToolManagerConfig(&amp;schemas.MCPToolManagerConfig{<br \/>\n    ToolExecutionTimeout: schemas.Duration(2 * time.Second),<br \/>\n})<\/p>\n<p>\u518d\u8c03\u7528 ErrorTestServer-timeout_after \u5e76\u4f20\u5165 seconds: 5.0\u3002\u968f\u540e\u65ad\u8a00&#xff1a;<\/p>\n<ul>\n<li>\u8fd4\u56de\u9519\u8bef\u975e\u7a7a\u3001\u7ed3\u679c\u4e3a\u7a7a&#xff0c;\u9519\u8bef\u4fe1\u606f\u5305\u542b &#034;timed out&#034;&#xff1b;<\/li>\n<li>\u8017\u65f6\u843d\u5728 1&#xff5e;3 \u79d2\u4e4b\u95f4&#xff08;\u6309 2 \u79d2\u8d85\u65f6\u88ab\u5207\u6389&#xff0c;\u800c\u4e0d\u662f\u7b49\u6ee1 5 \u79d2&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e00\u7ec4\u65ad\u8a00\u7cbe\u786e\u9a8c\u8bc1\u4e86&#034;\u7f51\u5173\u8d85\u65f6\u80fd\u5982\u671f\u751f\u6548&#034;\u3002<\/p>\n<h4>5.3 \u9a8c\u8bc1\u968f\u673a\u5931\u8d25\u6536\u655b&#xff08;intermittent_fail&#xff09;<\/h4>\n<p>TestErrorHandling_STDIO_IntermittentFailures \u7528\u4e09\u79cd fail_rate \u5404\u8dd1\u591a\u8f6e&#xff1a;<\/p>\n<ul>\n<li>0.0 \u00d7 10 \u8f6e&#xff1a;\u5168\u90e8\u6210\u529f&#xff1b;<\/li>\n<li>100.0 \u00d7 10 \u8f6e&#xff1a;\u5168\u90e8\u5931\u8d25&#xff1b;<\/li>\n<li>50.0 \u00d7 20 \u8f6e&#xff1a;\u6210\u529f\u7387\u5141\u8bb8\u843d\u5728 20%&#xff5e;80% \u7684\u968f\u673a\u6ce2\u52a8\u533a\u95f4\u3002<\/li>\n<\/ul>\n<p>\u5224\u65ad\u6210\u8d25\u65f6\u540c\u65f6\u68c0\u67e5\u6267\u884c\u9519\u8bef\u4e0e\u6d88\u606f\u5185\u5bb9\u4e2d\u662f\u5426\u542b &#034;Intermittent failure&#034; \/ &#034;Error:&#034; \u5173\u952e\u5b57\u2014\u2014\u4e0e TypeScript \u7248\u5931\u8d25\u8fd4\u56de\u4f53\u7684 isError: true \u8bed\u4e49\u4e00\u81f4&#xff0c;\u4e5f\u4e0e Go \u7248\u5931\u8d25\u6d88\u606f\u683c\u5f0f\u517c\u5bb9\u3002<\/p>\n<h4>5.4 \u9a8c\u8bc1\u7578\u5f62 JSON \u4e0d\u5d29\u6e83&#xff08;return_malformed_json&#xff09;<\/h4>\n<p>TestErrorHandling_STDIO_MalformedJSON \u8c03\u7528 ErrorTestServer-return_malformed_json&#xff0c;\u660e\u786e&#034;\u8981\u4e48\u4f5c\u4e3a\u9519\u8bef\u8fd4\u56de&#xff0c;\u8981\u4e48\u4f5c\u4e3a\u6587\u672c\u5185\u5bb9\u8fd4\u56de&#xff0c;\u53ea\u8981\u4e0d\u5d29\u6e83\u5373\u53ef&#034;\u2014\u2014\u8fd9\u662f\u5bf9\u7f51\u5173\u5bb9\u9519\u4e0b\u9650\u7684\u76f4\u63a5\u68c0\u9a8c\u3002<\/p>\n<p>\u6b64\u5916&#xff0c;\u8be5\u6d4b\u8bd5\u6587\u4ef6\u7684\u5176\u4f59\u7528\u4f8b&#xff08;\u9519\u8bef\u6d88\u606f\u683c\u5f0f\u3001\u8fde\u7eed\u591a\u6b21\u9519\u8bef\u3001\u542b\u7279\u6b8a\u5b57\u7b26\u4e0e Unicode \u7684\u9519\u8bef\u6d88\u606f&#xff09;\u8fdb\u4e00\u6b65\u5370\u8bc1\u4e86 error-test-server \u5728\u9519\u8bef\u4f20\u64ad\u4e0e\u683c\u5f0f\u5316\u9a8c\u8bc1\u4e2d\u7684\u6838\u5fc3\u5730\u4f4d\u3002<\/p>\n<h3>\u516d\u3001\u5b9e\u6218\u5efa\u8bae&#xff1a;\u628a error-test-server \u7528\u8d77\u6765\u7684\u4e09\u4e2a\u573a\u666f<\/h3>\n<li>\u56de\u5f52\u6d4b\u8bd5\u57fa\u5efa&#xff1a;\u5c06\u5176\u4f5c\u4e3a STDIO \u5ba2\u6237\u7aef\u5e38\u9a7b\u63a5\u5165 Bifrost \u6d4b\u8bd5\u73af\u5883&#xff0c;\u628a return_error \u7684\u4e94\u7c7b\u9519\u8bef\u3001timeout_after \u7684\u8d85\u65f6\u3001intermittent_fail \u7684\u968f\u673a\u5931\u8d25\u56fa\u5316\u6210\u81ea\u52a8\u5316\u7528\u4f8b&#xff08;\u53c2\u8003\u4e0a\u8ff0\u6d4b\u8bd5\u6587\u4ef6\u7684\u7ec4\u7ec7\u65b9\u5f0f&#xff09;&#xff0c;\u4fdd\u8bc1\u7f51\u5173\u5347\u7ea7\u4e0d\u56de\u5f52\u5bb9\u9519\u80fd\u529b\u3002<\/li>\n<li>\u5bb9\u91cf\u4e0e\u8fb9\u754c\u63a2\u6d4b&#xff1a;\u7528 large_payload&#xff08;TypeScript&#xff09;\u6216 memory_intensive&#xff08;Go&#xff09;\u903c\u8fd1\u54cd\u5e94\u4f53\u4e0e\u5185\u5b58\u4e0a\u9650&#xff0c;\u63d0\u524d\u66b4\u9732\u5927\u5c0f\u9650\u5236\u3001OOM \u4e0e GC \u538b\u529b\u95ee\u9898&#xff1b;\u7528 malformed_json \/ partial_response \/ invalid_content_type \u9a8c\u8bc1\u4e0b\u6e38\u89e3\u6790\u5c42\u7684\u5065\u58ee\u6027\u3002<\/li>\n<li>\u6545\u969c\u6f14\u7ec3&#xff1a;\u5728\u6a21\u62df\u6545\u969c\u65f6&#xff0c;\u6ce8\u610f\u5de5\u5177\u9519\u8bef\u6709\u4e24\u79cd\u51fa\u53e3&#xff08;\u6267\u884c\u9519\u8bef vs. \u6d88\u606f\u5185\u5bb9&#xff09;&#xff0c;\u65ad\u8a00\u65f6\u8981\u4e24\u8005\u517c\u987e&#xff1b;Go \u7248 timeout_after \u7684 context \u611f\u77e5\u7761\u7720\u80fd\u987a\u5e26\u9a8c\u8bc1&#034;\u7f51\u5173\u8d85\u65f6\u662f\u5426\u771f\u6b63\u4f20\u9012\u7ed9\u4e86\u4e0a\u6e38\u5b50\u8fdb\u7a0b&#034;\u3002<\/li>\n<h3>\u4e03\u3001\u76f8\u5173\u8d44\u6e90<\/h3>\n<ul>\n<li>\u793a\u4f8b\u672c\u4f53&#xff1a;examples\/mcps\/error-test-server\/&#xff08;README\u3001src\/index.ts\u3001main.go\u3001package.json\u3001go.mod&#xff09;<\/li>\n<li>\u96c6\u6210\u6d4b\u8bd5&#xff1a;\u6838\u5fc3\u65ad\u8a00\u96c6\u4e2d\u5728 core\/internal\/mcptests\/error_handling_protocol_test.go&#xff0c;STDIO \u5ba2\u6237\u7aef\u5939\u5177\u89c1 core\/internal\/mcptests\/fixtures.go<\/li>\n<li>\u7f51\u5173\u4fa7\u6587\u6863&#xff1a;STDIO \u8fde\u63a5\u914d\u7f6e\u89c1 docs\/mcp\/connecting-to-servers.mdx&#xff0c;\u5de5\u5177\u6267\u884c\u4e0e\u9519\u8bef\u5904\u7406\u89c1 docs\/mcp\/tool-execution.mdx<\/li>\n<\/ul>\n<p>error-test-server \u7684\u4ef7\u503c\u4e0d\u5728\u4e8e&#034;\u5b83\u672c\u8eab\u6709\u591a\u590d\u6742&#034;&#xff0c;\u800c\u5728\u4e8e\u5b83\u4e3a MCP \u9519\u8bef\u5904\u7406\u63d0\u4f9b\u4e86\u4e00\u5f20\u53ef\u7cbe\u786e\u7f16\u6392\u7684\u6545\u969c\u6e05\u5355&#xff1a;\u60f3\u6d4b\u4ec0\u4e48\u9519&#xff0c;\u5c31\u8c03\u5bf9\u5e94\u7684\u5de5\u5177&#xff1b;\u60f3\u65ad\u8a00\u4ec0\u4e48\u884c\u4e3a&#xff0c;\u5c31\u6309\u7b2c\u56db\u8282\u3001\u7b2c\u4e94\u8282\u7684\u6a21\u5f0f\u7ec4\u7ec7\u8c03\u7528\u4e0e\u6821\u9a8c\u3002\u628a\u8fd9\u5f20\u6e05\u5355\u56fa\u5316\u8fdb\u6d4b\u8bd5\u5957\u4ef6&#xff0c;MCP \u96c6\u6210\u7684\u5bb9\u9519\u8d28\u91cf\u5c31\u6709\u4e86\u53ef\u91cd\u590d\u7684\u5ea6\u91cf\u57fa\u51c6\u3002<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" class=\"gcb-icon-like\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260929161642-6abbe46ab775d.svg\" alt=\"\" width=\"16\" height=\"16\" \/> <span class=\"gcb-like-text\">\u8d5e<\/span>  <\/p>\n<p>   <span class=\"gcb-share-text\">\u5206\u4eab<\/span>  <\/p>\n<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><\/li>\n<li><span class=\"gcb-tag\">LLM \u7f51\u5173<\/span><\/li>\n<li><span class=\"gcb-tag\">API\u7f51\u5173<\/span><\/li>\n<li><span class=\"gcb-tag\">\u540e\u7aef<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011bifrost<\/h3>\n<p class=\"gcb-project-desc\">Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000&#043; models support &amp; &lt;100 \u00b5s overhead at 5k RPS.<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/bifrost31\/bifrost<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<h4 class=\"gcb-related-title\">\u76f8\u5173\u63a8\u8350<\/h4>\n<ul class=\"gcb-related-list\">\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">Bifrost \u4ed3\u5e93\u5b9e\u6218&#xff1a;\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\u6307\u5357<\/h5>\n<p class=\"gcb-related-item-desc\">Bifrost \u4ed3\u5e93\u5b9e\u6218&#xff1a;\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go test server \u7684\u5b8c\u6574\u6307\u5357 \u5bfc\u8bfb examples\/mcps\/go test ser<\/p>\n<p>     <span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><br \/>\n     <span class=\"gcb-tag\">LLM \u7f51\u5173<\/span><br \/>\n     <span class=\"gcb-tag\">API\u7f51\u5173<\/span><br \/>\n     <span class=\"gcb-tag\">\u540e\u7aef<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">\u6784\u5efa Bifrost MCP \u96c6\u6210\u6d4b\u8bd5\u7684\u6807\u51c6 STDIO \u6d4b\u8bd5\u670d\u52a1\u5668&#xff1a;test-tools-server \u6df1\u5165\u89e3\u6790<\/h5>\n<p class=\"gcb-related-item-desc\">\u6784\u5efa Bifrost MCP \u96c6\u6210\u6d4b\u8bd5\u7684\u6807\u51c6 STDIO \u6d4b\u8bd5\u670d\u52a1\u5668&#xff1a;test tools server \u6df1\u5165\u89e3\u6790 \u672c\u7bc7\u6280\u672f\u6307\u5357\u56f4\u7ed5 Bifrost \u5f00\u6e90\u4ed3\u5e93\u4e2d<\/p>\n<p>     <span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><br \/>\n     <span class=\"gcb-tag\">LLM \u7f51\u5173<\/span><br \/>\n     <span class=\"gcb-tag\">API\u7f51\u5173<\/span><br \/>\n     <span class=\"gcb-tag\">\u540e\u7aef<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">CC Switch \u4f9b\u5e94\u5546\u5207\u6362\u603b\u5361\u58f3&#xff1f;\u4ece\u6253\u4e0d\u5f00\u5230\u9891\u7e41\u6389\u7ebf&#xff0c;\u8fd9\u4efd\u5b8c\u6574\u6392\u67e5\u624b\u518c\u5e2e\u4f60\u5728\u51e0\u5206\u949f\u5185\u5b9a\u4f4d\u539f\u56e0<\/h5>\n<p class=\"gcb-related-item-desc\">CC Switch \u4f9b\u5e94\u5546\u5207\u6362\u603b\u5361\u58f3&#xff1f;\u4ece\u6253\u4e0d\u5f00\u5230\u9891\u7e41\u6389\u7ebf&#xff0c;\u8fd9\u4efd\u5b8c\u6574\u6392\u67e5\u624b\u518c\u5e2e\u4f60\u5728\u51e0\u5206\u949f\u5185\u5b9a\u4f4d\u539f\u56e0 CC Switch \u662f\u4e00\u6b3e\u5e2e\u4f60\u7edf\u4e00\u7ba1\u7406 Claude Code<\/p>\n<p>     <span class=\"gcb-tag\">AI \u5e94\u7528<\/span><br \/>\n     <span class=\"gcb-tag\">\u5f00\u53d1\u8005\u5de5\u5177<\/span><br \/>\n     <span class=\"gcb-tag\">\u684c\u9762\u5e94\u7528<\/span>\n      <\/li>\n<\/ul>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0a\u4e00\u7bc7&#xff1a;<\/span><br \/>\n  zkdash\u96c6\u7fa4\u7ba1\u7406\u6559\u7a0b&#xff1a;\u8f7b\u677e\u76d1\u63a7\u4e0e\u7ef4\u62a4Zookeeper\u96c6\u7fa4 <\/p>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0b\u4e00\u7bc7&#xff1a;<\/span><br \/>\n  \u4e3a\u4ec0\u4e48\u9009\u62e9QB-Core&#xff1f;FiveM\u6700\u53d7\u6b22\u8fceRP\u6846\u67b6\u7684\u4f18\u52bf\u5206\u6790 <\/p>\n<p>\u521b\u4f5c\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u5185\u5bb9\u7531AI\u8f85\u52a9\u751f\u6210\uff08AIGC\uff09\uff0c\u4ec5\u4f9b\u53c2\u8003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eba\u5de5\u667a\u80fdLLM \u7f51\u5173API\u7f51\u5173\u540e\u7aef \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011bifrost Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000 models support &amp; &lt;100 \u00b5s overhead at 5k RPS. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/b<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-110961","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \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\/110961.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4eba\u5de5\u667a\u80fdLLM \u7f51\u5173API\u7f51\u5173\u540e\u7aef \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011bifrost Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000 models support &amp; &lt;100 \u00b5s overhead at 5k RPS. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/110961.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-29T16:16:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260929161642-6abbe46ab775d.svg\" \/>\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=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/110961.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/110961.html\",\"name\":\"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-29T16:16:44+00:00\",\"dateModified\":\"2026-09-29T16:16:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/110961.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/110961.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/110961.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357\"}]},{\"@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":"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \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\/110961.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4eba\u5de5\u667a\u80fdLLM \u7f51\u5173API\u7f51\u5173\u540e\u7aef \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011bifrost Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000 models support &amp; &lt;100 \u00b5s overhead at 5k RPS. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/b","og_url":"https:\/\/www.wsisp.com\/helps\/110961.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-29T16:16:44+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260929161642-6abbe46ab775d.svg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/110961.html","url":"https:\/\/www.wsisp.com\/helps\/110961.html","name":"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-29T16:16:44+00:00","dateModified":"2026-09-29T16:16:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/110961.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/110961.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/110961.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7528 Bifrost error-test-server \u7cfb\u7edf\u6027\u6f14\u7ec3 MCP \u9519\u8bef\u5904\u7406\uff1aSTDIO \u6545\u969c\u6ce8\u5165\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b9e\u6218\u6307\u5357"}]},{"@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\/110961","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=110961"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/110961\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=110961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=110961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=110961"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=110961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}