Set up the MCP server
Kubb ships a Model Context Protocol server. It exposes code-generation tools to any MCP-capable client. Once connected, your editor or agent runs Kubb generation, validates schemas, and inspects configuration from the chat.
IMPORTANT
The built-in MCP server needs Kubb v5 or higher.
NOTE
This page covers using Kubb tooling inside your editor over MCP. To generate an MCP server from
your OpenAPI spec, see @kubb/plugin-mcp instead.
Starting the server
Run the server with one command. It communicates over stdio, the transport that every major LLM client speaks.
kubb mcpClient configuration
Claude Desktop
Add this to your claude_desktop_config.json. On macOS it usually lives at ~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"kubb": {
"command": "npx",
"args": ["kubb", "mcp"]
}
}
}Cursor
Open Settings → MCP and add a new server entry.
{
"mcpServers": {
"kubb": {
"command": "npx",
"args": ["kubb", "mcp"]
}
}
}VS Code (GitHub Copilot)
Add this to your .vscode/mcp.json for the workspace. For a global setup, run MCP: Open User Configuration in the Command Palette.
{
"servers": {
"kubb": {
"command": "npx",
"args": ["kubb", "mcp"]
}
}
}See also
kubb mcpcommand: CLI reference and transport details@kubb/plugin-mcpgenerates an MCP server from your OpenAPI spec