[{"data":1,"prerenderedAt":710,"buildId":711},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fai\u002Fstudio":3},{"id":4,"title":5,"body":6,"description":693,"extension":694,"frontmatter":695,"heading":5,"meta":701,"navigation":703,"order":685,"path":704,"seo":705,"sitemap":706,"source":707,"stem":708,"__hash__":709},"docs\u002Fdocs\u002F5.x\u002Fai\u002Fstudio.md","Connect Claude to Kubb Studio",{"type":7,"value":8,"toc":675},"minimark",[9,29,36,46,51,54,87,91,173,184,200,204,211,340,345,350,378,381,384,387,478,481,484,488,495,538,546,550,573,576,583,587,606,610,655,659],[10,11,12,13,18,19,23,24,28],"p",{},"The Kubb Studio connector is a remote ",[14,15,17],"a",{"href":16},"https:\u002F\u002Fmodelcontextprotocol.io\u002F","Model Context Protocol"," server at ",[20,21,22],"code",{},"https:\u002F\u002Fmcp.kubb.studio\u002Fmcp",". With it, Claude starts a Kubb run on an agent you paired with ",[14,25,27],{"href":26},"https:\u002F\u002Fkubb.studio","Kubb Studio",", reports which files changed, and answers where Kubb generated a schema or an operation.",[10,30,31,32,35],{},"Kubb still runs on your machine. The connector sends the request to your agent, and the agent generates from the ",[20,33,34],{},"kubb.config.ts"," in its own checkout.",[37,38,40,41,45],"blockquote",{"as":39},"note","This connector works with your Kubb Studio account. To run Kubb inside your editor without Studio, use the local ",[14,42,44],{"href":43},"\u002Fdocs\u002F5.x\u002Fai\u002Fmcp","Kubb MCP server"," instead.",[47,48,50],"h2",{"id":49},"before-you-connect","Before you connect",[10,52,53],{},"You need:",[55,56,57,64,70],"ul",{},[58,59,60,61,63],"li",{},"A ",[14,62,27],{"href":26}," account. It is free to start.",[58,65,66,67,69],{},"A project with a ",[20,68,34],{}," and Kubb 5.30.1 or later. A dry run and a lookup by tag need Kubb 5.31.0.",[58,71,72,73,79,80,86],{},"One agent paired with Studio. Run ",[14,74,76],{"href":75},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fstudio",[20,77,78],{},"kubb studio"," in the project, or let the client pair its own agent with ",[14,81,83],{"href":82},"#tools",[20,84,85],{},"kubb_studio_connect",".",[47,88,90],{"id":89},"connect","Add the connector",[92,93,94,127,166],"tabs",{},[95,96,98,101],"tabs-item",{"label":97},"Claude",[10,99,100],{},"In Claude on the web or in the desktop app:",[102,103,104,115,121],"ol",{},[58,105,106,107,111,112,86],{},"Open ",[108,109,110],"strong",{},"Settings",", then ",[108,113,114],{},"Connectors",[58,116,117,118,86],{},"Select ",[108,119,120],{},"Add custom connector",[58,122,123,124,126],{},"Enter the URL ",[20,125,22],{},". Leave the client ID and secret empty.",[95,128,130,137],{"label":129},"Claude Code",[10,131,132,133,136],{},"Run this in your terminal, then run ",[20,134,135],{},"\u002Fmcp"," in Claude Code to sign in:",[138,139,144],"pre",{"language":140,"filename":141,"code":142,"class":143},"shell","Terminal","claude mcp add --transport http kubb-studio https:\u002F\u002Fmcp.kubb.studio\u002Fmcp","highlights",[20,145,147],{"class":146},"language-shell",[148,149,152,156,160,163],"span",{"class":150,"style":151},"line","display: inline",[148,153,155],{"style":154},"color:#6f42c1;--hls-dark:#b392f0","claude ",[148,157,159],{"style":158},"color:#24292e;--hls-dark:#e1e4e8","mcp add --transport http kubb-studio https",[148,161,162],{"style":158},":",[148,164,165],{"style":158},"\u002F\u002Fmcp.kubb.studio\u002Fmcp",[95,167,169,170,172],{"label":168},"Other clients","Add ",[20,171,22],{}," as a remote MCP server over Streamable HTTP. The client needs OAuth 2.1 with a client metadata document or dynamic client registration.",[10,174,175,176,180,181,86],{},"The client opens Kubb Studio in your browser on its first call. Sign in, pick the organization the client works in, review its ",[14,177,179],{"href":178},"#permissions","permissions",", and select ",[108,182,183],{},"Approve",[10,185,186,187,189,190,189,193,189,196,199],{},"In Studio, ",[108,188,110],{},", ",[108,191,192],{},"Organization",[108,194,195],{},"Integrations",[108,197,198],{},"Kubb Studio MCP"," shows the same steps with copy buttons.",[47,201,203],{"id":202},"tools","Tools",[10,205,206,207,210],{},"Each tool is named after the Kubb CLI command it runs, with a ",[20,208,209],{},"kubb_studio_"," prefix.",[212,213,214,230],"table",{},[215,216,217],"thead",{},[218,219,220,224,227],"tr",{},[221,222,223],"th",{},"Tool",[221,225,226],{},"What it does",[221,228,229],{},"Changes data",[231,232,233,251,264,276,287,299,311,323],"tbody",{},[218,234,235,241,248],{},[236,237,238],"td",{},[20,239,240],{},"kubb_studio_generate",[236,242,243,244,247],{},"Starts a run on one of your agents. With ",[20,245,246],{},"dryRun",", it previews the changes and writes nothing.",[236,249,250],{},"Yes",[218,252,253,258,261],{},[236,254,255],{},[20,256,257],{},"kubb_studio_get_run",[236,259,260],{},"Waits for a run and returns its status, the changed files, and Kubb's diagnostics.",[236,262,263],{},"No",[218,265,266,271,274],{},[236,267,268],{},[20,269,270],{},"kubb_studio_lookup",[236,272,273],{},"Finds where Kubb generated a schema or an operation, and which operations use a schema. Also lists a route or a tag.",[236,275,263],{},[218,277,278,282,285],{},[236,279,280],{},[20,281,85],{},[236,283,284],{},"Returns a one-time code, valid 5 minutes, so the client pairs a new agent in its own sandbox or on your machine.",[236,286,250],{},[218,288,289,294,297],{},[236,290,291],{},[20,292,293],{},"kubb_studio_list_agents",[236,295,296],{},"Lists the agents the client may run, and whether each is online.",[236,298,263],{},[218,300,301,306,309],{},[236,302,303],{},[20,304,305],{},"kubb_studio_list_projects",[236,307,308],{},"Lists the projects of the organization, with their agents and newest run.",[236,310,263],{},[218,312,313,318,321],{},[236,314,315],{},[20,316,317],{},"kubb_studio_list_runs",[236,319,320],{},"Lists past runs, with who started each and through which client.",[236,322,263],{},[218,324,325,330,338],{},[236,326,327],{},[20,328,329],{},"kubb_studio_list_snapshots",[236,331,332,333,337],{},"Lists the organization's ",[14,334,336],{"href":335},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fci","snapshot packages"," that have not expired, with their install line.",[236,339,263],{},[10,341,342,344],{},[20,343,240],{}," overwrites the generated files in the agent's checkout. When a call names no agent, Claude asks you to pick the agent and approve the run first.",[346,347,349],"h3",{"id":348},"try-it","Try it",[138,351,354],{"language":352,"filename":97,"code":353,"class":143},"text","Which of my Kubb agents are online?\nRegenerate my API client with Kubb.\nWhat would change in the generated code if I ran Kubb now?\nWhere did Kubb generate the Pet schema, and which operations use it?",[20,355,357,362,363,362,368,362,373],{"class":356},"language-text",[148,358,359],{"class":150,"style":151},[148,360,361],{"style":158},"Which of my Kubb agents are online?","\n",[148,364,365],{"class":150,"style":151},[148,366,367],{"style":158},"Regenerate my API client with Kubb.",[148,369,370],{"class":150,"style":151},[148,371,372],{"style":158},"What would change in the generated code if I ran Kubb now?",[148,374,375],{"class":150,"style":151},[148,376,377],{"style":158},"Where did Kubb generate the Pet schema, and which operations use it?",[10,379,380],{},"Claude and the Claude desktop app show the result in a card: the run with its log and diff, the lookup with links to the Studio editor, or the list of agents, runs, or snapshots.",[47,382,383],{"id":179},"Permissions",[10,385,386],{},"The approval page lists what the client asks for. One permission is required, and you can turn off each of the others before you approve.",[212,388,389,402],{},[215,390,391],{},[218,392,393,396,399],{},[221,394,395],{},"Permission",[221,397,398],{},"Lets the client",[221,400,401],{},"Default",[231,403,404,417,430,442,454,466],{},[218,405,406,411,414],{},[236,407,408],{},[20,409,410],{},"agent:generate",[236,412,413],{},"Run generations on your agents.",[236,415,416],{},"On, required",[218,418,419,424,427],{},[236,420,421],{},[20,422,423],{},"agent:create",[236,425,426],{},"Pair its own Kubb agents. They run only for that client.",[236,428,429],{},"On",[218,431,432,437,440],{},[236,433,434],{},[20,435,436],{},"agent:read",[236,438,439],{},"List your agents and projects, and see which agents are connected.",[236,441,429],{},[218,443,444,449,452],{},[236,445,446],{},[20,447,448],{},"run:read",[236,450,451],{},"Read your runs: their results, history, and the index of the generated code.",[236,453,429],{},[218,455,456,461,464],{},[236,457,458],{},[20,459,460],{},"snapshot:read",[236,462,463],{},"List the organization's snapshot packages.",[236,465,429],{},[218,467,468,473,476],{},[236,469,470],{},[20,471,472],{},"offline_access",[236,474,475],{},"Stay connected until you disconnect it.",[236,477,429],{},[10,479,480],{},"A tool whose permission is off answers with an error that names the permission. To grant it later, connect the client again.",[10,482,483],{},"The client works in one organization and runs only your own agents, plus the agents it paired itself.",[346,485,487],{"id":486},"what-your-agent-shares","What your agent shares",[10,489,490,491,494],{},"An agent's own ",[14,492,179],{"href":493},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fstudio#permissions"," decide what leaves your machine, whatever the client was granted:",[55,496,497,504,517,523],{},[58,498,499,500,503],{},"Without ",[20,501,502],{},"--allow-read",", Studio gets file paths and hashes and no file content. A run has no diff, and a dry run is refused.",[58,505,506,507,510,511,513,514,516],{},"With ",[20,508,509],{},"--allow-read-ast",", Studio reads the spec as Kubb parsed it, even without ",[20,512,502],{},". Without it, the agent sends no code index, and ",[20,515,270],{}," answers how to turn it on.",[58,518,499,519,522],{},[20,520,521],{},"--allow-write",", a run leaves your output folder unchanged.",[58,524,506,525,528,529,531,532,86],{},[20,526,527],{},"--allow-exec"," and ",[20,530,521],{},", a run without errors also runs the formatter, the linter, and the commands in ",[14,533,535],{"href":534},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#output-postgenerate",[20,536,537],{},"output.postGenerate",[10,539,540,541,545],{},"The ",[14,542,544],{"href":543},"https:\u002F\u002Fkubb.studio\u002Fprivacy","Kubb Studio privacy policy"," lists what a connected client can read and how long Studio keeps it.",[47,547,549],{"id":548},"revoke","Revoke access",[102,551,552,563],{},[58,553,554,555,189,557,189,559,189,561,86],{},"In Studio, open ",[108,556,110],{},[108,558,192],{},[108,560,195],{},[108,562,198],{},[58,564,565,566,569,570,86],{},"On the ",[108,567,568],{},"Sessions"," tab, find the client and select ",[108,571,572],{},"Revoke",[10,574,575],{},"The client's next call fails, its unused pairing codes stop working, and the agents it paired are disconnected. You can revoke the clients you connected. Owners and admins can revoke any member's.",[10,577,578,579,189,581,86],{},"To remove the connector from Claude as well, delete it under ",[108,580,110],{},[108,582,114],{},[47,584,586],{"id":585},"limits","Limits",[55,588,589,592,595,600],{},[58,590,591],{},"100 requests a minute per connected client.",[58,593,594],{},"A run's result, file hashes, and code index stay available for one hour. After that, start a new run.",[58,596,597,599],{},[20,598,317],{}," lists runs for 90 days.",[58,601,602,603,86],{},"A config with several entries runs its first, unless the call names one with ",[20,604,605],{},"config",[47,607,609],{"id":608},"faq","FAQ",[611,612,613,618,629,645],"accordion",{},[614,615,617],"accordion-item",{"label":616},"Does Kubb Studio see my OpenAPI spec or my code?","Studio does not store your spec or the content of your generated files. Your agent sends file content only when its permissions allow it, such as for a diff. A diagnostic can quote the part of the spec it is about.",[614,619,621,623,624,626,627,86],{"label":620},"Claude says I have no agents. What now?",[20,622,293],{}," answers an empty list until an agent is paired. Run ",[20,625,78],{}," in your project and approve the pairing code, or ask Claude to pair an agent, which calls ",[20,628,85],{},[614,630,632,633,635,636,638,639,641,642,644],{"label":631},"Can a run change files I did not pick?","Kubb writes only to the output folders of the ",[20,634,34],{}," in the agent's checkout, and only when the agent runs with ",[20,637,521],{},". One exception: an agent with ",[20,640,527],{}," also runs the commands in your ",[20,643,537],{},", and such a command can change other files. Use a dry run to see the generated changes first.",[614,646,540,648,650,651,654],{"label":647},"How is this different from the Kubb MCP server?",[14,649,44],{"href":43}," is a local process your editor starts with ",[20,652,653],{},"npx kubb mcp",". It needs no account. The Kubb Studio connector is a remote server that reaches the agents paired with your Studio organization, so it also works from Claude on the web.",[47,656,658],{"id":657},"see-also","See also",[660,661,662,667,671],"card-group",{},[663,664,666],"card",{"title":665,"to":75},"Connect a project to Kubb Studio","Pair an agent and choose what it shares.",[663,668,670],{"title":78,"to":669},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio#pair-with-a-code","How an agent pairs with a one-time code.",[663,672,674],{"title":673,"to":43},"Set up the MCP server","Run Kubb from your editor without Studio.",{"title":676,"searchDepth":677,"depth":677,"links":678},"",5,[679,681,682,686,689,690,691,692],{"id":49,"depth":680,"text":50},2,{"id":89,"depth":680,"text":90},{"id":202,"depth":680,"text":203,"children":683},[684],{"id":348,"depth":685,"text":349},3,{"id":179,"depth":680,"text":383,"children":687},[688],{"id":486,"depth":685,"text":487},{"id":548,"depth":680,"text":549},{"id":585,"depth":680,"text":586},{"id":608,"depth":680,"text":609},{"id":657,"depth":680,"text":658},"Add the Kubb Studio MCP connector to Claude, Claude Code, or another MCP client to run Kubb on your agents, look up generated code, and revoke access.","md",{"layout":696,"title":5,"description":693,"outline":697,"order":685,"navigation":698},"doc",[680,685],{"title":699,"icon":700},"Kubb Studio connector","i-iconoir-cube",{"layout":696,"outline":702},[680,685],{"title":699,"icon":700},"\u002Fdocs\u002F5.x\u002Fai\u002Fstudio",{"title":5,"description":693},{"loc":704},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fai\u002Fstudio.md","docs\u002F5.x\u002Fai\u002Fstudio","J77hUYK9Rny1X1Qe-hCFaUZXuC826kQODmbJ5EqXxQI",1796403009488,"3e3a576e-23a2-49f1-97f4-9c7fcd08986e"]