SuperAPI AI Directory

openapi-to-mcp

Converts any OpenAPI/Swagger specification into MCP tools automatically.

Open website

About this tool

OpenApiMCPServer is an MCP server whose core purpose is to automatically convert any OpenAPI/Swagger specification into a set of usable MCP tools. By analyzing all endpoints in the API definition, it generates structured tool definitions and routes tool calls to the underlying REST API, thereby enabling AI agents to instantly interact with any OpenAPI-based service without manually writing tool code.

Main capabilities:

  • Automatic conversion: reads OpenAPI/Swagger specifications (supporting local files or HTTP endpoints), dynamically loads Swagger content, and exposes API functionality through the MCP protocol.
  • No recoding required: the converted tools can be used directly in generative AI architectures, without manually writing tool code for each API.
  • Dynamic loading: the server can dynamically load Swagger content both at startup and at runtime.

The project contains the following modules:

  • openapi-mcp-server: the core application, which serves as an MCP server providing the tools defined in the OpenAPI definition. The OpenAPI definition can be provided as a local file or an HTTP endpoint. The server dynamically loads Swagger content and provides API functionality through the MCP protocol, making it usable in generative AI architectures without recoding.
  • openapi-mcp-example: a simple example, divided into two parts. The api package contains a simulated infrastructure API for managing virtual machines, which will be called by the OpenAPI MCP Server; the assistant package contains an assistant with a simple chat, which will use the infrastructure API by accessing that API through the MCP server.

Usage (based on the example):

  1. Start the MCP server: run the OpenApiMcpServer class in the IDE, and provide the OpenAPI location and, if needed, the Spring profile dev.
  2. Start the example parts: run the InfrastructureApiServer class in the IDE, as well as the InfraAssistantApp class (requires providing the LLM URL and MCP server).

Applicable scenarios:

  • Scenarios where AI agents need to quickly connect to existing OpenAPI services.
  • Development workflows whereyou want to avoid manually writing tool definitions for each API.
  • Integrating REST API functionality in generative AI architectures.

Limitations:

  • The materials do not provide more details about fees, pricing, platform support, performance results, or specific usage steps.
  • The materials do not provide installation commands or dependency requirements.