Skip to content

kubb mcp

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.

WARNING

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

kubb mcp

Usage

Start the MCP server over stdio, the transport every major LLM client speaks:

Terminal
shell
kubb mcp

Tools

The MCP server exposes three tools to connected clients.

Tool Description
generate Runs the Kubb pipeline against a resolved kubb.config.ts and streams log messages back to the client.
validate Validates an OpenAPI or Swagger document at a path or URL. Needs @kubb/adapter-oas installed in the project.
init Scaffolds a kubb.config.ts in the current directory without prompts. It does not install packages.

Example

Most MCP clients accept a JSON config with command and args. Register the Kubb MCP server over stdio:

mcp.json
json
{
  "mcpServers": {
    "kubb": {
      "command": "npx",
      "args": ["kubb", "mcp"]
    }
  }
}

See also