[{"data":1,"prerenderedAt":1388,"buildId":1389},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Fguides\u002Fserver":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":1387,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-mcp\u002Fguides\u002Fserver.md",{},"Run an MCP server",{"type":8,"value":9,"toc":1366},"minimark",[10,14,566,570,575,676,694,697,705,709,715,980,984,999,1029,1033,1043,1221,1234,1238,1241,1257,1260,1293,1299,1341,1355,1359],[11,12,13],"p",{},"Generate an MCP server from your OpenAPI spec, start it, and connect Claude Code or Claude Desktop to its tools.",[15,16,18,23,43,332,350,354,357,408,412,415,428,435,439,449,548],"steps",{"level":17},"2",[19,20,22],"h2",{"id":21},"generate-the-server","Generate the server",[11,24,25,26,30,31,34,35,38,39,42],{},"Register ",[27,28,29],"code",{},"pluginTs",", ",[27,32,33],{},"pluginZod",", and one client plugin next to ",[27,36,37],{},"pluginMcp",", then run ",[27,40,41],{},"kubb generate",". When only one client plugin is registered, Kubb detects it.",[44,45,50],"pre",{"language":46,"filename":47,"code":48,"class":49},"typescript","kubb.config.ts","import { defineConfig } from 'kubb\u002Fconfig'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\nimport { pluginZod } from '@kubb\u002Fplugin-zod'\nimport { pluginAxios } from '@kubb\u002Fplugin-axios'\nimport { pluginMcp } from '@kubb\u002Fplugin-mcp'\n\nexport default defineConfig({\n input: '.\u002FpetStore.yaml',\n output: { path: '.\u002Fsrc\u002Fgen' },\n plugins: [\n pluginTs({ output: { path: 'types', mode: 'directory' } }),\n pluginZod(),\n pluginAxios({ baseURL: 'https:\u002F\u002Fpetstore.swagger.io\u002Fv2' }),\n pluginMcp({ output: { path: 'mcp', mode: 'directory' } }),\n ],\n})","highlights",[27,51,53,80,81,80,97,80,113,80,129,80,145,80,147,80,162,80,179,80,203,80,215,80,253,80,264,80,286,80,319,80,328],{"class":52},"language-typescript",[54,55,58,62,66,70,73,76],"span",{"class":56,"style":57},"line","display: inline",[54,59,61],{"style":60},"color:#d73a49;--hls-dark:#f97583","import ",[54,63,65],{"style":64},"color:#005cc5;--hls-dark:#79b8ff","{ ",[54,67,69],{"style":68},"color:#24292e;--hls-dark:#e1e4e8","defineConfig ",[54,71,72],{"style":64},"} ",[54,74,75],{"style":60},"from ",[54,77,79],{"style":78},"color:#032f62;--hls-dark:#9ecbff","'kubb\u002Fconfig'","\n",[54,82,83,85,87,90,92,94],{"class":56,"style":57},[54,84,61],{"style":60},[54,86,65],{"style":64},[54,88,89],{"style":68},"pluginTs ",[54,91,72],{"style":64},[54,93,75],{"style":60},[54,95,96],{"style":78},"'@kubb\u002Fplugin-ts'",[54,98,99,101,103,106,108,110],{"class":56,"style":57},[54,100,61],{"style":60},[54,102,65],{"style":64},[54,104,105],{"style":68},"pluginZod ",[54,107,72],{"style":64},[54,109,75],{"style":60},[54,111,112],{"style":78},"'@kubb\u002Fplugin-zod'",[54,114,115,117,119,122,124,126],{"class":56,"style":57},[54,116,61],{"style":60},[54,118,65],{"style":64},[54,120,121],{"style":68},"pluginAxios ",[54,123,72],{"style":64},[54,125,75],{"style":60},[54,127,128],{"style":78},"'@kubb\u002Fplugin-axios'",[54,130,131,133,135,138,140,142],{"class":56,"style":57},[54,132,61],{"style":60},[54,134,65],{"style":64},[54,136,137],{"style":68},"pluginMcp ",[54,139,72],{"style":64},[54,141,75],{"style":60},[54,143,144],{"style":78},"'@kubb\u002Fplugin-mcp'",[54,146],{"class":56,"style":57},[54,148,149,152,155,159],{"class":56,"style":57},[54,150,151],{"style":60},"export ",[54,153,154],{"style":60},"default ",[54,156,158],{"style":157},"color:#6f42c1;--hls-dark:#b392f0","defineConfig",[54,160,161],{"style":64},"({",[54,163,164,167,170,173,176],{"class":56,"style":57},[54,165,166],{"style":64}," ",[54,168,169],{"style":64},"input",[54,171,172],{"style":60},": ",[54,174,175],{"style":78},"'.\u002FpetStore.yaml'",[54,177,178],{"style":60},",",[54,180,181,183,186,188,190,193,195,198,201],{"class":56,"style":57},[54,182,166],{"style":60},[54,184,185],{"style":64},"output",[54,187,172],{"style":60},[54,189,65],{"style":64},[54,191,192],{"style":64},"path",[54,194,172],{"style":60},[54,196,197],{"style":78},"'.\u002Fsrc\u002Fgen' ",[54,199,200],{"style":64},"}",[54,202,178],{"style":60},[54,204,205,207,210,212],{"class":56,"style":57},[54,206,166],{"style":60},[54,208,209],{"style":64},"plugins",[54,211,172],{"style":60},[54,213,214],{"style":64},"[",[54,216,217,220,222,225,227,229,231,233,235,238,240,243,245,248,251],{"class":56,"style":57},[54,218,219],{"style":64}," ",[54,221,29],{"style":157},[54,223,224],{"style":64},"({ ",[54,226,185],{"style":64},[54,228,172],{"style":60},[54,230,65],{"style":64},[54,232,192],{"style":64},[54,234,172],{"style":60},[54,236,237],{"style":78},"'types'",[54,239,30],{"style":60},[54,241,242],{"style":64},"mode",[54,244,172],{"style":60},[54,246,247],{"style":78},"'directory' ",[54,249,250],{"style":64},"} })",[54,252,178],{"style":60},[54,254,255,257,259,262],{"class":56,"style":57},[54,256,219],{"style":60},[54,258,33],{"style":157},[54,260,261],{"style":64},"()",[54,263,178],{"style":60},[54,265,266,268,271,273,276,278,281,284],{"class":56,"style":57},[54,267,219],{"style":60},[54,269,270],{"style":157},"pluginAxios",[54,272,224],{"style":64},[54,274,275],{"style":64},"baseURL",[54,277,172],{"style":60},[54,279,280],{"style":78},"'https:\u002F\u002Fpetstore.swagger.io\u002Fv2' ",[54,282,283],{"style":64},"})",[54,285,178],{"style":60},[54,287,288,290,292,294,296,298,300,302,304,307,309,311,313,315,317],{"class":56,"style":57},[54,289,219],{"style":60},[54,291,37],{"style":157},[54,293,224],{"style":64},[54,295,185],{"style":64},[54,297,172],{"style":60},[54,299,65],{"style":64},[54,301,192],{"style":64},[54,303,172],{"style":60},[54,305,306],{"style":78},"'mcp'",[54,308,30],{"style":60},[54,310,242],{"style":64},[54,312,172],{"style":60},[54,314,247],{"style":78},[54,316,250],{"style":64},[54,318,178],{"style":60},[54,320,321,323,326],{"class":56,"style":57},[54,322,166],{"style":60},[54,324,325],{"style":64},"]",[54,327,178],{"style":60},[54,329,330],{"class":56,"style":57},[54,331,283],{"style":64},[11,333,334,335,30,338,341,342,345,346,349],{},"The plugin writes one handler per operation, plus ",[27,336,337],{},"server.ts",[27,339,340],{},"start.ts",", and ",[27,343,344],{},".mcp.json"," in ",[27,347,348],{},"src\u002Fgen\u002Fmcp\u002F",".",[19,351,353],{"id":352},"install-the-runtime","Install the runtime",[11,355,356],{},"Install the runtime dependencies and a TypeScript runner:",[44,358,362],{"language":359,"filename":360,"code":361,"class":49},"shell","Terminal","npm install @modelcontextprotocol\u002Fserver@^2 zod@^4.2 axios@^1.20.0\nnpm install -D tsx",[27,363,365,80,401],{"class":364},"language-shell",[54,366,367,370,373,376,379,382,385,388,390,393,396,398],{"class":56,"style":57},[54,368,369],{"style":157},"npm ",[54,371,372],{"style":68},"install ",[54,374,375],{"style":68},"@",[54,377,378],{"style":68},"modelcontextprotocol\u002Fserver",[54,380,381],{"style":68},"@^",[54,383,384],{"style":64},"2 ",[54,386,387],{"style":68},"zod",[54,389,381],{"style":68},[54,391,392],{"style":64},"4.2 ",[54,394,395],{"style":68},"axios",[54,397,381],{"style":68},[54,399,400],{"style":64},"1.20.0",[54,402,403,405],{"class":56,"style":57},[54,404,369],{"style":157},[54,406,407],{"style":68},"install -D tsx",[19,409,411],{"id":410},"start-the-server","Start the server",[11,413,414],{},"Run the generated entry from the project root:",[44,416,418],{"language":359,"filename":360,"code":417,"class":49},"npx tsx src\u002Fgen\u002Fmcp\u002Fstart.ts",[27,419,420],{"class":364},[54,421,422,425],{"class":56,"style":57},[54,423,424],{"style":157},"npx ",[54,426,427],{"style":68},"tsx src\u002Fgen\u002Fmcp\u002Fstart.ts",[11,429,430,431,434],{},"The server reads MCP messages from stdin, prints nothing on startup, and logs transport errors to stderr. Press ",[27,432,433],{},"Ctrl+C"," to stop it. You do not need to keep it running, because an MCP client starts it.",[19,436,438],{"id":437},"connect-claude-code","Connect Claude Code",[11,440,441,442,444,445,448],{},"Claude Code reads ",[27,443,344],{}," from the project root. Copy the ",[27,446,447],{},"mcpServers"," entry from the generated file into it.",[44,450,454],{"language":451,"filename":452,"code":453,"class":49},"json","src\u002Fgen\u002Fmcp\u002F.mcp.json","{\n \"mcpServers\": {\n \"Swagger Petstore\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"tsx\", \".\u002Fsrc\u002Fgen\u002Fmcp\u002Fstart.ts\"]\n }\n }\n}",[27,455,457,80,462,80,473,80,484,80,499,80,513,80,534,80,539,80,544],{"class":456},"language-json",[54,458,459],{"class":56,"style":57},[54,460,461],{"style":64},"{",[54,463,464,466,469,471],{"class":56,"style":57},[54,465,166],{"style":64},[54,467,468],{"style":64},"\"mcpServers\"",[54,470,172],{"style":60},[54,472,461],{"style":64},[54,474,475,477,480,482],{"class":56,"style":57},[54,476,219],{"style":64},[54,478,479],{"style":64},"\"Swagger Petstore\"",[54,481,172],{"style":60},[54,483,461],{"style":64},[54,485,486,489,492,494,497],{"class":56,"style":57},[54,487,488],{"style":64}," ",[54,490,491],{"style":64},"\"type\"",[54,493,172],{"style":60},[54,495,496],{"style":78},"\"stdio\"",[54,498,178],{"style":60},[54,500,501,503,506,508,511],{"class":56,"style":57},[54,502,488],{"style":60},[54,504,505],{"style":64},"\"command\"",[54,507,172],{"style":60},[54,509,510],{"style":78},"\"npx\"",[54,512,178],{"style":60},[54,514,515,517,520,522,524,527,529,532],{"class":56,"style":57},[54,516,488],{"style":60},[54,518,519],{"style":64},"\"args\"",[54,521,172],{"style":60},[54,523,214],{"style":64},[54,525,526],{"style":78},"\"tsx\"",[54,528,30],{"style":60},[54,530,531],{"style":78},"\".\u002Fsrc\u002Fgen\u002Fmcp\u002Fstart.ts\"",[54,533,325],{"style":64},[54,535,536],{"class":56,"style":57},[54,537,538],{"style":64}," }",[54,540,541],{"class":56,"style":57},[54,542,543],{"style":64}," }",[54,545,546],{"class":56,"style":57},[54,547,200],{"style":64},[11,549,550,551,554,555,558,559,562,563,565],{},"The server name comes from ",[27,552,553],{},"info.title"," in your spec. The ",[27,556,557],{},"args"," path is relative to the Kubb ",[27,560,561],{},"root",", not to the ",[27,564,344],{}," folder, because MCP clients start the command from their own working directory.",[19,567,569],{"id":568},"what-the-tools-look-like","What the tools look like",[11,571,572,574],{},[27,573,337],{}," registers one tool per operation:",[576,577,578,591],"table",{},[579,580,581],"thead",{},[582,583,584,588],"tr",{},[585,586,587],"th",{},"Tool field",[585,589,590],{},"Comes from",[592,593,594,627,638,652,660],"tbody",{},[582,595,596,600],{},[597,598,599],"td",{},"Name",[597,601,602,603,606,607,30,610,30,613,30,616,619,620,623,624,626],{},"The ",[27,604,605],{},"operationId",", with each character outside ",[27,608,609],{},"a-z",[27,611,612],{},"A-Z",[27,614,615],{},"0-9",[27,617,618],{},"_"," and ",[27,621,622],{},"-"," replaced by ",[27,625,618],{},", cut at 64 characters",[582,628,629,632],{},[597,630,631],{},"Title",[597,633,634,635],{},"The operation ",[27,636,637],{},"summary",[582,639,640,643],{},[597,641,642],{},"Description",[597,644,634,645,648,649],{},[27,646,647],{},"description",", or one built from the method and path: ",[27,650,651],{},"Make a GET request to \u002Fpets\u002F{petId}",[582,653,654,657],{},[597,655,656],{},"Input",[597,658,659],{},"The Zod schemas of the parameters and the request body",[582,661,662,665],{},[597,663,664],{},"Output",[597,666,667,668,671,672,675],{},"The success body, as ",[27,669,670],{},"{ data: body }"," structured content and as the JSON text of ",[27,673,674],{},"body",". A success with no body gives empty text.",[11,677,678,679,682,683,686,687,690,691,349],{},"MCP clients reject other tool names, so ",[27,680,681],{},"pets.list\u002Fv2"," becomes ",[27,684,685],{},"pets_list_v2",". When two operations end up with the same name, the later one gets a ",[27,688,689],{},"_2"," suffix, then ",[27,692,693],{},"_3",[11,695,696],{},"Each handler forwards the MCP cancellation signal to the client and throws for a non-2xx response, which the assistant sees as a tool error. Operations that stream their response get no tool.",[11,698,699,700,349],{},"See ",[701,702,704],"a",{"href":703},"#tool-calls-and-results","Tool calls and results",[19,706,708],{"id":707},"claude-desktop","Claude Desktop",[11,710,711,712,714],{},"Claude Desktop does not start servers from your project folder, so its entry needs an absolute path to ",[27,713,340],{},". First generate the server and install the runtime, as in the steps above.",[15,716,718,723,741,756,964,969,973],{"level":717},"3",[719,720,722],"h3",{"id":721},"register-the-server","Register the server",[11,724,725,726,729,730,733,734,737,738,349],{},"Open Claude Desktop's ",[27,727,728],{},"Settings → Developer → Edit Config",". This opens ",[27,731,732],{},"claude_desktop_config.json",", on macOS under ",[27,735,736],{},"~\u002FLibrary\u002FApplication Support\u002FClaude\u002F"," and on Windows under ",[27,739,740],{},"%APPDATA%\\Claude\\",[11,742,743,744,746,747,749,750,752,753,755],{},"Copy the entry from ",[27,745,452],{}," into its ",[27,748,447],{}," object, next to any existing servers. Change the ",[27,751,557],{}," path to the absolute path of ",[27,754,340],{},":",[757,758,759,844],"code-group",{},[44,760,763],{"language":451,"filename":761,"code":762,"class":49},"macOS","{\n \"mcpServers\": {\n \"Swagger Petstore\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"tsx\", \"\u002Fabsolute\u002Fpath\u002Fto\u002Fproject\u002Fsrc\u002Fgen\u002Fmcp\u002Fstart.ts\"]\n }\n }\n}",[27,764,765,80,769,80,779,80,789,80,801,80,813,80,832,80,836,80,840],{"class":456},[54,766,767],{"class":56,"style":57},[54,768,461],{"style":64},[54,770,771,773,775,777],{"class":56,"style":57},[54,772,166],{"style":64},[54,774,468],{"style":64},[54,776,172],{"style":60},[54,778,461],{"style":64},[54,780,781,783,785,787],{"class":56,"style":57},[54,782,219],{"style":64},[54,784,479],{"style":64},[54,786,172],{"style":60},[54,788,461],{"style":64},[54,790,791,793,795,797,799],{"class":56,"style":57},[54,792,488],{"style":64},[54,794,491],{"style":64},[54,796,172],{"style":60},[54,798,496],{"style":78},[54,800,178],{"style":60},[54,802,803,805,807,809,811],{"class":56,"style":57},[54,804,488],{"style":60},[54,806,505],{"style":64},[54,808,172],{"style":60},[54,810,510],{"style":78},[54,812,178],{"style":60},[54,814,815,817,819,821,823,825,827,830],{"class":56,"style":57},[54,816,488],{"style":60},[54,818,519],{"style":64},[54,820,172],{"style":60},[54,822,214],{"style":64},[54,824,526],{"style":78},[54,826,30],{"style":60},[54,828,829],{"style":78},"\"\u002Fabsolute\u002Fpath\u002Fto\u002Fproject\u002Fsrc\u002Fgen\u002Fmcp\u002Fstart.ts\"",[54,831,325],{"style":64},[54,833,834],{"class":56,"style":57},[54,835,538],{"style":64},[54,837,838],{"class":56,"style":57},[54,839,543],{"style":64},[54,841,842],{"class":56,"style":57},[54,843,200],{"style":64},[44,845,848],{"language":451,"filename":846,"code":847,"class":49},"Windows","{\n \"mcpServers\": {\n \"Swagger Petstore\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"tsx\", \"C:\\\\path\\\\to\\\\project\\\\src\\\\gen\\\\mcp\\\\start.ts\"]\n }\n }\n}",[27,849,850,80,854,80,864,80,874,80,886,80,898,80,952,80,956,80,960],{"class":456},[54,851,852],{"class":56,"style":57},[54,853,461],{"style":64},[54,855,856,858,860,862],{"class":56,"style":57},[54,857,166],{"style":64},[54,859,468],{"style":64},[54,861,172],{"style":60},[54,863,461],{"style":64},[54,865,866,868,870,872],{"class":56,"style":57},[54,867,219],{"style":64},[54,869,479],{"style":64},[54,871,172],{"style":60},[54,873,461],{"style":64},[54,875,876,878,880,882,884],{"class":56,"style":57},[54,877,488],{"style":64},[54,879,491],{"style":64},[54,881,172],{"style":60},[54,883,496],{"style":78},[54,885,178],{"style":60},[54,887,888,890,892,894,896],{"class":56,"style":57},[54,889,488],{"style":60},[54,891,505],{"style":64},[54,893,172],{"style":60},[54,895,510],{"style":78},[54,897,178],{"style":60},[54,899,900,902,904,906,908,910,912,915,918,920,922,925,927,930,932,935,937,940,942,945,947,950],{"class":56,"style":57},[54,901,488],{"style":60},[54,903,519],{"style":64},[54,905,172],{"style":60},[54,907,214],{"style":64},[54,909,526],{"style":78},[54,911,30],{"style":60},[54,913,914],{"style":78},"\"C:",[54,916,917],{"style":78},"\\\\",[54,919,192],{"style":78},[54,921,917],{"style":78},[54,923,924],{"style":78},"to",[54,926,917],{"style":78},[54,928,929],{"style":78},"project",[54,931,917],{"style":78},[54,933,934],{"style":78},"src",[54,936,917],{"style":78},[54,938,939],{"style":78},"gen",[54,941,917],{"style":78},[54,943,944],{"style":78},"mcp",[54,946,917],{"style":78},[54,948,949],{"style":78},"start.ts\"",[54,951,325],{"style":64},[54,953,954],{"class":56,"style":57},[54,955,538],{"style":64},[54,957,958],{"class":56,"style":57},[54,959,543],{"style":64},[54,961,962],{"class":56,"style":57},[54,963,200],{"style":64},[11,965,966,967,349],{},"In Windows JSON paths, escape each backslash as ",[27,968,917],{},[719,970,972],{"id":971},"use-the-generated-tools","Use the generated tools",[11,974,975,976,979],{},"Quit Claude Desktop completely and reopen it. Open ",[27,977,978],{},"Manage connectors",", select your server, and check that the tools match your operations. Ask Claude to run one operation, and review its request before you approve the API call.",[19,981,983],{"id":982},"use-your-own-entry-file","Use your own entry file",[11,985,986,987,990,991,993,994,996,997,349],{},"To run setup code first, such as loading environment variables, import ",[27,988,989],{},"startServer"," from ",[27,992,337],{}," in your own entry file. Point ",[27,995,557],{}," at that file instead of ",[27,998,340],{},[44,1000,1003],{"language":46,"filename":1001,"code":1002,"class":49},"mcp.ts","import { startServer } from '.\u002Fsrc\u002Fgen\u002Fmcp\u002Fserver'\n\nstartServer()",[27,1004,1005,80,1021,80,1023],{"class":52},[54,1006,1007,1009,1011,1014,1016,1018],{"class":56,"style":57},[54,1008,61],{"style":60},[54,1010,65],{"style":64},[54,1012,1013],{"style":68},"startServer ",[54,1015,72],{"style":64},[54,1017,75],{"style":60},[54,1019,1020],{"style":78},"'.\u002Fsrc\u002Fgen\u002Fmcp\u002Fserver'",[54,1022],{"class":56,"style":57},[54,1024,1025,1027],{"class":56,"style":57},[54,1026,989],{"style":157},[54,1028,261],{"style":64},[19,1030,1032],{"id":1031},"select-a-client","Select a client",[11,1034,1035,1036,1042],{},"When several client plugins are registered, set ",[701,1037,1039],{"href":1038},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Foptions#client",[27,1040,1041],{},"client",". Give each client plugin its own output folder, so their files do not overwrite each other.",[44,1044,1046],{"language":46,"filename":47,"code":1045,"class":49},"import { pluginAxios } from '@kubb\u002Fplugin-axios'\nimport { pluginFetch } from '@kubb\u002Fplugin-fetch'\nimport { pluginMcp } from '@kubb\u002Fplugin-mcp'\n\nconst clients = [\n pluginAxios({ output: { path: 'clients-axios', mode: 'directory' } }),\n pluginFetch({ output: { path: 'clients-fetch', mode: 'directory' } }),\n pluginMcp({ output: { path: 'mcp', mode: 'directory' }, client: 'axios' }),\n]",[27,1047,1048,80,1062,80,1078,80,1092,80,1094,80,1107,80,1140,80,1174,80,1217],{"class":52},[54,1049,1050,1052,1054,1056,1058,1060],{"class":56,"style":57},[54,1051,61],{"style":60},[54,1053,65],{"style":64},[54,1055,121],{"style":68},[54,1057,72],{"style":64},[54,1059,75],{"style":60},[54,1061,128],{"style":78},[54,1063,1064,1066,1068,1071,1073,1075],{"class":56,"style":57},[54,1065,61],{"style":60},[54,1067,65],{"style":64},[54,1069,1070],{"style":68},"pluginFetch ",[54,1072,72],{"style":64},[54,1074,75],{"style":60},[54,1076,1077],{"style":78},"'@kubb\u002Fplugin-fetch'",[54,1079,1080,1082,1084,1086,1088,1090],{"class":56,"style":57},[54,1081,61],{"style":60},[54,1083,65],{"style":64},[54,1085,137],{"style":68},[54,1087,72],{"style":64},[54,1089,75],{"style":60},[54,1091,144],{"style":78},[54,1093],{"class":56,"style":57},[54,1095,1096,1099,1102,1105],{"class":56,"style":57},[54,1097,1098],{"style":60},"const ",[54,1100,1101],{"style":68},"clients ",[54,1103,1104],{"style":60},"= ",[54,1106,214],{"style":64},[54,1108,1109,1111,1113,1115,1117,1119,1121,1123,1125,1128,1130,1132,1134,1136,1138],{"class":56,"style":57},[54,1110,166],{"style":64},[54,1112,270],{"style":157},[54,1114,224],{"style":64},[54,1116,185],{"style":64},[54,1118,172],{"style":60},[54,1120,65],{"style":64},[54,1122,192],{"style":64},[54,1124,172],{"style":60},[54,1126,1127],{"style":78},"'clients-axios'",[54,1129,30],{"style":60},[54,1131,242],{"style":64},[54,1133,172],{"style":60},[54,1135,247],{"style":78},[54,1137,250],{"style":64},[54,1139,178],{"style":60},[54,1141,1142,1144,1147,1149,1151,1153,1155,1157,1159,1162,1164,1166,1168,1170,1172],{"class":56,"style":57},[54,1143,166],{"style":60},[54,1145,1146],{"style":157},"pluginFetch",[54,1148,224],{"style":64},[54,1150,185],{"style":64},[54,1152,172],{"style":60},[54,1154,65],{"style":64},[54,1156,192],{"style":64},[54,1158,172],{"style":60},[54,1160,1161],{"style":78},"'clients-fetch'",[54,1163,30],{"style":60},[54,1165,242],{"style":64},[54,1167,172],{"style":60},[54,1169,247],{"style":78},[54,1171,250],{"style":64},[54,1173,178],{"style":60},[54,1175,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1213,1215],{"class":56,"style":57},[54,1177,166],{"style":60},[54,1179,37],{"style":157},[54,1181,224],{"style":64},[54,1183,185],{"style":64},[54,1185,172],{"style":60},[54,1187,65],{"style":64},[54,1189,192],{"style":64},[54,1191,172],{"style":60},[54,1193,306],{"style":78},[54,1195,30],{"style":60},[54,1197,242],{"style":64},[54,1199,172],{"style":60},[54,1201,247],{"style":78},[54,1203,200],{"style":64},[54,1205,30],{"style":60},[54,1207,1041],{"style":64},[54,1209,172],{"style":60},[54,1211,1212],{"style":78},"'axios' ",[54,1214,283],{"style":64},[54,1216,178],{"style":60},[54,1218,1219],{"class":56,"style":57},[54,1220,325],{"style":64},[11,1222,1223,1224,619,1226,345,1228,1230,1231,349],{},"Add these entries next to ",[27,1225,29],{},[27,1227,33],{},[27,1229,209],{},". The handlers then import from ",[27,1232,1233],{},"clients-axios",[19,1235,1237],{"id":1236},"less-common-cases","Less common cases",[719,1239,704],{"id":1240},"tool-calls-and-results",[11,1242,1243,1244,1246,1247,1250,1251,1254,1255,349],{},"Configure transport settings such as ",[27,1245,275],{}," on the client plugin. With ",[27,1248,1249],{},"client: 'client'",", set them in your own client module, because ",[27,1252,1253],{},"pluginClient"," takes no ",[27,1256,275],{},[11,1258,1259],{},"Each handler calls the client function with:",[1261,1262,1263,1281,1284],"ul",{},[1264,1265,1266,1267,30,1269,30,1272,30,1275,341,1277,1280],"li",{},"The grouped ",[27,1268,192],{},[27,1270,1271],{},"query",[27,1273,1274],{},"headers",[27,1276,674],{},[27,1278,1279],{},"cookies"," options that the operation has.",[1264,1282,1283],{},"The MCP cancellation signal.",[1264,1285,1286,1289,1290,349],{},[27,1287,1288],{},"throwOnError: true",", so a non-2xx response throws and surfaces as a tool error, whatever the client's ",[27,1291,1292],{},"throwOnErrorDefault",[11,1294,1295,1296,755],{},"The tool response body depends on the client's ",[27,1297,1298],{},"returnType",[576,1300,1301,1313],{},[579,1302,1303],{},[582,1304,1305,1310],{},[585,1306,1307,1308],{},"Client ",[27,1309,1298],{},[585,1311,1312],{},"Tool response body",[592,1314,1315,1331],{},[582,1316,1317,1326],{},[597,1318,1319,1322,1323],{},[27,1320,1321],{},"'full'"," (the client default), or the plain result of ",[27,1324,1325],{},"@kubb\u002Fplugin-client",[597,1327,1328],{},[27,1329,1330],{},"res.data",[582,1332,1333,1338],{},[597,1334,1335],{},[27,1336,1337],{},"'data'",[597,1339,1340],{},"The resolved call result",[11,1342,1343,1344,1347,1348,619,1351,1354],{},"In the tool list, an ",[27,1345,1346],{},"int64"," field shows as an integer and a binary field as a value without a type, because ",[27,1349,1350],{},"bigint",[27,1352,1353],{},"Blob"," have no JSON Schema form.",[719,1356,1358],{"id":1357},"streaming-operations","Streaming operations",[11,1360,1361,1362,1365],{},"Operations that stream their response, such as ",[27,1363,1364],{},"text\u002Fevent-stream"," or JSON Lines, get no tool, because a tool returns one JSON result.",{"title":1367,"searchDepth":1368,"depth":1368,"links":1369},"",5,[1370,1372,1373,1374,1375,1376,1381,1382,1383],{"id":21,"depth":1371,"text":22},2,{"id":352,"depth":1371,"text":353},{"id":410,"depth":1371,"text":411},{"id":437,"depth":1371,"text":438},{"id":568,"depth":1371,"text":569},{"id":707,"depth":1371,"text":708,"children":1377},[1378,1380],{"id":721,"depth":1379,"text":722},3,{"id":971,"depth":1379,"text":972},{"id":982,"depth":1371,"text":983},{"id":1031,"depth":1371,"text":1032},{"id":1236,"depth":1371,"text":1237,"children":1384},[1385,1386],{"id":1240,"depth":1379,"text":704},{"id":1357,"depth":1379,"text":1358},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Fguides\u002Fserver",1795727685889,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]