DEV.co
MCP Servers · kubb-labs

kubb

Kubb is a TypeScript code generation framework that automates creation of type-safe API clients, validators, and hooks from OpenAPI schemas. It uses a plugin-based architecture supporting multiple HTTP libraries (Axios, Fetch), state management solutions (TanStack Query, SWR, Vue Query), and validation frameworks (Zod, Faker, MSW).

Source: GitHub — github.com/kubb-labs/kubb
1.8k
GitHub stars
146
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorykubb-labs/kubb
Ownerkubb-labs
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars1.8k
Forks146
Open issues6
Latest release[email protected] (2026-07-07)
Last updated2026-07-08
Sourcehttps://github.com/kubb-labs/kubb

What kubb is

Plugin-driven meta-framework for schema-to-code generation, ingesting OpenAPI 2.0/3.0/3.1 and outputting TypeScript types, HTTP clients with status-keyed results, validation schemas, and mock handlers. Supports JSX-based custom renderers, integrates with bundlers via unplugin, and exposes an MCP server for AI-driven generation.

Quickstart

Get the kubb source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/kubb-labs/kubb.gitcd kubb# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Type-Safe API Client Generation at Scale

Teams maintaining multiple microservices or integrating numerous third-party APIs can generate consistent, type-safe clients across codebases. Eliminates manual type definition drift and reduces API integration boilerplate.

Full-Stack Type Alignment

Frontend and backend teams using shared OpenAPI contracts can generate matching TypeScript types, validators, and mocks in a single pass, enforcing runtime safety and reducing contract-schema misalignment bugs.

Rapid Prototyping and Schema Evolution

Development teams can regenerate clients, hooks, and mocks whenever the OpenAPI spec changes, accelerating iteration cycles and ensuring tooling stays synchronized with API evolution.

Implementation considerations

  • Beta release status (5.0.0-beta.87 as of 2026-07-08): production use should assess stability and breaking-change risk relative to your deployment schedule.
  • Plugin selection and configuration required: evaluate which plugins (ts, axios, react-query, zod, etc.) align with your stack before initial setup.
  • OpenAPI schema quality upstream: output fidelity depends on well-formed, consistent OpenAPI specs; malformed or incomplete schemas may require manual post-generation fixes.
  • Custom adapter and renderer authoring possible via `kubb/kit`: advanced customization is feasible but adds maintenance burden if templates diverge from core plugin logic.
  • Integration with bundlers (Vite, Nuxt, Astro, webpack) adds toolchain coupling; verify unplugin-kubb compatibility with your build setup.

When to avoid it — and what to weigh

  • GraphQL-First Architecture — Kubb is OpenAPI-centric. GraphQL APIs require alternative code generation tools; no native GraphQL input adapter is listed.
  • Non-TypeScript Ecosystems — Output is TypeScript-only. If your stack is Python, Go, Java, or polyglot non-TS backends, Kubb does not reduce friction for those targets.
  • Minimal or No Customization Tolerance — The plugin system and JSX renderer introduce configuration overhead. Teams seeking zero-config, one-click generation may find setup and plugin selection burdensome.
  • Legacy Non-OpenAPI Schemas — Kubb requires OpenAPI adapters. Proprietary, RAML, or API Blueprint schemas need custom adapters or manual conversion to OpenAPI.

License & commercial use

MIT License (permissive, OSI-compliant). Allows commercial use, modification, distribution, and private use with no warranty. Attribution appreciated but not legally required.

MIT permits commercial use without restriction or license cost. No proprietary or commercial-use clauses present. However, Kubb itself is community-funded via sponsorships and GitHub/Open Collective support; commercial deployments should consider sponsoring the maintainer(s) for long-term sustainability.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Generated code is TypeScript and inherits security from chosen HTTP libraries (Axios, Fetch) and validation frameworks (Zod). OpenAPI schema injection vectors should be reviewed if schemas come from untrusted sources. Auth, file upload, and SSE support noted but implementation security depends on plugin-specific details and user code. No security audit or vulnerability disclosure policy mentioned in provided data.

Alternatives to consider

OpenAPI Generator (openapi-generator-cli)

Mature, language-agnostic, extensive template library; lacks built-in plugin system and TypeScript-first focus. Steeper learning curve for customization.

Swagger Codegen

Official Swagger/OpenAPI tool with broad language support; less opinionated about TypeScript ecosystem integrations (React Query, TanStack, Zod). Slower iteration on modern JS/TS conventions.

tRPC Code Generation (e.g., tRPC-OpenAPI or similar)

If your backend is tRPC-native, in-language code generation avoids OpenAPI translation overhead. Not suitable for external API integration or polyglot teams.

Software development agency

Build on kubb with DEV.co software developers

Kubb streamlines TypeScript client generation from OpenAPI schemas. Our team can assess your schema maturity, select plugins, and integrate generation into your CI/CD pipeline.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

kubb FAQ

Can Kubb generate code for GraphQL APIs?
No, Kubb is OpenAPI-focused. GraphQL code generation requires tools like GraphQL Code Generator or Apollo Codegen.
Is the generated code tree-shakeable and production-ready?
Generated TypeScript is standard; tree-shakeability depends on plugin output and bundler config. Beta status (5.0.0-beta.87) means monitor release notes for breaking changes before production lock-in.
Can I customize generated code templates?
Yes, via custom plugins and JSX renderers using `kubb/kit`. Core plugins are modular; for simple overrides, file naming and storage backends offer some flexibility; complex overrides require authoring custom generators.
Do I need to version-control generated files?
Not required. Many teams regenerate on every schema change (CI/CD step) and discard old artifacts. Versioning depends on your release cycle and whether consumers depend on stable file paths.

Work with a software development agency

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If kubb is part of your mcp servers roadmap, our team can implement, customize, migrate, and maintain it.

Ready to Automate Your API Integration?

Kubb streamlines TypeScript client generation from OpenAPI schemas. Our team can assess your schema maturity, select plugins, and integrate generation into your CI/CD pipeline.