About
OpenAPI2Mcp is a command‑line tool that parses OpenAPI 3.x specifications and generates FastMCP server code, supporting multiple transports (stdio, Google Pub/Sub) and optional LLM descriptions.
Capabilities

Overview
The openapi2mcp tool bridges the gap between standard API definitions and the Model Context Protocol (MCP), enabling developers to expose existing OpenAPI 3.x services as fully‑featured MCP servers with minimal effort. By parsing a JSON or YAML specification, it automatically generates Python code that implements the required MCP endpoints—resources, tools, prompts, and sampling logic—so an AI assistant can discover and invoke the API’s capabilities as if they were native language constructs. This eliminates manual boilerplate, reduces errors, and guarantees that the generated server adheres to MCP’s strict interface contracts.
For developers building AI‑powered applications, having an MCP server that mirrors a legacy REST API is invaluable. It allows language models to understand and interact with the API through natural language, turning arbitrary endpoints into callable tools. The generated file supplies the model with concise, human‑readable descriptions of each tool and resource, ensuring smooth prompt engineering and accurate intent recognition. The result is a seamless integration where an AI assistant can, for example, retrieve user data or trigger workflows without any custom glue code.
Key features include:
- Transport flexibility: choose between or , covering local, cloud‑native, and streaming scenarios.
- Mount path configuration: prepend a custom base URL (, ) so the generated server can coexist with other services.
- Automated validation: the command scans the produced Python file for syntax correctness and MCP pattern compliance, catching issues early in the CI pipeline.
- Extensible output: developers can add or modify generated modules to incorporate custom business logic while preserving the MCP contract.
Typical use cases span from rapid prototyping of AI assistants that need to call internal microservices, to production deployments where a legacy API must be exposed through an MCP gateway for multimodal agents. By converting OpenAPI specs to MCP servers, teams can leverage their existing API documentation and tooling ecosystem while unlocking advanced conversational capabilities.
Related Servers
Netdata
Real‑time infrastructure monitoring for every metric, every second.
Awesome MCP Servers
Curated list of production-ready Model Context Protocol servers
JumpServer
Browser‑based, open‑source privileged access management
OpenTofu
Infrastructure as Code for secure, efficient cloud management
FastAPI-MCP
Expose FastAPI endpoints as MCP tools with built‑in auth
Pipedream MCP Server
Event‑driven integration platform for developers
Weekly Views
Server Health
Information
Explore More Servers
SearXNG MCP Server
Meta‑search for AI agents with privacy and extensibility
CouchDB MCP Server
AI‑friendly interface for CouchDB management and queries
Bitpin Exchange MCP Server
MCP server for Bitpin API trading and market data
Lspace MCP Server
Persistent AI knowledge across tools
Office PowerPoint MCP Server
Powerful Python-PPTX manipulation for dynamic presentations
ToDo App MCP Server
Simple task management for quick to-do lists