kubb
๐งก The meta framework for code generation. Automate OpenAPI to type-safe TypeScript, Zod, and TanStack Query with a modular, plugin-based engine.
Kubb is a meta-framework for code generation that integrates with Claude Code and other AI tools through an MCP server. It transforms OpenAPI specifications into type-safe TypeScript clients, Zod validators, TanStack Query hooks, and mock data using a modular plugin architecture. Developers point Kubb at an API schema and automatically generate complete type-safe API layers, eliminating manual boilerplate and keeping frontend code synchronized with backend contracts.
Key Features
Use Cases
- 01Generate complete type-safe API clients from OpenAPI specifications for frontend applications
- 02Automate creation of React Query or SWR hooks for data fetching with full TypeScript support
- 03Scaffold Zod schemas for runtime validation matching backend API contracts
- 04Generate mock data with Faker and MSW handlers for testing without backend dependencies
- 05Keep frontend code synchronized with backend APIs through automated regeneration on schema changes
- 06Use Claude Code or Cursor to generate and customize API integrations through natural language
Related Plugins
View moreandrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
claude-mem
Persistent Context Across Sessions for Every Agent โ Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
kubb โ FAQ
What is Kubb?+
Kubb is a code generation meta-framework that transforms OpenAPI schemas into type-safe TypeScript clients, validators, hooks, and mocks. It includes an MCP server for integration with AI tools like Claude Code and Cursor.
How do I install Kubb?+
Install Kubb via npm, pnpm, or bun (e.g., 'npm install kubb'). Run 'npx kubb init' to launch the setup wizard, which guides you through plugin selection and creates a kubb.config.ts configuration file. Then run 'npx kubb generate' to produce your code.
Which AI clients does Kubb work with?+
Kubb works with Claude Code, Cursor, and Claude Desktop through its built-in MCP server. The plugin-mcp module enables AI-driven code generation from these tools.
Does Kubb require API keys or external services?+
Kubb itself does not require API keys to generate code from local OpenAPI files. However, if your OpenAPI schema is hosted remotely or you use AI features through Claude/Cursor, those services may require authentication.
Is Kubb free to use?+
Yes, Kubb is open source and licensed under the MIT License. It is free for commercial and personal use.
Can I customize the generated code?+
Yes, Kubb provides a plugin authoring toolkit (kubb/kit) with a JSX renderer for building custom generators. You can enable or disable plugins, filter operations, and control file organization through kubb.config.ts.
How do I install kubb?+
Open the source repository on GitHub and follow its README. kubb is a plugin โ MCP Agents Market links you directly to the official repo.
Is kubb free?+
kubb is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.