kubb mcp
kubb mcp starts a Model Context Protocol server, so your AI client can validate a spec, write a kubb.config.ts, and generate code. It takes no options. Set up the MCP server shows how to add it to Claude Code, Cursor, VS Code, and other clients.
The server uses the stdio transport, so the client starts it as a local process. Its own messages go to stderr, since stdout carries the protocol.
Tools
| Tool | What it does |
|---|---|
generate | Runs the Kubb pipeline from the project's config. |
validate | Validates an OpenAPI or Swagger document. |
init | Writes a kubb.config.ts without prompts. |
generate
Runs the Kubb pipeline and returns the file count, warnings, and diagnostics. On failure, each diagnostic comes with its code, fix, and docs link. A config that exports an array runs its first entry.
.ts, .mts, .cts, .js, .mjs, or .cjs config file inside the working directory. Without it, the server searches the way kubb generate does.input.output.path.info.validate
Validates an OpenAPI or Swagger document with the bundled OpenAPI adapter. It does not read the config.
init
Writes a kubb.config.ts with an empty plugins array to the working directory, and fails when one exists. It installs nothing. Its reply tells the agent to run kubb add <id> --yes for each plugin.
./openapi.yaml../src/gen.Working directory
The server runs in the folder the client starts it in:
generatelooks for the config there, then in each parent folder.generaterejects aconfigpath outside that folder.initwriteskubb.config.tsthere.
When the server cannot find your config, see Start it in your project.
