openapi-to
Transform OpenAPI specifications into production-ready MCP servers with AI-powered evaluation and enhancement. Leverages LLMs to analyze, improve, and generate Model Context Protocol implementations from your existing API documentation.
claude mcp add --transport stdio agentic-community-openapi-to-mcp python -m openapi_to_mcp \ --env LOG_LEVEL="INFO" \ --env OPENAPI_SPEC_PATH="path_or_url_to_openapi_spec (required at runtime)"
How to use
OpenAPI to MCP Converter turns an OpenAPI/Swagger specification into a production-ready MCP server, with AI-powered evaluation, enhancement suggestions, and an accompanying MCP client. The tool analyzes the input specification for completeness, security considerations, and AI-readiness, then either enhances the spec or directly generates a fully functioning MCP server package along with a test client. You’ll get an organized output package that includes usage instructions, tool specifications for each operation, and evaluation reports to understand how the MCP server performs and how to improve it.
Usage scenarios include converting a local OpenAPI file or a URL to an MCP server, inspecting the generated tool definitions, and running the produced Python MCP server with the built-in client for testing. The tool emphasizes AI-assisted improvement, so expect enhancement suggestions to address missing descriptions, parameter constraints, error handling, and security considerations before generation.
How to install
Prerequisites:
- Python 3.12 or higher
- Git
- Optional: uv (for related tooling), if you plan to run adjacent utilities
Installation steps:
- Clone the repository: git clone https://github.com/agentic-community/openapi-to-mcp.git cd openapi-to-mcp
- Create and activate a virtual environment:
python -m venv venv
On Windows
venv\Scripts\activateOn macOS/Linux
source venv/bin/activate - Install dependencies (from project root):
pip install -r requirements.txt
Or rely on your environment’s package manager as appropriate
- Run the converter with your OpenAPI specification (example): python -m openapi_to_mcp --spec /path/to/openapi.yaml --output ./output
- Review the generated MCP server package in the output directory and follow the provided README inside for deployment instructions.
Notes:
- If you prefer, you can install and run via a package manager if a distribution is available (see npm_package field if this were Node-based).
- Ensure your OpenAPI spec is accessible (local file or URL) and valid before running.
Additional notes
Tips and common considerations:
- The converter performs AI-assisted analysis; provide a high-quality OpenAPI spec to improve results.
- Review the generated evaluation reports to understand scores on completeness, security, and AI-readiness.
- The output includes a ready-to-run Python MCP server and a client for testing; use the included tool specifications to map each operation to MCP tools.
- If environment variables are required for your deployment (e.g., API keys, credentials), set them in the mcp_config env field or your deployment environment accordingly.
- Be mindful of Bedrock Guardrails or other prompt-injection protections when running AI-assisted tooling in production settings.
Related MCP Servers
neurolink
Universal AI Development Platform with MCP server integration, multi-provider support, and professional CLI. Build, test, and deploy AI applications with multiple ai providers.
lc2mcp
Convert LangChain tools to FastMCP tools
local -gateway
Aggregate multiple MCP servers into a single endpoint with web UI, OAuth 2.1, and profile-based tool management
cadre-ai
Your AI agent squad for Claude Code. 17 specialized agents, persistent memory, desktop automation, and a common sense engine.
xcode
MCP server for Xcode - enables AI assistants to create, build, test, and manage iOS/macOS projects programmatically
mwilliams_mcpbridge
MCP Bridge - 99% context reduction for AI agents. Consolidates multiple MCP servers behind lazy-loading meta-tools. Result compaction, schema caching, health checks.