OpenAPI to MCP
A tool&lib that can automatically convert OpenAPI documents into Higress remote MCP server configurations.
What is OpenAPI to MCP?
OpenAPI to MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to tool&lib that can automatically convert openapi documents into higress remote mcp server configurations.
A tool&lib that can automatically convert OpenAPI documents into Higress remote MCP server configurations.
This server falls under the APIs and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A tool&lib that can automatically convert OpenAPI documents
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx openapi-to-mcpserverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use OpenAPI to MCP
openapi-to-mcpserver is a Go CLI tool and library that automatically converts OpenAPI 3.0 specification files (JSON or YAML) into Higress REST-to-MCP server configuration files, allowing any REST API with an OpenAPI spec to be exposed as an MCP server without manual configuration. It maps each API operation to a named MCP tool, preserves parameter descriptions and types, and supports YAML or JSON output with optional template patching and spec validation. API platform engineers and developers working with the Higress API gateway use it to rapidly make existing REST services queryable by AI assistants through the MCP protocol.
Prerequisites
- Go 1.20 or higher installed for building from source (or use the pre-built binary)
- An OpenAPI 3.0 specification file for the API you want to expose (JSON or YAML format)
- Higress API gateway deployed if you plan to host the resulting MCP server configuration
- Claude Desktop or another MCP-compatible client
Install the openapi-to-mcp CLI tool
Install the CLI using go install. This downloads and compiles the binary from the Higress group repository.
go install github.com/higress-group/openapi-to-mcpserver/cmd/openapi-to-mcp@latestPrepare your OpenAPI specification file
Ensure your OpenAPI 3.0 spec is in JSON or YAML format. The tool reads operationId, parameter names, descriptions, and schema types from the spec to generate tool definitions.
Convert the OpenAPI spec to MCP configuration
Run the openapi-to-mcp command with your input spec file and desired output path. Use --server-name to set the MCP server name.
openapi-to-mcp \
--input petstore.json \
--output petstore-mcp.yaml \
--server-name petstoreReview the generated MCP configuration
Open the output YAML file and verify that each API operation has been correctly mapped to an MCP tool with the right name, description, and parameter schema.
Deploy to Higress or configure as a remote MCP server
Apply the generated configuration to your Higress gateway to expose the REST API as a remote MCP server accessible to AI clients.
# Apply the MCP config to Higress
higress apply -f petstore-mcp.yamlValidate your spec before conversion (optional)
Use the --validate flag to check the OpenAPI spec for errors before converting. Use --format json for JSON output instead of the default YAML.
openapi-to-mcp \
--input myapi.yaml \
--output myapi-mcp.yaml \
--server-name my-api \
--validate \
--tool-prefix myapi_OpenAPI to MCP Examples
Client configuration
After deploying the generated config to Higress, connect Claude Desktop to the remote MCP endpoint.
{
"mcpServers": {
"petstore": {
"type": "http",
"url": "http://your-higress-gateway/mcp/petstore"
}
}
}Prompts to try
Once your REST API is exposed as an MCP server, these prompts exercise the converted tools.
- "List all pets available in the petstore with a limit of 10"
- "Show me the details for pet with ID 42"
- "Create a new pet named 'Buddy' with tag 'dog' in the petstore"
- "Convert my payments API OpenAPI spec to an MCP config with the prefix payments_"
- "What tools are available from the petstore MCP server?"Troubleshooting OpenAPI to MCP
go install fails with module not found error
Ensure Go 1.20+ is installed and GOPATH/bin is in your PATH. Run 'go version' to check. If the module path has changed, check the GitHub repository for the latest install command.
Generated MCP config has missing tool descriptions
The tool pulls descriptions from the 'description' and 'summary' fields in your OpenAPI spec. Add or improve these fields in your spec file before converting — operationId is also required for tool naming.
Higress rejects the generated configuration file
Run openapi-to-mcp with --validate to catch spec errors before conversion. Also verify your Higress version supports the REST-to-MCP plugin. Check the Higress documentation for the minimum required version.
Frequently Asked Questions about OpenAPI to MCP
What is OpenAPI to MCP?
OpenAPI to MCP is a Model Context Protocol (MCP) server that tool&lib that can automatically convert openapi documents into higress remote mcp server configurations. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install OpenAPI to MCP?
Follow the installation instructions on the OpenAPI to MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with OpenAPI to MCP?
OpenAPI to MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is OpenAPI to MCP free to use?
Yes, OpenAPI to MCP is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
OpenAPI to MCP Alternatives — Similar APIs Servers
Looking for alternatives to OpenAPI to MCP? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up OpenAPI to MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use OpenAPI to MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.