Connect Claude to Kubb Studio
The Kubb Studio connector is a remote Model Context Protocol server at https://mcp.kubb.studio/mcp. With it, Claude starts a Kubb run on an agent you paired with Kubb Studio, reports which files changed, and answers where Kubb generated a schema or an operation.
Kubb still runs on your machine. The connector sends the request to your agent, and the agent generates from the kubb.config.ts in its own checkout.
Before you connect
You need:
- A Kubb Studio account. It is free to start.
- A project with a
kubb.config.tsand Kubb 5.30.1 or later. A dry run and a lookup by tag need Kubb 5.31.0. - One agent paired with Studio. Run
kubb studioin the project, or let the client pair its own agent withkubb_studio_connect.
Add the connector
In Claude on the web or in the desktop app:
- Open Settings, then Connectors.
- Select Add custom connector.
- Enter the URL
https://mcp.kubb.studio/mcp. Leave the client ID and secret empty.
Run this in your terminal, then run /mcp in Claude Code to sign in:
claude mcp add --transport http kubb-studio https://mcp.kubb.studio/mcphttps://mcp.kubb.studio/mcp as a remote MCP server over Streamable HTTP. The client needs OAuth 2.1 with a client metadata document or dynamic client registration.The client opens Kubb Studio in your browser on its first call. Sign in, pick the organization the client works in, review its permissions, and select Approve.
In Studio, Settings, Organization, Integrations, Kubb Studio MCP shows the same steps with copy buttons.
Tools
Each tool is named after the Kubb CLI command it runs, with a kubb_studio_ prefix.
| Tool | What it does | Changes data |
|---|---|---|
kubb_studio_generate | Starts a run on one of your agents. With dryRun, it previews the changes and writes nothing. | Yes |
kubb_studio_get_run | Waits for a run and returns its status, the changed files, and Kubb's diagnostics. | No |
kubb_studio_lookup | Finds where Kubb generated a schema or an operation, and which operations use a schema. Also lists a route or a tag. | No |
kubb_studio_connect | Returns a one-time code, valid 5 minutes, so the client pairs a new agent in its own sandbox or on your machine. | Yes |
kubb_studio_list_agents | Lists the agents the client may run, and whether each is online. | No |
kubb_studio_list_projects | Lists the projects of the organization, with their agents and newest run. | No |
kubb_studio_list_runs | Lists past runs, with who started each and through which client. | No |
kubb_studio_list_snapshots | Lists the organization's snapshot packages that have not expired, with their install line. | No |
kubb_studio_generate 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.
Try it
Which of my Kubb agents are online?
Regenerate my API client with Kubb.
What would change in the generated code if I ran Kubb now?
Where did Kubb generate the Pet schema, and which operations use it?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.
Permissions
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.
| Permission | Lets the client | Default |
|---|---|---|
agent:generate | Run generations on your agents. | On, required |
agent:create | Pair its own Kubb agents. They run only for that client. | On |
agent:read | List your agents and projects, and see which agents are connected. | On |
run:read | Read your runs: their results, history, and the index of the generated code. | On |
snapshot:read | List the organization's snapshot packages. | On |
offline_access | Stay connected until you disconnect it. | On |
A tool whose permission is off answers with an error that names the permission. To grant it later, connect the client again.
The client works in one organization and runs only your own agents, plus the agents it paired itself.
What your agent shares
An agent's own permissions decide what leaves your machine, whatever the client was granted:
- Without
--allow-read, Studio gets file paths and hashes and no file content. A run has no diff, and a dry run is refused. - With
--allow-read-ast, Studio reads the spec as Kubb parsed it, even without--allow-read. Without it, the agent sends no code index, andkubb_studio_lookupanswers how to turn it on. - Without
--allow-write, a run leaves your output folder unchanged. - With
--allow-execand--allow-write, a run without errors also runs the formatter, the linter, and the commands inoutput.postGenerate.
The Kubb Studio privacy policy lists what a connected client can read and how long Studio keeps it.
Revoke access
- In Studio, open Settings, Organization, Integrations, Kubb Studio MCP.
- On the Sessions tab, find the client and select Revoke.
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.
To remove the connector from Claude as well, delete it under Settings, Connectors.
Limits
- 100 requests a minute per connected client.
- A run's result, file hashes, and code index stay available for one hour. After that, start a new run.
kubb_studio_list_runslists runs for 90 days.- A config with several entries runs its first, unless the call names one with
config.
FAQ
kubb_studio_list_agents answers an empty list until an agent is paired. Run kubb studio in your project and approve the pairing code, or ask Claude to pair an agent, which calls kubb_studio_connect.kubb.config.ts in the agent's checkout, and only when the agent runs with --allow-write. One exception: an agent with --allow-exec also runs the commands in your output.postGenerate, and such a command can change other files. Use a dry run to see the generated changes first.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.