Skip to content
Commands

kubb mcp

The mcp command starts a Model Context Protocol server so LLM clients can interact with your schemas and trigger generation.

Run kubb mcp to start a Model Context Protocol server. LLM clients such as Claude, Cursor, and VS Code can then read your schemas and trigger generation.

This feature is under active development. Use it with caution and expect breaking changes.
kubb mcp

The server speaks stdio, the transport every major MCP client supports. Set up the MCP server shows the client configuration.

Tools

ToolParametersDescription
generateconfig? (path to a config file, default kubb.config.{ts,js,cjs} in the current directory), input? (spec path, overrides the config), output? (output directory, overrides the config), logLevel? (silent, info, verbose, default info)Runs the Kubb pipeline and streams log messages back to the client.
validateinput (path or URL, required)Validates an OpenAPI or Swagger document with the bundled OpenAPI adapter.
initinput? (default ./openapi.yaml), output? (default ./src/gen), plugins? (comma-separated, such as plugin-ts,plugin-zod)Writes a kubb.config.ts in the current directory without prompts. It does not install packages.

See also