Skip to main content

OpenAPI MCP Codegen

Generate type-safe MCP tools from OpenAPI specifications

OpenAPI MCP Codegen Logo

Type-Safe Generation

Generate type-safe Kotlin code using KotlinPoet from OpenAPI 3.0/3.1 specifications

MCP Integration

Automatically generate Quarkus MCP tools with @Tool and @ToolArg annotations for AI/LLM integration

Ready to Use

Includes Gradle wrapper and build configuration in generated output with optional auto-compilation

Quick Start

Generate MCP tools from any OpenAPI specification in seconds:

java -jar openapi-mcp-codegen.jar \
  --input petstore.yaml \
  --output ./generated \
  --root-package io.swagger.petstore