[{"data":1,"prerenderedAt":462,"buildId":463},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fai\u002Fmcp":3},{"id":4,"title":5,"body":6,"description":445,"extension":446,"frontmatter":447,"heading":5,"meta":453,"navigation":455,"order":440,"path":456,"seo":457,"sitemap":458,"source":459,"stem":460,"__hash__":461},"docs\u002Fdocs\u002F5.x\u002Fai\u002Fmcp.md","Set up the MCP server",{"type":7,"value":8,"toc":435},"minimark",[9,47,59,64,71,329,333,340,347,354,428],[10,11,12,20,21,25,26,29,30,33,34,38,39,42,43,46],"p",{},[13,14,16],"a",{"href":15},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fmcp",[17,18,19],"code",{},"kubb mcp",", the Kubb ",[13,22,24],{"href":23},"https:\u002F\u002Fmodelcontextprotocol.io\u002F","Model Context Protocol"," server, lets your editor or agent validate a spec, scaffold a ",[17,27,28],{},"kubb.config.ts",", add and update extensions, preview changes with ",[17,31,32],{},"kubb_diff",", and run Kubb from the chat. ",[13,35,37],{"href":36},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fmcp#tools","Tools"," lists each tool, such as ",[17,40,41],{},"kubb_generate"," and ",[17,44,45],{},"kubb_validate",".",[48,49,51,52,58],"blockquote",{"as":50},"note","This server runs Kubb inside your editor. To generate an MCP server from your own OpenAPI spec, use ",[13,53,55],{"href":54},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp",[17,56,57],{},"@kubb\u002Fplugin-mcp"," instead.",[60,61,63],"h2",{"id":62},"client-configuration","Add the server to your client",[10,65,66,67,70],{},"Each client starts the server with ",[17,68,69],{},"npx kubb mcp"," over stdio.",[72,73,74,123,239],"tabs",{},[75,76,78,84,107],"tabs-item",{"label":77},"Claude Code",[10,79,80,81,83],{},"Run this from your project root, next to your ",[17,82,28],{},":",[85,86,91],"pre",{"language":87,"filename":88,"code":89,"class":90},"shell","Terminal","claude mcp add kubb -- npx kubb mcp","highlights",[17,92,94],{"class":93},"language-shell",[95,96,99,103],"span",{"class":97,"style":98},"line","display: inline",[95,100,102],{"style":101},"color:#6f42c1;--hls-dark:#b392f0","claude ",[95,104,106],{"style":105},"color:#24292e;--hls-dark:#e1e4e8","mcp add kubb -- npx kubb mcp",[10,108,109,110,113,114,117,118,122],{},"Add ",[17,111,112],{},"--scope project"," to write the entry to ",[17,115,116],{},".mcp.json"," for your team. The ",[13,119,121],{"href":120},"\u002Fdocs\u002F5.x\u002Fai\u002Fclaude","Kubb Claude Code plugin"," registers the same server.",[75,124,126,144],{"label":125},"Claude Desktop and Cursor",[10,127,128,129,132,133,136,137,140,141,83],{},"Add the entry to ",[17,130,131],{},"claude_desktop_config.json"," (on macOS in ",[17,134,135],{},"~\u002FLibrary\u002FApplication Support\u002FClaude\u002F",", on Windows in ",[17,138,139],{},"%APPDATA%\\Claude\\",") or to the server list in Cursor's ",[17,142,143],{},"Settings → MCP",[85,145,148],{"language":146,"filename":131,"code":147,"class":90},"json","{\n \"mcpServers\": {\n \"kubb\": {\n \"command\": \"npx\",\n \"args\": [\"kubb\", \"mcp\"]\n }\n }\n}",[17,149,151,157,158,157,172,157,184,157,201,157,224,157,229,157,234],{"class":150},"language-json",[95,152,153],{"class":97,"style":98},[95,154,156],{"style":155},"color:#005cc5;--hls-dark:#79b8ff","{","\n",[95,159,160,163,166,170],{"class":97,"style":98},[95,161,162],{"style":155}," ",[95,164,165],{"style":155},"\"mcpServers\"",[95,167,169],{"style":168},"color:#d73a49;--hls-dark:#f97583",": ",[95,171,156],{"style":155},[95,173,174,177,180,182],{"class":97,"style":98},[95,175,176],{"style":155}," ",[95,178,179],{"style":155},"\"kubb\"",[95,181,169],{"style":168},[95,183,156],{"style":155},[95,185,186,189,192,194,198],{"class":97,"style":98},[95,187,188],{"style":155}," ",[95,190,191],{"style":155},"\"command\"",[95,193,169],{"style":168},[95,195,197],{"style":196},"color:#032f62;--hls-dark:#9ecbff","\"npx\"",[95,199,200],{"style":168},",",[95,202,203,205,208,210,213,215,218,221],{"class":97,"style":98},[95,204,188],{"style":168},[95,206,207],{"style":155},"\"args\"",[95,209,169],{"style":168},[95,211,212],{"style":155},"[",[95,214,179],{"style":196},[95,216,217],{"style":168},", ",[95,219,220],{"style":196},"\"mcp\"",[95,222,223],{"style":155},"]",[95,225,226],{"class":97,"style":98},[95,227,228],{"style":155}," }",[95,230,231],{"class":97,"style":98},[95,232,233],{"style":155}," }",[95,235,236],{"class":97,"style":98},[95,237,238],{"style":155},"}",[75,240,242,257],{"label":241},"VS Code",[10,243,244,245,248,249,252,253,256],{},"VS Code (GitHub Copilot) uses a ",[17,246,247],{},"servers"," key. Add the entry to ",[17,250,251],{},".vscode\u002Fmcp.json",", or, for every workspace, run ",[17,254,255],{},"MCP: Open User Configuration"," from the Command Palette:",[85,258,260],{"language":146,"filename":251,"code":259,"class":90},"{\n \"servers\": {\n \"kubb\": {\n \"command\": \"npx\",\n \"args\": [\"kubb\", \"mcp\"]\n }\n }\n}",[17,261,262,157,266,157,277,157,287,157,299,157,317,157,321,157,325],{"class":150},[95,263,264],{"class":97,"style":98},[95,265,156],{"style":155},[95,267,268,270,273,275],{"class":97,"style":98},[95,269,162],{"style":155},[95,271,272],{"style":155},"\"servers\"",[95,274,169],{"style":168},[95,276,156],{"style":155},[95,278,279,281,283,285],{"class":97,"style":98},[95,280,176],{"style":155},[95,282,179],{"style":155},[95,284,169],{"style":168},[95,286,156],{"style":155},[95,288,289,291,293,295,297],{"class":97,"style":98},[95,290,188],{"style":155},[95,292,191],{"style":155},[95,294,169],{"style":168},[95,296,197],{"style":196},[95,298,200],{"style":168},[95,300,301,303,305,307,309,311,313,315],{"class":97,"style":98},[95,302,188],{"style":168},[95,304,207],{"style":155},[95,306,169],{"style":168},[95,308,212],{"style":155},[95,310,179],{"style":196},[95,312,217],{"style":168},[95,314,220],{"style":196},[95,316,223],{"style":155},[95,318,319],{"class":97,"style":98},[95,320,228],{"style":155},[95,322,323],{"class":97,"style":98},[95,324,233],{"style":155},[95,326,327],{"class":97,"style":98},[95,328,238],{"style":155},[60,330,332],{"id":331},"working-directory","Start it in your project",[10,334,335,336,339],{},"The server looks for your config in the folder the client starts it in, then in each parent folder. Claude Code starts it in the folder you run ",[17,337,338],{},"claude"," from.",[341,342,344],"h3",{"id":343},"no-config-file-found",[17,345,346],{},"No config file found",[10,348,349,350,353],{},"The client started the server outside your project. Clients such as Claude Code ignore a ",[17,351,352],{},"cwd"," key, so change into the project in the command (macOS and Linux):",[85,355,357],{"language":146,"filename":131,"code":356,"class":90},"{\n \"mcpServers\": {\n \"kubb\": {\n \"command\": \"sh\",\n \"args\": [\"-c\", \"cd '\u002Fpath\u002Fto\u002Fyour\u002Fproject' && npx kubb mcp\"]\n }\n }\n}",[17,358,359,157,363,157,373,157,383,157,396,157,416,157,420,157,424],{"class":150},[95,360,361],{"class":97,"style":98},[95,362,156],{"style":155},[95,364,365,367,369,371],{"class":97,"style":98},[95,366,162],{"style":155},[95,368,165],{"style":155},[95,370,169],{"style":168},[95,372,156],{"style":155},[95,374,375,377,379,381],{"class":97,"style":98},[95,376,176],{"style":155},[95,378,179],{"style":155},[95,380,169],{"style":168},[95,382,156],{"style":155},[95,384,385,387,389,391,394],{"class":97,"style":98},[95,386,188],{"style":155},[95,388,191],{"style":155},[95,390,169],{"style":168},[95,392,393],{"style":196},"\"sh\"",[95,395,200],{"style":168},[95,397,398,400,402,404,406,409,411,414],{"class":97,"style":98},[95,399,188],{"style":168},[95,401,207],{"style":155},[95,403,169],{"style":168},[95,405,212],{"style":155},[95,407,408],{"style":196},"\"-c\"",[95,410,217],{"style":168},[95,412,413],{"style":196},"\"cd '\u002Fpath\u002Fto\u002Fyour\u002Fproject' && npx kubb mcp\"",[95,415,223],{"style":155},[95,417,418],{"class":97,"style":98},[95,419,228],{"style":155},[95,421,422],{"class":97,"style":98},[95,423,233],{"style":155},[95,425,426],{"class":97,"style":98},[95,427,238],{"style":155},[10,429,430,434],{},[13,431,433],{"href":432},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fmcp#working-directory","Working directory"," lists what the server reads and writes.",{"title":436,"searchDepth":437,"depth":437,"links":438},"",5,[439,441],{"id":62,"depth":440,"text":63},2,{"id":331,"depth":440,"text":332,"children":442},[443],{"id":343,"depth":444,"text":346},3,"Connect Claude Code, Claude Desktop, Cursor, VS Code, and other MCP clients to the Kubb MCP server, and start it in your project folder.","md",{"layout":448,"title":5,"description":445,"outline":449,"order":440,"navigation":450},"doc",[440,444],{"title":451,"icon":452},"MCP","i-simple-icons-modelcontextprotocol",{"layout":448,"outline":454},[440,444],{"title":451,"icon":452},"\u002Fdocs\u002F5.x\u002Fai\u002Fmcp",{"title":5,"description":445},{"loc":456},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fai\u002Fmcp.md","docs\u002F5.x\u002Fai\u002Fmcp","0DaOt8J1mSSnMuGVwTJsqqE-knzEv65ts3vyFPFpED8",1795727671977,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]