Mcpgen icon

Mcpgen

6

Generates production-ready Model Context Protocol (MCP) server boilerplate from OpenAPI specifications, enabling exposure of existing APIs as powerful tools for AI agents.

About

Mcpgen is a command-line tool that bridges the gap between OpenAPI specifications and MCP server implementation. It automates the generation of Go boilerplate code, including server initialization, tool registration, and handler skeletons. By translating OpenAPI schemas into JSON Schemas and creating detailed markdown response templates, Mcpgen simplifies the process of exposing APIs as AI agent tools, enabling developers to focus on integrating their core logic.

Key Features

  • Generates comprehensive MCP server boilerplate from OpenAPI specifications.
  • Optionally generates a Go HTTP client and corresponding Go types for simplified implementation.
  • 6 GitHub stars
  • Automatically translates OpenAPI schemas into JSON Schemas for tool inputs and markdown-based response templates.
  • Supports complex OpenAPI schema constructs, including arrays, nested structures, and type unions.
  • Produces well-structured, idiomatic Go code with embedded schemas and prompts.

Use Cases

  • Exposing existing APIs as tools for AI agents.
  • Rapidly prototyping MCP servers based on OpenAPI definitions.
  • Automating the creation of JSON Schemas and markdown templates for AI agent interaction.
Craft Better Prompts with AnyPrompt
Sponsored