{"id":111238,"date":"2026-09-30T18:09:00","date_gmt":"2026-09-30T10:09:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/111238.html"},"modified":"2026-09-30T18:09:00","modified_gmt":"2026-09-30T10:09:00","slug":"bifrost-%e4%bb%93%e5%ba%93%e5%ae%9e%e6%88%98%ef%bc%9a%e7%94%a8-go-%e6%9e%84%e5%bb%ba-mcp-%e6%b5%8b%e8%af%95%e6%9c%8d%e5%8a%a1%e5%99%a8-go-test-server-%e7%9a%84%e5%ae%8c%e6%95%b4%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/111238.html","title":{"rendered":"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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<h3>\u5bfc\u8bfb<\/h3>\n<p>examples\/mcps\/go-test-server \u662f Bifrost \u5f00\u6e90\u4ed3\u5e93\u4e2d\u4e00\u4e2a\u7528 Go \u8bed\u8a00\u7f16\u5199\u7684 MCP&#xff08;Model Context Protocol&#xff09;\u6d4b\u8bd5\u670d\u52a1\u5668\u793a\u4f8b&#xff0c;\u5b83\u5bf9\u5916\u66b4\u9732 6 \u4e2a\u7eaf\u51fd\u6570\u5f0f\u5de5\u5177&#xff1a;\u5b57\u7b26\u4e32\u53d8\u6362\u3001JSON \u6821\u9a8c\u3001UUID \u751f\u6210\u3001\u54c8\u5e0c\u8ba1\u7b97\u4e0e\u7f16\u89e3\u7801\u3002\u672c\u6587\u4ee5\u8be5\u793a\u4f8b\u4e3a\u9aa8\u67b6&#xff0c;\u6df1\u5165\u8bb2\u89e3\u5b83\u7684\u5de5\u5177\u6ce8\u518c\u3001\u53c2\u6570\u5b9a\u4e49\u3001\u7f16\u8bd1\u8fd0\u884c\u65b9\u5f0f&#xff0c;\u5e76\u7ed3\u5408 Bifrost \u7684 MCP \u6d4b\u8bd5\u6846\u67b6&#xff08;core\/internal\/mcptests&#xff09;\u8bf4\u660e\u5b83\u5982\u4f55\u88ab\u771f\u5b9e\u63a5\u5165\u7f51\u5173\u6d4b\u8bd5\u94fe\u8def&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u7406\u89e3\u300c\u5982\u4f55\u4e3a MCP \u7f51\u5173\u7f16\u5199\u4e00\u4e2a\u53ef\u590d\u7528\u7684 STDIO \u6d4b\u8bd5\u670d\u52a1\u5668\u300d\u8fd9\u4e00\u5b9e\u6218\u4e3b\u9898\u3002<\/p>\n<h3>\u4e00\u3001go-test-server \u662f\u4ec0\u4e48&#xff1a;\u4e00\u4e2a\u4e3a\u7f51\u5173\u6d4b\u8bd5\u800c\u751f\u7684 STDIO MCP Server<\/h3>\n<p>go-test-server \u4f4d\u4e8e\u4ed3\u5e93\u7684 examples\/mcps\/go-test-server \u76ee\u5f55\u4e0b&#xff0c;\u662f\u4e00\u4e2a\u72ec\u7acb\u7684 Go module&#xff08;\u6a21\u5757\u540d github.com\/maximhq\/bifrost\/examples\/mcps\/go-test-server&#xff0c;\u8be6\u89c1 go.mod&#xff09;\u3002\u5b83\u7684\u5b9a\u4f4d\u975e\u5e38\u660e\u786e&#xff1a;\u4e0d\u662f\u751f\u4ea7\u7ea7\u4e1a\u52a1\u670d\u52a1\u5668&#xff0c;\u800c\u662f\u4e3a Bifrost \u7684 MCP \u6d4b\u8bd5\u4f53\u7cfb\u63d0\u4f9b\u7a33\u5b9a\u3001\u53ef\u9884\u6d4b\u7684 STDIO \u5de5\u5177\u63d0\u4f9b\u65b9\u3002<\/p>\n<p>\u4ece main.go \u7684\u5165\u53e3\u53ef\u4ee5\u770b\u5230\u5b83\u7684\u6280\u672f\u9009\u578b\u4e0e\u542f\u52a8\u65b9\u5f0f&#xff1a;<\/p>\n<p>s :&#061; server.NewMCPServer(<br \/>\n    &#034;go-test-server&#034;,<br \/>\n    &#034;1.0.0&#034;,<br \/>\n    server.WithToolCapabilities(true),<br \/>\n)<\/p>\n<p>\/\/ Register all tools<br \/>\nregisterStringTransformTool(s)<br \/>\nregisterJSONValidateTool(s)<br \/>\nregisterUUIDGenerateTool(s)<br \/>\nregisterHashTool(s)<br \/>\nregisterEncodeTool(s)<br \/>\nregisterDecodeTool(s)<\/p>\n<p>\/\/ Start STDIO server<br \/>\nif err :&#061; server.ServeStdio(s); err !&#061; nil {<br \/>\n    fmt.Fprintf(os.Stderr, &#034;Server error: %v\\\\n&#034;, err)<br \/>\n    os.Exit(1)<br \/>\n}<\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u4f53\u73b0\u4e86\u4e24\u4e2a\u5173\u952e\u4e8b\u5b9e&#xff1a;<\/p>\n<li>\u5b83\u57fa\u4e8e github.com\/mark3labs\/mcp-go \u5e93\u6784\u5efa&#xff08;\u7248\u672c v0.43.2&#xff0c;\u89c1 go.mod&#xff09;&#xff0c;\u8c03\u7528 server.NewMCPServer \u521b\u5efa\u540d\u4e3a go-test-server\u3001\u7248\u672c 1.0.0 \u7684 MCP \u670d\u52a1\u5668&#xff0c;\u5e76\u901a\u8fc7 server.WithToolCapabilities(true) \u58f0\u660e\u652f\u6301\u5de5\u5177\u80fd\u529b\u534f\u5546\u3002<\/li>\n<li>\u5b83\u901a\u8fc7 server.ServeStdio(s) \u4ee5 STDIO \u4f20\u8f93\u534f\u8bae\u542f\u52a8\u2014\u2014\u5373\u901a\u8fc7\u6807\u51c6\u8f93\u5165\/\u8f93\u51fa\u4e0e\u5bbf\u4e3b\u8fdb\u7a0b\u901a\u4fe1&#xff0c;\u8fd9\u6b63\u662f Bifrost \u6d4b\u8bd5\u6846\u67b6\u4e2d\u300c\u5916\u90e8 MCP \u5ba2\u6237\u7aef\u300d\u7684\u6807\u51c6\u63a5\u5165\u5f62\u6001&#xff08;\u5bf9\u5e94 schemas.MCPConnectionTypeSTDIO&#xff09;\u3002<\/li>\n<p>\u4ece\u6e90\u7801\u7ed3\u6784\u770b&#xff0c;\u8fd9\u79cd\u300c\u72ec\u7acb\u4e8c\u8fdb\u5236 &#043; STDIO \u534f\u8bae\u300d\u7684\u8bbe\u8ba1\u8ba9\u6d4b\u8bd5\u670d\u52a1\u5668\u53ef\u4ee5\u88ab Bifrost \u7f51\u5173\u50cf\u771f\u5b9e\u7b2c\u4e09\u65b9 MCP \u670d\u52a1\u5668\u4e00\u6837\u62c9\u8d77\u3001\u63e1\u624b\u3001\u53d1\u73b0\u5de5\u5177\u5e76\u8c03\u7528&#xff0c;\u4ece\u800c\u5b8c\u6574\u8986\u76d6\u771f\u5b9e\u63a5\u5165\u94fe\u8def&#xff0c;\u800c\u4e0d\u662f\u5728\u8fdb\u7a0b\u5185\u6a21\u62df\u3002<\/p>\n<h3>\u4e8c\u3001\u516d\u4e2a\u5de5\u5177\u9010\u4e00\u62c6\u89e3&#xff1a;\u53c2\u6570\u5951\u7ea6\u3001\u5b9e\u73b0\u4e0e\u8fd4\u56de\u683c\u5f0f<\/h3>\n<p>go-test-server \u7684\u5168\u90e8\u5de5\u5177\u90fd\u4ee5\u300c\u6ce8\u518c&#xff08;\u6ce8\u518c\u51fd\u6570\u58f0\u660e\u5de5\u5177 Schema&#xff09;&#043; \u5904\u7406&#xff08;\u56de\u8c03\u51fd\u6570\u5b9e\u73b0\u4e1a\u52a1\u903b\u8f91&#xff09;\u300d\u4e24\u6bb5\u5f0f\u7ec4\u7ec7\u3002\u6240\u6709\u5de5\u5177\u5728\u56de\u8c03\u4e2d\u7edf\u4e00\u91c7\u7528\u300crequest.GetArguments() \u53d6\u53c2 \u2192 JSON \u5e8f\u5217\u5316\u5230\u672c\u5730 struct \u2192 \u6821\u9a8c \u2192 \u8ba1\u7b97 \u2192 mcp.NewToolResultText \u8fd4\u56de\u300d\u7684\u8303\u5f0f&#xff0c;\u5e76\u4e14\u53c2\u6570\u5747\u901a\u8fc7 mcp.Required() \u6807\u8bb0\u4e3a\u5fc5\u586b\u3001\u901a\u8fc7 mcp.Enum(&#8230;) \u9650\u5b9a\u53d6\u503c\u8303\u56f4&#xff0c;\u8fd9\u4e0e README \u4e2d\u300crequired &#043; \u679a\u4e3e\u300d\u7684\u6587\u6863\u63cf\u8ff0\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<h4>1. string_transform&#xff1a;\u5b57\u7b26\u4e32\u53d8\u6362<\/h4>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u5bf9\u8f93\u5165\u5b57\u7b26\u4e32\u6267\u884c\u5927\u5c0f\u5199\u8f6c\u6362\u3001\u53cd\u8f6c\u3001\u6807\u9898\u5316\u3002<\/li>\n<li>\u53c2\u6570&#xff1a; | \u53c2\u6570 | \u7c7b\u578b | \u5fc5\u586b | \u53d6\u503c\u8303\u56f4\/\u8bf4\u660e | |&#8212;|&#8212;|&#8212;|&#8212;| | input | string | \u662f | \u5f85\u53d8\u6362\u7684\u5b57\u7b26\u4e32 | | operation | string | \u662f | uppercase \/ lowercase \/ reverse \/ title |<\/li>\n<li>\u5b9e\u73b0\u8981\u70b9&#xff08;\u89c1 main.go \u7684 registerStringTransformTool&#xff09;&#xff1a;uppercase\/lowercase \u76f4\u63a5\u4f7f\u7528 strings.ToUpper\/strings.ToLower&#xff1b;reverse \u6309 []rune \u9010\u5b57\u7b26\u53cd\u8f6c&#xff0c;\u907f\u514d\u591a\u5b57\u8282 UTF-8 \u5b57\u7b26\u88ab\u6309\u5b57\u8282\u622a\u65ad&#xff1b;title \u5219\u5148 strings.ToLower \u518d strings.Title \u5b9e\u73b0\u9996\u5b57\u6bcd\u5927\u5199\u3002\u672a\u77e5 operation \u8fd4\u56de Unknown operation: xxx \u7684\u5de5\u5177\u9519\u8bef\u3002<\/li>\n<\/ul>\n<p>\u8bf7\u6c42 \/ \u54cd\u5e94\u793a\u4f8b&#xff1a;<\/p>\n<p>\/\/ \u8bf7\u6c42<br \/>\n{ &#034;input&#034;: &#034;hello world&#034;, &#034;operation&#034;: &#034;uppercase&#034; }<br \/>\n\/\/ \u54cd\u5e94<br \/>\n{ &#034;input&#034;: &#034;hello world&#034;, &#034;operation&#034;: &#034;uppercase&#034;, &#034;result&#034;: &#034;HELLO WORLD&#034; }<\/p>\n<h4>2. json_validate&#xff1a;JSON \u5408\u6cd5\u6027\u6821\u9a8c<\/h4>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u5224\u65ad\u8f93\u5165\u5b57\u7b26\u4e32\u662f\u5426\u4e3a\u5408\u6cd5 JSON\u3002<\/li>\n<li>\u53c2\u6570&#xff1a; | \u53c2\u6570 | \u7c7b\u578b | \u5fc5\u586b | \u8bf4\u660e | |&#8212;|&#8212;|&#8212;|&#8212;| | json_string | string | \u662f | \u5f85\u6821\u9a8c\u7684 JSON \u5b57\u7b26\u4e32 |<\/li>\n<li>\u5b9e\u73b0\u8981\u70b9&#xff1a;\u5bf9 json_string \u6267\u884c json.Unmarshal \u5230 interface{}\u3002\u5408\u6cd5\u65f6\u8fd4\u56de {&#034;valid&#034;: true, &#034;parsed&#034;: &lt;\u89e3\u6790\u540e\u7684\u5bf9\u8c61&gt;}&#xff1b;\u975e\u6cd5\u65f6\u8fd4\u56de {&#034;valid&#034;: false, &#034;error&#034;: &lt;\u89e3\u6790\u9519\u8bef\u4fe1\u606f&gt;}\u3002<\/li>\n<\/ul>\n<p>\/\/ \u8bf7\u6c42<br \/>\n{ &#034;json_string&#034;: &#034;{\\\\&#034;name\\\\&#034;: \\\\&#034;test\\\\&#034;}&#034; }<br \/>\n\/\/ \u54cd\u5e94<br \/>\n{ &#034;valid&#034;: true, &#034;parsed&#034;: {&#034;name&#034;: &#034;test&#034;} }<\/p>\n<h4>3. uuid_generate&#xff1a;\u751f\u6210 UUID v4<\/h4>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u751f\u6210\u968f\u673a UUID v4\u3002<\/li>\n<li>\u53c2\u6570&#xff1a;\u65e0\u3002<\/li>\n<li>\u5b9e\u73b0\u8981\u70b9&#xff1a;\u8c03\u7528 github.com\/google\/uuid&#xff08;v1.6.0&#xff09;\u7684 uuid.New()&#xff0c;\u8fd4\u56de {&#034;uuid&#034;: &#034;&lt;uuid&gt;&#034;}\u3002\u56e0\u4e3a\u5b83\u4e0d\u9700\u8981\u4efb\u4f55\u53c2\u6570&#xff0c;\u6240\u4ee5\u6ce8\u518c\u65f6 mcp.NewTool(&#034;uuid_generate&#034;, mcp.WithDescription(&#8230;)) \u65e0\u9700\u58f0\u660e\u4efb\u4f55\u53c2\u6570 Schema\u2014\u2014\u8fd9\u4e5f\u662f\u6d4b\u8bd5\u300c\u96f6\u53c2\u6570\u5de5\u5177\u300d\u8c03\u7528\u94fe\u8def\u7684\u7406\u60f3\u5bf9\u8c61\u3002<\/li>\n<\/ul>\n<p>\/\/ \u54cd\u5e94<br \/>\n{ &#034;uuid&#034;: &#034;550e8400-e29b-41d4-a716-446655440000&#034; }<\/p>\n<h4>4. hash&#xff1a;\u54c8\u5e0c\u8ba1\u7b97<\/h4>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u6309\u6307\u5b9a\u7b97\u6cd5\u8ba1\u7b97\u8f93\u5165\u5b57\u7b26\u4e32\u7684\u54c8\u5e0c\u3002<\/li>\n<li>\u53c2\u6570&#xff1a; | \u53c2\u6570 | \u7c7b\u578b | \u5fc5\u586b | \u53d6\u503c\u8303\u56f4\/\u8bf4\u660e | |&#8212;|&#8212;|&#8212;|&#8212;| | input | string | \u662f | \u5f85\u54c8\u5e0c\u5b57\u7b26\u4e32 | | algorithm | string | \u662f | md5 \/ sha256 \/ sha512 |<\/li>\n<li>\u5b9e\u73b0\u8981\u70b9&#xff1a;\u5206\u522b\u8c03\u7528 crypto\/md5\u3001crypto\/sha256\u3001crypto\/sha512 \u8ba1\u7b97\u6458\u8981&#xff0c;\u518d\u7ecf hex.EncodeToString \u8f93\u51fa\u5341\u516d\u8fdb\u5236\u5c0f\u5199\u5b57\u7b26\u4e32\u3002README \u4e2d\u7ed9\u51fa\u7684\u793a\u4f8b\u54c8\u5e0c\u503c 2cf24dba&#8230;b9824 \u5373 &#034;hello&#034; \u7684 SHA-256 \u6458\u8981&#xff0c;\u53ef\u4f5c\u4e3a\u624b\u5de5\u9a8c\u8bc1\u5b9e\u73b0\u7684\u57fa\u51c6\u503c\u3002<\/li>\n<\/ul>\n<p>\/\/ \u8bf7\u6c42<br \/>\n{ &#034;input&#034;: &#034;hello&#034;, &#034;algorithm&#034;: &#034;sha256&#034; }<br \/>\n\/\/ \u54cd\u5e94<br \/>\n{ &#034;input&#034;: &#034;hello&#034;, &#034;algorithm&#034;: &#034;sha256&#034;,<br \/>\n  &#034;hash&#034;: &#034;2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824&#034; }<\/p>\n<h4>5. encode&#xff1a;\u7f16\u7801<\/h4>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u6309\u6307\u5b9a\u7f16\u7801\u65b9\u5f0f\u5bf9\u8f93\u5165\u5b57\u7b26\u4e32\u7f16\u7801\u3002<\/li>\n<li>\u53c2\u6570&#xff1a; | \u53c2\u6570 | \u7c7b\u578b | \u5fc5\u586b | \u53d6\u503c\u8303\u56f4\/\u8bf4\u660e | |&#8212;|&#8212;|&#8212;|&#8212;| | input | string | \u662f | \u5f85\u7f16\u7801\u5b57\u7b26\u4e32 | | encoding | string | \u662f | base64 \/ hex \/ url |<\/li>\n<li>\u5b9e\u73b0\u8981\u70b9&#xff1a;base64 \u7528 base64.StdEncoding.EncodeToString&#xff1b;hex \u7528 hex.EncodeToString&#xff1b;url \u7528 url.QueryEscape&#xff08;Query \u98ce\u683c URL \u7f16\u7801&#xff09;\u3002<\/li>\n<\/ul>\n<p>\/\/ \u8bf7\u6c42<br \/>\n{ &#034;input&#034;: &#034;hello world&#034;, &#034;encoding&#034;: &#034;base64&#034; }<br \/>\n\/\/ \u54cd\u5e94<br \/>\n{ &#034;input&#034;: &#034;hello world&#034;, &#034;encoding&#034;: &#034;base64&#034;, &#034;encoded&#034;: &#034;aGVsbG8gd29ybGQ&#061;&#034; }<\/p>\n<h4>6. decode&#xff1a;\u89e3\u7801<\/h4>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u89e3\u7801\u5df2\u7f16\u7801\u5b57\u7b26\u4e32&#xff0c;\u662f encode \u7684\u9006\u64cd\u4f5c\u3002<\/li>\n<li>\u53c2\u6570&#xff1a; | \u53c2\u6570 | \u7c7b\u578b | \u5fc5\u586b | \u53d6\u503c\u8303\u56f4\/\u8bf4\u660e | |&#8212;|&#8212;|&#8212;|&#8212;| | input | string | \u662f | \u5df2\u7f16\u7801\u7684\u5b57\u7b26\u4e32 | | encoding | string | \u662f | base64 \/ hex \/ url |<\/li>\n<li>\u5b9e\u73b0\u8981\u70b9&#xff1a;base64 \u7528 base64.StdEncoding.DecodeString&#xff0c;hex \u7528 hex.DecodeString&#xff0c;url \u7528 url.QueryUnescape\u3002\u4e0e encode \u4e0d\u540c&#xff0c;decode \u662f\u5931\u8d25\u654f\u611f\u7684&#xff1a;\u89e3\u7801\u51fa\u9519&#xff08;\u5982\u975e\u6cd5 base64\/hex \u5b57\u7b26&#xff09;\u65f6\u76f4\u63a5\u8fd4\u56de Decode error: &lt;err&gt; \u5de5\u5177\u9519\u8bef&#xff0c;\u800c\u4e0d\u4f1a\u8fd4\u56de\u7a7a\u7ed3\u679c\u2014\u2014\u8fd9\u4e00\u70b9\u5728\u6d4b\u8bd5\u300c\u5de5\u5177\u8fd4\u56de\u9519\u8bef\u300d\u573a\u666f\u65f6\u975e\u5e38\u6709\u7528\u3002<\/li>\n<\/ul>\n<p>\/\/ \u8bf7\u6c42<br \/>\n{ &#034;input&#034;: &#034;aGVsbG8gd29ybGQ&#061;&#034;, &#034;encoding&#034;: &#034;base64&#034; }<br \/>\n\/\/ \u54cd\u5e94<br \/>\n{ &#034;input&#034;: &#034;aGVsbG8gd29ybGQ&#061;&#034;, &#034;encoding&#034;: &#034;base64&#034;, &#034;decoded&#034;: &#034;hello world&#034; }<\/p>\n<p>\u5c0f\u7ed3&#xff1a;\u8fd9 6 \u4e2a\u5de5\u5177\u8986\u76d6\u4e86\u5b57\u7b26\u4e32\u5904\u7406\u3001\u6570\u636e\u6821\u9a8c\u3001\u968f\u673a\u6570\u3001\u6458\u8981\u8ba1\u7b97\u3001\u7f16\u89e3\u7801\u4e94\u7c7b\u5e38\u89c1\u7eaf\u51fd\u6570\u64cd\u4f5c&#xff0c;\u8fd4\u56de\u503c\u5168\u90e8\u4ee5 JSON \u6587\u672c\u5f62\u5f0f\u901a\u8fc7 mcp.NewToolResultText \u8fd4\u56de&#xff0c;\u65b9\u4fbf\u6d4b\u8bd5\u65ad\u8a00\u76f4\u63a5\u5339\u914d JSON \u5b50\u4e32\u3002<\/p>\n<h3>\u4e09\u3001\u6784\u5efa\u4e0e\u8fd0\u884c&#xff1a;\u4ece\u6e90\u7801\u5230\u53ef\u6267\u884c\u4e8c\u8fdb\u5236<\/h3>\n<h4>1. \u624b\u52a8\u6784\u5efa\u4e0e\u8fd0\u884c<\/h4>\n<p>\u5728 examples\/mcps\/go-test-server \u76ee\u5f55\u5185\u6267\u884c&#xff1a;<\/p>\n<p># \u6784\u5efa&#xff08;\u8f93\u51fa\u4e8c\u8fdb\u5236\u5230 bin\/ \u76ee\u5f55&#xff09;<br \/>\ngo build -o bin\/go-test-server<\/p>\n<p># \u8fd0\u884c&#xff08;\u4ee5 STDIO \u6a21\u5f0f\u542f\u52a8&#xff0c;\u7b49\u5f85\u5bbf\u4e3b\u8fdb\u7a0b\u901a\u8fc7 stdin\/stdout \u4ea4\u4e92&#xff09;<br \/>\n.\/bin\/go-test-server<\/p>\n<p>\u6ce8\u610f\u4e8b\u9879&#xff1a;<\/p>\n<ul>\n<li>\u8be5\u6a21\u5757\u58f0\u660e go 1.27.0&#xff08;\u89c1 go.mod&#xff09;&#xff0c;\u6784\u5efa\u524d\u9700\u786e\u8ba4 Go \u5de5\u5177\u94fe\u7248\u672c\u6ee1\u8db3\u8981\u6c42&#xff1b;\u5efa\u8bae\u5728\u6a21\u5757\u76ee\u5f55\u5185\u6784\u5efa&#xff08;\u6a21\u5757\u72ec\u7acb&#xff0c;\u4e0d\u4f9d\u8d56 Bifrost \u4e3b go.mod&#xff09;\u3002<\/li>\n<li>\u4e8c\u8fdb\u5236\u9ed8\u8ba4\u901a\u8fc7 server.ServeStdio \u542f\u52a8&#xff0c;\u4e0d\u4f1a\u6709\u4efb\u4f55 HTTP \u7aef\u53e3&#xff0c;\u76f4\u63a5\u4ee5\u547d\u4ee4\u884c\u8fdb\u7a0b\u5f62\u5f0f\u5e38\u9a7b\u7b49\u5f85 MCP \u534f\u8bae\u6d88\u606f&#xff0c;\u56e0\u6b64\u4e0d\u80fd\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee\u3002<\/li>\n<\/ul>\n<h4>2. \u901a\u8fc7 Makefile \u4e00\u952e\u6784\u5efa&#xff08;\u63a8\u8350&#xff09;<\/h4>\n<p>Bifrost \u4ed3\u5e93\u6839\u76ee\u5f55\u7684 Makefile \u63d0\u4f9b\u4e86\u7edf\u4e00\u7684 MCP \u6d4b\u8bd5\u670d\u52a1\u5668\u6784\u5efa\u76ee\u6807 setup-mcp-tests&#xff0c;\u5b83\u4f1a\u904d\u5386 examples\/mcps\/*\/ \u4e0b\u7684\u6240\u6709\u76ee\u5f55&#xff0c;\u5bf9\u542b go.mod \u7684\u76ee\u5f55\u6267\u884c GOWORK&#061;off go build -o bin\/&lt;\u76ee\u5f55\u540d&gt; .&#xff0c;\u5bf9\u542b package.json \u7684\u76ee\u5f55\u6267\u884c npm install &amp;&amp; npm run build&#xff1a;<\/p>\n<p>make setup-mcp-tests<\/p>\n<p>\u6267\u884c\u540e go-test-server \u7684\u4e8c\u8fdb\u5236\u4f1a\u88ab\u7edf\u4e00\u8f93\u51fa\u5230 examples\/mcps\/go-test-server\/bin\/go-test-server&#xff0c;\u8fd9\u6b63\u662f Bifrost \u6d4b\u8bd5\u6846\u67b6\u5f15\u7528\u7684\u9ed8\u8ba4\u8def\u5f84&#xff08;\u89c1\u4e0b\u6587&#xff09;\u3002<\/p>\n<h3>\u56db\u3001\u5728 Bifrost \u6d4b\u8bd5\u6846\u67b6\u4e2d\u63a5\u5165 go-test-server<\/h3>\n<p>go-test-server \u7684\u4ef7\u503c\u6838\u5fc3\u5728\u4e8e\u5b83\u662f Bifrost \u7f51\u5173 MCP \u6d4b\u8bd5\u4f53\u7cfb\u7684\u6807\u51c6\u300c\u5916\u90e8 STDIO \u5ba2\u6237\u7aef\u300d\u5939\u5177\u3002\u4ee5\u4e0b\u5185\u5bb9\u5747\u53ef\u4ece core\/internal\/mcptests \u7684\u6e90\u7801\u5f97\u5230\u5370\u8bc1\u3002<\/p>\n<h4>1. \u5ba2\u6237\u7aef\u914d\u7f6e\u7ed3\u6784&#xff1a;STDIO \u63a5\u5165\u7684\u5b8c\u6574\u5951\u7ea6<\/h4>\n<p>README \u672b\u5c3e\u7ed9\u51fa\u7684\u63a5\u5165\u793a\u4f8b\u5bf9\u5e94 Bifrost \u7684 schemas.MCPClientConfig\u3002\u6d4b\u8bd5\u6846\u67b6\u4e2d\u7684\u771f\u5b9e\u5b9e\u73b0\u4f4d\u4e8e fixtures.go \u7684 GetGoTestServerConfig&#xff1a;<\/p>\n<p>return schemas.MCPClientConfig{<br \/>\n    ID:             &#034;go-test-server&#034;,<br \/>\n    Name:           &#034;GoTestServer&#034;,<br \/>\n    ConnectionType: schemas.MCPConnectionTypeSTDIO,<br \/>\n    StdioConfig: &amp;schemas.MCPStdioConfig{<br \/>\n        Command: serverPath,   \/\/ \u6307\u5411 examples\/mcps\/go-test-server\/bin\/go-test-server<br \/>\n        Args:    []string{},<br \/>\n    },<br \/>\n    ToolsToExecute:     []string{&#034;*&#034;},<br \/>\n    ToolsToAutoExecute: []string{},<br \/>\n    IsCodeModeClient:   true, \/\/ CodeMode enabled for testing<br \/>\n}<\/p>\n<p>\u5404\u5b57\u6bb5\u542b\u4e49\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>ID&#xff1a;\u7f51\u5173\u5185\u90e8\u552f\u4e00\u6807\u8bc6&#xff0c;\u7528\u4e8e\u6d4b\u8bd5\u4e2d\u6309\u5ba2\u6237\u7aef\u8fc7\u6ee4\/\u914d\u7f6e&#xff1b;<\/li>\n<li>Name&#xff1a;\u5de5\u5177\u547d\u540d\u524d\u7f00\u7684\u6765\u6e90\u3002\u6839\u636e agent_test_helpers.go \u4e2d CreateSTDIOToolCall \u7684\u6ce8\u91ca&#xff0c;STDIO \u5de5\u5177\u7684\u5b9e\u9645\u5168\u540d\u683c\u5f0f\u4e3a {Name}-{tool_name}&#xff0c;\u5373 GoTestServer-uuid_generate\u3001GoTestServer-hash \u7b49&#xff1b;<\/li>\n<li>ConnectionType&#xff1a;MCPConnectionTypeSTDIO&#xff0c;\u58f0\u660e\u8be5\u5ba2\u6237\u7aef\u901a\u8fc7\u6807\u51c6\u8f93\u5165\u8f93\u51fa\u8fde\u63a5&#xff1b;<\/li>\n<li>StdioConfig.Command&#xff1a;\u6307\u5411\u6784\u5efa\u51fa\u7684\u4e8c\u8fdb\u5236\u8def\u5f84&#xff1b;fixtures.go \u4e2d mcpServerPaths.GoTestServer \u88ab\u521d\u59cb\u5316\u4e3a examples\/mcps\/go-test-server\/bin\/go-test-server&#xff1b;<\/li>\n<li>ToolsToExecute&#xff1a;&#034;*&#034; \u8868\u793a\u8be5\u5ba2\u6237\u7aef\u6240\u6709\u5de5\u5177\u90fd\u53ef\u88ab\u6267\u884c&#xff1b;<\/li>\n<li>ToolsToAutoExecute&#xff1a;\u7a7a\u6570\u7ec4\u8868\u793a\u9ed8\u8ba4\u4e0d\u81ea\u52a8\u6267\u884c&#xff08;\u5de5\u5177\u4ecd\u9700\u8981 LLM \u51b3\u7b56\u540e\u8c03\u7528&#xff09;&#xff1b;<\/li>\n<li>IsCodeModeClient&#xff1a;\u6807\u8bb0\u4e3a CodeMode \u5ba2\u6237\u7aef&#xff0c;\u7528\u4e8e\u6d4b\u8bd5 Bifrost \u7684 CodeMode \u5de5\u5177\u6267\u884c\u8def\u5f84\u3002<\/li>\n<\/ul>\n<h4>2. \u6d4b\u8bd5\u6846\u67b6\u4e2d\u7684\u4e24\u79cd\u63a5\u5165\u65b9\u5f0f<\/h4>\n<ul>\n<li>\u58f0\u660e\u5f0f\u63a5\u5165&#xff1a;\u6d4b\u8bd5\u901a\u8fc7 AgentTestConfig{ STDIOClients: []string{&#034;go-test-server&#034;} } \u58f0\u660e\u9700\u8981\u63a5\u5165\u7684 STDIO \u5ba2\u6237\u7aef&#xff0c;SetupAgentTest&#xff08;agent_test_helpers.go&#xff09;\u4f1a\u636e\u6b64\u81ea\u52a8\u8c03\u7528 GetGoTestServerConfig \u751f\u6210\u914d\u7f6e\u5e76\u6ce8\u518c\u5230 MCPManager\u3002\u652f\u6301\u591a\u5ba2\u6237\u7aef\u5e76\u5b58&#xff0c;\u4f8b\u5982 STDIOClients: []string{&#034;go-test-server&#034;, &#034;parallel-test-server&#034;}\u3002<\/li>\n<li>\u8def\u5f84\u521d\u59cb\u5316&#xff1a;InitMCPServerPaths&#xff08;fixtures.go&#xff09;\u5728\u6d4b\u8bd5\u524d\u7edf\u4e00\u521d\u59cb\u5316\u5404 MCP \u670d\u52a1\u5668\u4e8c\u8fdb\u5236\u8def\u5f84&#xff0c;\u5e76\u5728 stdio_respawn_test.go \u7b49\u6d4b\u8bd5\u4e2d\u5148\u68c0\u67e5\u4e8c\u8fdb\u5236\u662f\u5426\u5b58\u5728&#xff08;\u4e0d\u5b58\u5728\u5219 t.Skipf \u5e76\u63d0\u793a\u5148\u6267\u884c make setup-mcp-tests&#xff09;\u3002<\/li>\n<\/ul>\n<h4>3. go-test-server \u652f\u6491\u4e86\u54ea\u4e9b\u6d4b\u8bd5\u573a\u666f<\/h4>\n<p>\u4ece core\/internal\/mcptests \u7684\u5f15\u7528\u60c5\u51b5\u53ef\u4ee5\u5f52\u7eb3\u51fa\u5b83\u7684\u5178\u578b\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u5de5\u5177\u8fc7\u6ee4\u4e0e\u6743\u9650\u6d4b\u8bd5&#xff08;tool_filtering_test.go\u3001agent_mixed_permissions_test.go&#xff09;&#xff1a;\u901a\u8fc7\u914d\u7f6e ToolsToAutoExecute\u3001ToolsToExecute \u53ca\u4e0a\u4e0b\u6587\u8fc7\u6ee4&#xff0c;\u9a8c\u8bc1\u54ea\u4e9b\u5de5\u5177\u5141\u8bb8 LLM \u53ef\u89c1\u3001\u54ea\u4e9b\u5141\u8bb8\u81ea\u52a8\u6267\u884c\u3002\u4f8b\u5982\u628a go-test-server \u8bbe\u4e3a\u5168\u81ea\u52a8\u6267\u884c\u3001\u6216\u4ec5\u81ea\u52a8\u6267\u884c uuid_generate&#xff08;\u7528\u57fa\u7840\u5de5\u5177\u540d&#xff0c;\u800c\u975e\u5e26\u524d\u7f00\u5168\u540d&#xff09;\u3002<\/li>\n<li>\u4e0a\u4e0b\u6587\u8fc7\u6ee4\u6d4b\u8bd5&#xff08;agent_context_filtering_test.go&#xff09;&#xff1a;\u901a\u8fc7 MCPContextKeyIncludeClients\/MCPContextKeyIncludeTools \u5728\u4e0a\u4e0b\u6587\u4e2d\u9650\u5b9a\u53ef\u89c1\u5ba2\u6237\u7aef\/\u5de5\u5177&#xff0c;\u9a8c\u8bc1\u672a\u88ab\u767d\u540d\u5355\u5305\u542b\u7684 go-test-server \u5de5\u5177\u4e0d\u4f1a\u88ab\u8c03\u7528\u3002<\/li>\n<li>\u591a\u8fde\u63a5\u4e0e Agent \u7f16\u6392\u6d4b\u8bd5&#xff08;agent_multiconnection_test.go\u3001agent_adapter_test.go&#xff09;&#xff1a;\u5c06 go-test-server \u4e0e\u5176\u4ed6\u670d\u52a1\u5668\u7ec4\u5408&#xff0c;\u9a8c\u8bc1 Agent \u6a21\u5f0f&#xff08;CheckAndExecuteAgentForChatRequest&#xff09;\u7684\u591a\u8f6e\u5de5\u5177\u8c03\u7528\u3001\u5e76\u884c\u5de5\u5177\u8c03\u7528\u4e0e\u6700\u5927\u6df1\u5ea6\u9650\u5236\u3002<\/li>\n<li>CodeMode \u6d4b\u8bd5&#xff08;codemode_stdio_test.go&#xff09;&#xff1a;\u9a8c\u8bc1 go-test-server \u4ee5 IsCodeModeClient \u65b9\u5f0f\u63a5\u5165 CodeMode \u6267\u884c\u94fe\u8def\u3002<\/li>\n<li>\u8fdb\u7a0b\u91cd\u751f&#xff08;respawn&#xff09;\u6d4b\u8bd5&#xff08;stdio_respawn_test.go&#xff09;&#xff1a;\u9a8c\u8bc1 STDIO \u5b50\u8fdb\u7a0b\u5f02\u5e38\u9000\u51fa\u540e\u7684\u62c9\u8d77\u4e0e\u91cd\u8fde\u903b\u8f91\u3002<\/li>\n<\/ul>\n<h4>4. \u8fd0\u884c MCP \u6d4b\u8bd5<\/h4>\n<p>Bifrost \u4ed3\u5e93\u4e3a MCP \u6d4b\u8bd5\u63d0\u4f9b\u4e86\u5b8c\u6574\u5165\u53e3&#xff08;\u89c1 Makefile \u7684 test-mcp \u76ee\u6807&#xff09;&#xff1a;<\/p>\n<p># \u4e00\u952e\u6267\u884c&#xff1a;\u5148\u6784\u5efa\u6240\u6709 examples\/mcps \u6d4b\u8bd5\u670d\u52a1\u5668&#xff0c;\u518d\u8fd0\u884c core\/internal\/mcptests \u4e0b\u7684\u6d4b\u8bd5<br \/>\nmake test-mcp<\/p>\n<p>\u8be5\u76ee\u6807\u652f\u6301\u53ef\u9009\u53d8\u91cf TYPE&#xff08;\u5982 connection&#xff09;\u3001TESTCASE&#xff08;\u7cbe\u786e\u5339\u914d\u6d4b\u8bd5\u540d&#xff09;\u4e0e PATTERN&#xff08;\u5b50\u4e32\u5339\u914d&#xff09;&#xff0c;\u4e8c\u8005\u4e92\u65a5\u3002\u4f8b\u5982\u6309\u5b50\u4e32\u8fc7\u6ee4\u8fd0\u884c&#xff1a;<\/p>\n<p>make test-mcp PATTERN&#061;Respawn<\/p>\n<h3>\u4e94\u3001\u6df1\u5165&#xff1a;\u4ece go-test-server \u770b Bifrost \u7684 MCP \u6d4b\u8bd5\u8bbe\u8ba1\u54f2\u5b66<\/h3>\n<ul>\n<li>\u5916\u90e8\u8fdb\u7a0b &gt; \u8fdb\u7a0b\u5185\u6a21\u62df&#xff1a;go-test-server \u662f\u72ec\u7acb\u4e8c\u8fdb\u5236\u800c\u975e\u5e93\u5185\u6869\u5b9e\u73b0&#xff0c;Bifrost \u7f51\u5173\u5fc5\u987b\u4ee5\u771f\u5b9e MCP \u63e1\u624b\u6d41\u7a0b&#xff08;initialize \u2192 tools\/list \u2192 tools\/call&#xff09;\u4e0e\u5b83\u4ea4\u4e92\u3002\u4ece\u6e90\u7801\u7ed3\u6784\u770b&#xff0c;\u8fd9\u80fd\u66b4\u9732\u771f\u5b9e STDIO \u573a\u666f\u4e0b\u7684\u8fdb\u7a0b\u62c9\u8d77\u3001\u534f\u8bae\u5e27\u89e3\u6790\u3001\u9519\u8bef\u6062\u590d\u7b49\u95ee\u9898&#xff0c;\u6d4b\u8bd5\u53ef\u4fe1\u5ea6\u8fdc\u9ad8\u4e8e mock\u3002<\/li>\n<li>\u5de5\u5177\u96c6\u523b\u610f\u7b80\u5355\u3001\u884c\u4e3a\u786e\u5b9a&#xff1a;6 \u4e2a\u5de5\u5177\u5747\u4e3a\u65e0\u5916\u90e8\u4f9d\u8d56\u7684\u7eaf\u51fd\u6570&#xff0c;\u8f93\u51fa\u53ef\u7cbe\u786e\u9884\u671f&#xff08;\u5982\u56fa\u5b9a\u7684 SHA-256 \u57fa\u51c6\u503c&#xff09;&#xff0c;\u8fd9\u4f7f\u5f97\u6d4b\u8bd5\u65ad\u8a00\u53ef\u4ee5\u7cbe\u786e\u5230\u8fd4\u56de JSON \u7684\u5177\u4f53\u5b57\u6bb5\u503c&#xff0c;\u9002\u5408\u4f5c\u4e3a\u5de5\u5177\u8c03\u7528\u3001\u81ea\u52a8\u6267\u884c\u3001\u8fc7\u6ee4\u3001\u5e76\u884c\u7b49\u590d\u6742\u884c\u4e3a\u7684\u300c\u63a7\u5236\u53d8\u91cf\u300d\u3002<\/li>\n<li>\u591a\u670d\u52a1\u5668\u534f\u540c&#xff1a;examples\/mcps \u76ee\u5f55\u4e0b\u8fd8\u6709 parallel-test-server&#xff08;\u5e76\u884c\u8c03\u7528&#xff09;\u3001edge-case-server&#xff08;Unicode\/\u5927\u8f7d\u8377\/\u7a7a\u503c\u7b49\u8fb9\u754c\u8f93\u5165&#xff09;\u3001error-test-server&#xff08;\u9519\u8bef\u8def\u5f84&#xff09;\u3001temperature&#xff08;TypeScript \u5b9e\u73b0&#xff09;\u7b49\u4e92\u8865\u670d\u52a1\u5668&#xff0c;\u914d\u5408 go-test-server \u53ef\u8986\u76d6\u534f\u8bae\u529f\u80fd\u3001\u6027\u80fd\u3001\u9519\u8bef\u4e0e\u8fb9\u754c\u56db\u7c7b\u6d4b\u8bd5\u573a\u666f\u3002<\/li>\n<\/ul>\n<h3>\u516d\u3001\u6269\u5c55\u5b9e\u8df5&#xff1a;\u5982\u4f55\u4eff\u5199\u4e00\u4e2a\u81ea\u5df1\u7684\u6d4b\u8bd5\u670d\u52a1\u5668<\/h3>\n<p>\u57fa\u4e8e go-test-server \u7684\u8303\u5f0f&#xff0c;\u7f16\u5199\u4e00\u4e2a\u81ea\u5b9a\u4e49\u6d4b\u8bd5 MCP \u670d\u52a1\u5668\u53ea\u9700\u56db\u6b65&#xff1a;<\/p>\n<li>\u521d\u59cb\u5316\u6a21\u5757\u4e0e\u4f9d\u8d56&#xff1a;\u521b\u5efa\u76ee\u5f55\u5e76\u6267\u884c go mod init &lt;module&gt;&#xff0c;\u5f15\u5165 github.com\/mark3labs\/mcp-go&#xff08;\u5982\u9700 UUID \u80fd\u529b\u53ef\u540c\u65f6\u5f15\u5165 github.com\/google\/uuid&#xff09;&#xff0c;\u53c2\u7167 go.mod \u7ba1\u7406\u4f9d\u8d56\u3002<\/li>\n<li>\u521b\u5efa\u670d\u52a1\u5668&#xff1a;server.NewMCPServer(name, version, server.WithToolCapabilities(true))\u3002<\/li>\n<li>\u6ce8\u518c\u5de5\u5177&#xff1a;\u7528 mcp.NewTool(name, mcp.WithDescription(&#8230;), mcp.WithString(&#034;arg&#034;, mcp.Required(), mcp.Enum(&#8230;))) \u58f0\u660e Schema&#xff1b;\u5728 s.AddTool(tool, handler) \u7684 handler \u4e2d\u6309\u300cGetArguments \u2192 \u53cd\u5e8f\u5217\u5316 \u2192 \u8ba1\u7b97 \u2192 NewToolResultText\/NewToolResultError\u300d\u5b9e\u73b0\u903b\u8f91\u3002<\/li>\n<li>\u542f\u52a8\u5e76\u6784\u5efa&#xff1a;server.ServeStdio(s) \u542f\u52a8&#xff1b;go build -o bin\/&lt;name&gt; \u6784\u5efa&#xff1b;\u5982\u9700\u63a5\u5165 Bifrost \u6d4b\u8bd5\u4f53\u7cfb&#xff0c;\u628a\u4e8c\u8fdb\u5236\u8def\u5f84\u914d\u7f6e\u8fdb schemas.MCPClientConfig&#xff08;ConnectionType: MCPConnectionTypeSTDIO&#xff09;\u5e76\u5728 STDIOClients \u4e2d\u767b\u8bb0\u3002<\/li>\n<h3>\u7ed3\u8bed<\/h3>\n<p>go-test-server \u867d\u7136\u53ea\u6709\u7ea6 380 \u884c Go \u4ee3\u7801&#xff0c;\u5374\u662f\u7406\u89e3 Bifrost \u7f51\u5173\u5982\u4f55\u5bf9\u63a5\u5916\u90e8 MCP \u670d\u52a1\u5668\u7684\u4e00\u628a\u94a5\u5319&#xff1a;\u5b83\u540c\u65f6\u627f\u62c5\u4e86\u300c\u534f\u8bae\u89c4\u8303\u53c2\u8003\u5b9e\u73b0\u300d\u4e0e\u300c\u6d4b\u8bd5\u5939\u5177\u300d\u53cc\u91cd\u89d2\u8272\u3002\u5e0c\u671b\u8bfb\u8005\u901a\u8fc7\u672c\u6587\u65e2\u80fd\u72ec\u7acb\u8dd1\u901a\u8fd9\u4e2a\u793a\u4f8b&#xff0c;\u4e5f\u80fd\u628a\u5b83\u4f5c\u4e3a\u6a21\u677f&#xff0c;\u4e3a\u81ea\u5df1\u7684 MCP \u7f51\u5173\u6d4b\u8bd5\u4f53\u7cfb\u7f16\u5199\u5b9a\u5236\u5316\u3001\u53ef\u9884\u671f\u7684\u6d4b\u8bd5\u670d\u52a1\u5668\u3002<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" class=\"gcb-icon-like\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260930100858-6abcdfba87d53.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\">\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\">CloudCLI UI \u5982\u4f55\u7ed9 Claude \u4f1a\u8bdd\u8bbe\u7f6e\u5b9a\u65f6\u53d1\u9001\u7684\u6d88\u606f\u5e76\u786e\u8ba4\u5b83\u6309\u65f6\u89e6\u53d1<\/h5>\n<p class=\"gcb-related-item-desc\">CloudCLI UI \u5982\u4f55\u7ed9 Claude \u4f1a\u8bdd\u8bbe\u7f6e\u5b9a\u65f6\u53d1\u9001\u7684\u6d88\u606f\u5e76\u786e\u8ba4\u5b83\u6309\u65f6\u89e6\u53d1 \u573a\u666f\u662f&#xff1a;\u4f60\u5df2\u7ecf\u6709\u4e00\u4e2a CloudCLI&#xff08;Claude Code UI&#xff09;\u91cc\u7684<\/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\">CopilotKit \u4ed3\u5e93\u5b9e\u6218&#xff1a;\u7528 mcp-use \u6784\u5efa\u5b8c\u6574 MCP \u670d\u52a1\u5668\u2014\u2014Tool\u3001Resource \u4e0e Prompt \u670d\u52a1\u7aef\u5b9e\u73b0\u6307\u5357<\/h5>\n<p class=\"gcb-related-item-desc\">CopilotKit \u4ed3\u5e93\u5b9e\u6218&#xff1a;\u7528 mcp use \u6784\u5efa\u5b8c\u6574 MCP \u670d\u52a1\u5668\u2014\u2014Tool\u3001Resource \u4e0e Prompt \u670d\u52a1\u7aef\u5b9e\u73b0\u6307\u5357 \u5bfc\u8bfb \u672c\u6587\u4ee5\u5f00\u6e90\u4ed3<\/p>\n<p>     <span class=\"gcb-tag\">\u684c\u9762\u5e94\u7528<\/span><br \/>\n     <span class=\"gcb-tag\">\u97f3\u89c6\u9891<\/span>\n      <\/li>\n<\/ul>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0a\u4e00\u7bc7&#xff1a;<\/span><br \/>\n   Univer\u529e\u516c\u5957\u4ef6\u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96f6\u5f00\u59cb\u6784\u5efa\u4f01\u4e1a\u7ea7\u534f\u4f5c\u5e73\u53f0 <\/p>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0b\u4e00\u7bc7&#xff1a;<\/span><br \/>\n   \u5fae\u4fe1\u5c0f\u7a0b\u5e8fWXAPKG\u89e3\u538b\u5de5\u5177unwxapkg\u4f7f\u7528\u6307\u5357 <\/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-111238","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>Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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\/111238.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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\/111238.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-30T10:09:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260930100858-6abcdfba87d53.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\/111238.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/111238.html\",\"name\":\"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-30T10:09:00+00:00\",\"dateModified\":\"2026-09-30T10:09:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/111238.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/111238.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/111238.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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":"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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\/111238.html","og_locale":"zh_CN","og_type":"article","og_title":"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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\/111238.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-30T10:09:00+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260930100858-6abcdfba87d53.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\/111238.html","url":"https:\/\/www.wsisp.com\/helps\/111238.html","name":"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-30T10:09:00+00:00","dateModified":"2026-09-30T10:09:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/111238.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/111238.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/111238.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Bifrost \u4ed3\u5e93\u5b9e\u6218\uff1a\u7528 Go \u6784\u5efa MCP \u6d4b\u8bd5\u670d\u52a1\u5668 go-test-server \u7684\u5b8c\u6574\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\/111238","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=111238"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/111238\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=111238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=111238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=111238"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=111238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}