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.
Usage
Start the MCP server over stdio, the transport every major LLM client speaks:
shell
kubb mcpTools
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:
json
{
"mcpServers": {
"kubb": {
"command": "npx",
"args": ["kubb", "mcp"]
}
}
}See also
- MCP integration guide: connect the server to Claude Desktop, Cursor, and other clients
@kubb/plugin-mcp, a different package that generates an MCP server from your OpenAPI spec- Concepts: Plugins: how plugins integrate with the Kubb pipeline