[{"data":1,"prerenderedAt":728},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Foptions":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":727,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-mcp\u002Foptions.md",{},"Options",{"type":8,"value":9,"toc":715},"minimark",[10,25,30,210,214,217,252,292,294,300,329,361,372,401,414,416,440,469],[11,12,13,14,18,19,24],"p",{},"Pass these options to ",[15,16,17],"code",{},"pluginMcp()",". Shared options link to ",[20,21,23],"a",{"href":22},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options","Shared plugin options",".",[26,27,29],"h2",{"id":28},"options-overview","Options overview",[31,32,33,49],"table",{},[34,35,36],"thead",{},[37,38,39,43,46],"tr",{},[40,41,42],"th",{},"Option",[40,44,45],{},"Purpose",[40,47,48],{},"Default",[50,51,52,87,109,125,140,158,175,193],"tbody",{},[37,53,54,63,82],{},[55,56,57],"td",{},[20,58,60],{"href":59},"#output",[15,61,62],{},"output",[55,64,65,66,69,70,69,73,69,76,69,79,24],{},"Where handlers are written: ",[15,67,68],{},"path",", ",[15,71,72],{},"mode",[15,74,75],{},"barrel",[15,77,78],{},"banner",[15,80,81],{},"footer",[55,83,84],{},[15,85,86],{},"{ path: 'mcp', barrel: { type: 'named' } }",[37,88,89,97,106],{},[55,90,91],{},[20,92,94],{"href":93},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#group",[15,95,96],{},"group",[55,98,99,100,69,103,24],{},"Split output by tag or path: ",[15,101,102],{},"type",[15,104,105],{},"name",[55,107,108],{},"None",[37,110,111,119,122],{},[55,112,113],{},[20,114,116],{"href":115},"#client",[15,117,118],{},"client",[55,120,121],{},"Which registered client plugin the handlers call.",[55,123,124],{},"Auto-detected",[37,126,127,135,138],{},[55,128,129],{},[20,130,132],{"href":131},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#include",[15,133,134],{},"include",[55,136,137],{},"Keep only operations that match.",[55,139,108],{},[37,141,142,150,153],{},[55,143,144],{},[20,145,147],{"href":146},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#exclude",[15,148,149],{},"exclude",[55,151,152],{},"Skip operations that match.",[55,154,155],{},[15,156,157],{},"[]",[37,159,160,168,171],{},[55,161,162],{},[20,163,165],{"href":164},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#override",[15,166,167],{},"override",[55,169,170],{},"Apply different options per pattern.",[55,172,173],{},[15,174,157],{},[37,176,177,185,188],{},[55,178,179],{},[20,180,182],{"href":181},"#resolver",[15,183,184],{},"resolver",[55,186,187],{},"Customize generated names and file paths.",[55,189,190],{},[15,191,192],{},"resolverMcp",[37,194,195,203,206],{},[55,196,197],{},[20,198,200],{"href":199},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#macros",[15,201,202],{},"macros",[55,204,205],{},"Rewrite AST nodes before printing.",[55,207,208],{},[15,209,157],{},[26,211,213],{"id":212},"option-details","Option details",[215,216,62],"h3",{"id":62},[11,218,219,220,69,223,226,227,230,231,234,235,237,238,241,242,245,246,248,249,251],{},"Where the generated MCP handler files are written. The plugin writes ",[15,221,222],{},"server.ts",[15,224,225],{},"start.ts",", and ",[15,228,229],{},".mcp.json"," at the root of ",[15,232,233],{},"output.path",", next to the handlers. Keep ",[15,236,233],{}," a folder name such as the default ",[15,239,240],{},"'mcp'",". Single-file output (",[15,243,244],{},"output.mode: 'file'",", or a ",[15,247,68],{}," with an extension) has no room for those files. With ",[15,250,96],{},", handlers move into subfolders and those files stay at the root.",[31,253,254,262],{},[34,255,256],{},[37,257,258,260],{},[40,259],{},[40,261],{},[50,263,264,274,284],{},[37,265,266,269],{},[55,267,268],{},"Type",[55,270,271],{},[15,272,273],{},"Output",[37,275,276,279],{},[55,277,278],{},"Required",[55,280,281],{},[15,282,283],{},"false",[37,285,286,288],{},[55,287,48],{},[55,289,290],{},[15,291,86],{},[215,293,118],{"id":118},[11,295,296,297,299],{},"Selects which registered client plugin the handlers call. A single registered client is auto-detected. Set ",[15,298,118],{}," when several are registered.",[31,301,302,310],{},[34,303,304],{},[37,305,306,308],{},[40,307],{},[40,309],{},[50,311,312,321],{},[37,313,314,316],{},[55,315,268],{},[55,317,318],{},[15,319,320],{},"'fetch' | 'axios' | 'client'",[37,322,323,325],{},[55,324,278],{},[55,326,327],{},[15,328,283],{},[330,331,332,343,352],"field-group",{},[333,334,336,337,24],"field",{"name":335},"'fetch'","Calls the operations generated by ",[20,338,340],{"href":339},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch",[15,341,342],{},"@kubb\u002Fplugin-fetch",[333,344,336,346,24],{"name":345},"'axios'",[20,347,349],{"href":348},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios",[15,350,351],{},"@kubb\u002Fplugin-axios",[333,353,336,355,24],{"name":354},"'client'",[20,356,358],{"href":357},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-client",[15,359,360],{},"@kubb\u002Fplugin-client",[11,362,363,364,367,368,371],{},"Each handler passes grouped ",[15,365,366],{},"{ path, query, headers, body }"," options. Configure transport settings such as ",[15,369,370],{},"baseURL"," on the client plugin.",[11,373,374,375,378,379,382,383,385,386,389,390,393,394,397,398,24],{},"Generated handlers follow the client plugin's ",[15,376,377],{},"returnType"," option. With ",[15,380,381],{},"'full'"," (the client default) or ",[15,384,360],{},"'s plain result, handlers read the success body from ",[15,387,388],{},"res.data",", and with ",[15,391,392],{},"'data'"," they use the resolved call result directly as the tool response body. Handlers always pass ",[15,395,396],{},"throwOnError: true"," so non-2xx responses throw and surface as tool errors, regardless of the client's ",[15,399,400],{},"throwOnErrorDefault",[402,403,405,406,69,408,410,411,413],"blockquote",{"as":404},"note","The handlers call a client plugin's functions, so register ",[15,407,342],{},[15,409,351],{},", or ",[15,412,360],{}," alongside this one.",[215,415,184],{"id":184},[11,417,418,419,421,422,69,424,69,427,430,431,434,435,24],{},"Overrides generated file and symbol names. Omitted members keep ",[15,420,192],{},". The shared members (",[15,423,105],{},[15,425,426],{},"file",[15,428,429],{},"imports",") and the ",[15,432,433],{},"this"," context are described under ",[20,436,438],{"href":437},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#resolver",[15,439,184],{},[31,441,442,450],{},[34,443,444],{},[37,445,446,448],{},[40,447],{},[40,449],{},[50,451,452,461],{},[37,453,454,456],{},[55,455,268],{},[55,457,458],{},[15,459,460],{},"ResolverPatch\u003CResolverMcp>",[37,462,463,465],{},[55,464,278],{},[55,466,467],{},[15,468,283],{},[470,471,476],"pre",{"language":472,"filename":473,"code":474,"class":475},"typescript","Partial override","type ResolverMcpPatch = {\n  name?(name: string): string\n  file?: {\n    baseName?(params: { name: string; extname: string }): string\n    path?(params: { baseName: string; output: Output }): string\n  }\n  imports?(options: ResolveImportsOptions): Array\u003CImportNode>\n  handler?: {\n    name?(node: OperationNode): string  \u002F\u002F → 'showPetByIdHandler'\n  }\n}","highlights",[15,477,479,499,500,499,529,499,541,499,585,499,622,499,629,499,663,499,676,499,705,499,711],{"class":478},"language-typescript",[480,481,484,488,492,495],"span",{"class":482,"style":483},"line","display: inline",[480,485,487],{"style":486},"color:#d73a49;--hls-dark:#f97583","type ",[480,489,491],{"style":490},"color:#6f42c1;--hls-dark:#b392f0","ResolverMcpPatch ",[480,493,494],{"style":486},"= ",[480,496,498],{"style":497},"color:#005cc5;--hls-dark:#79b8ff","{","\n",[480,501,502,505,508,511,514,516,519,522,525,527],{"class":482,"style":483},[480,503,504],{"style":497},"  ",[480,506,105],{"style":507},"color:#24292e;--hls-dark:#e1e4e8",[480,509,510],{"style":486},"?",[480,512,513],{"style":497},"(",[480,515,105],{"style":507},[480,517,518],{"style":507},": ",[480,520,521],{"style":490},"string",[480,523,524],{"style":497},")",[480,526,518],{"style":507},[480,528,521],{"style":490},[480,530,531,533,535,537,539],{"class":482,"style":483},[480,532,504],{"style":490},[480,534,426],{"style":507},[480,536,510],{"style":507},[480,538,518],{"style":486},[480,540,498],{"style":497},[480,542,543,546,549,551,553,556,558,561,563,565,567,570,573,575,578,581,583],{"class":482,"style":483},[480,544,545],{"style":497},"    ",[480,547,548],{"style":507},"baseName",[480,550,510],{"style":486},[480,552,513],{"style":497},[480,554,555],{"style":507},"params",[480,557,518],{"style":486},[480,559,560],{"style":497},"{ ",[480,562,105],{"style":497},[480,564,518],{"style":507},[480,566,521],{"style":490},[480,568,569],{"style":486},"; ",[480,571,572],{"style":497},"extname",[480,574,518],{"style":507},[480,576,577],{"style":490},"string ",[480,579,580],{"style":497},"})",[480,582,518],{"style":507},[480,584,521],{"style":490},[480,586,587,589,591,593,595,597,599,601,603,605,607,609,611,613,616,618,620],{"class":482,"style":483},[480,588,545],{"style":490},[480,590,68],{"style":507},[480,592,510],{"style":486},[480,594,513],{"style":497},[480,596,555],{"style":507},[480,598,518],{"style":486},[480,600,560],{"style":497},[480,602,548],{"style":497},[480,604,518],{"style":507},[480,606,521],{"style":490},[480,608,569],{"style":486},[480,610,62],{"style":497},[480,612,518],{"style":507},[480,614,615],{"style":490},"Output ",[480,617,580],{"style":497},[480,619,518],{"style":507},[480,621,521],{"style":490},[480,623,624,626],{"class":482,"style":483},[480,625,504],{"style":490},[480,627,628],{"style":497},"}",[480,630,631,633,635,637,639,642,644,647,649,651,654,657,660],{"class":482,"style":483},[480,632,504],{"style":497},[480,634,429],{"style":507},[480,636,510],{"style":486},[480,638,513],{"style":497},[480,640,641],{"style":507},"options",[480,643,518],{"style":507},[480,645,646],{"style":490},"ResolveImportsOptions",[480,648,524],{"style":497},[480,650,518],{"style":507},[480,652,653],{"style":490},"Array",[480,655,656],{"style":486},"\u003C",[480,658,659],{"style":490},"ImportNode",[480,661,662],{"style":486},">",[480,664,665,667,670,672,674],{"class":482,"style":483},[480,666,504],{"style":486},[480,668,669],{"style":507},"handler",[480,671,510],{"style":507},[480,673,518],{"style":486},[480,675,498],{"style":497},[480,677,678,680,682,684,686,689,691,694,696,698,701],{"class":482,"style":483},[480,679,545],{"style":497},[480,681,105],{"style":507},[480,683,510],{"style":486},[480,685,513],{"style":497},[480,687,688],{"style":507},"node",[480,690,518],{"style":507},[480,692,693],{"style":490},"OperationNode",[480,695,524],{"style":497},[480,697,518],{"style":507},[480,699,700],{"style":490},"string  ",[480,702,704],{"style":703},"color:#6a737d;--hls-dark:#6a737d","\u002F\u002F → 'showPetByIdHandler'",[480,706,707,709],{"class":482,"style":483},[480,708,504],{"style":703},[480,710,628],{"style":497},[480,712,713],{"class":482,"style":483},[480,714,628],{"style":497},{"title":716,"searchDepth":717,"depth":717,"links":718},"",5,[719,721],{"id":28,"depth":720,"text":29},2,{"id":212,"depth":720,"text":213,"children":722},[723,725,726],{"id":62,"depth":724,"text":62},3,{"id":118,"depth":724,"text":118},{"id":184,"depth":724,"text":184},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Foptions",1793747912399]