Openapi Mcp Generator

•
645
•

Generates Model Context Protocol (MCP) servers from OpenAPI specifications, enabling AI agents to interact with existing REST APIs.

Openapi Mcp Generator is a CLI tool that automates the generation of MCP-compatible servers, allowing AI agents and other MCP clients to seamlessly interact with your APIs using various transport methods. It converts OpenAPI 3.0+ specifications into a Node.js project that proxies requests to existing REST APIs while validating request structure and security. Supporting multiple transport options like stdio, SSE via Hono, or StreamableHTTP, it offers authentication support, Zod validation, and typed TypeScript code output, making it a comprehensive solution for integrating your APIs with the Model Context Protocol.

主要功能

01Proxies calls to original REST API with validation
02Generates Zod schemas for runtime input validation
03Converts OpenAPI 3.0+ specs into MCP-compatible servers
04Supports API keys, Bearer tokens, Basic auth, and OAuth2 via environment variables
05Supports stdio, SSE via Hono, or StreamableHTTP transports
06139 GitHub stars

使用案例

01Enabling AI agents to interact with existing REST APIs
02Creating MCP-compatible servers for local development
03Generating typed TypeScript code for maintainable server implementations