Skip to content
AI assistants

Connect Claude to Kubb Studio

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.

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.

This connector works with your Kubb Studio account. To run Kubb inside your editor without Studio, use the local Kubb MCP server instead.

Before you connect

You need:

  • A Kubb Studio account. It is free to start.
  • A project with a kubb.config.ts and 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 studio in the project, or let the client pair its own agent with kubb_studio_connect.

Add the connector

In Claude on the web or in the desktop app:

  1. Open Settings, then Connectors.
  2. Select Add custom connector.
  3. Enter the URL https://mcp.kubb.studio/mcp. Leave the client ID and secret empty.

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.

ToolWhat it doesChanges data
kubb_studio_generateStarts a run on one of your agents. With dryRun, it previews the changes and writes nothing.Yes
kubb_studio_get_runWaits for a run and returns its status, the changed files, and Kubb's diagnostics.No
kubb_studio_lookupFinds where Kubb generated a schema or an operation, and which operations use a schema. Also lists a route or a tag.No
kubb_studio_connectReturns 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_agentsLists the agents the client may run, and whether each is online.No
kubb_studio_list_projectsLists the projects of the organization, with their agents and newest run.No
kubb_studio_list_runsLists past runs, with who started each and through which client.No
kubb_studio_list_snapshotsLists 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

Claude
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.

PermissionLets the clientDefault
agent:generateRun generations on your agents.On, required
agent:createPair its own Kubb agents. They run only for that client.On
agent:readList your agents and projects, and see which agents are connected.On
run:readRead your runs: their results, history, and the index of the generated code.On
snapshot:readList the organization's snapshot packages.On
offline_accessStay 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, and kubb_studio_lookup answers how to turn it on.
  • Without --allow-write, a run leaves your output folder unchanged.
  • With --allow-exec and --allow-write, a run without errors also runs the formatter, the linter, and the commands in output.postGenerate.

The Kubb Studio privacy policy lists what a connected client can read and how long Studio keeps it.

Revoke access

  1. In Studio, open Settings, Organization, Integrations, Kubb Studio MCP.
  2. 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_runs lists runs for 90 days.
  • A config with several entries runs its first, unless the call names one with config.

FAQ

See also

Connect a project to Kubb Studio

Pair an agent and choose what it shares.

kubb studio

How an agent pairs with a one-time code.

Set up the MCP server

Run Kubb from your editor without Studio.