# bbonnin/openapi-to-mcp [Health: Active]

**Category:** 🔗 Aggregators  
**Repository:** https://github.com/bbonnin/openapi-to-mcp  
**GitHub Stars:** 7  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/bbonnin-openapi-to-mcp

## Description
MCP server that automatically converts any OpenAPI/Swagger specification into a set of usable MCP tools. Unlike manual tool definition, this approach auto-generates tools directly from the Swagger spec, ensuring consistency, reducing maintenance effort, and preventing mismatches between the tools and the actual API.

## Claude Desktop Quick Installation
Heuristic fallback — verify the package name and runner against the repository README before running it. Uses `npx` (confidence: low):

```json
"mcpServers": {
  "openapi-to-mcp": {
    "command": "npx",
    "args": ["-y","bbonnin-openapi-to-mcp"]
  }
}
```

## Documentation

## What bbonnin/openapi-to-mcp MCP server does

The bbonnin/openapi-to-mcp MCP server turns the operations described by an OpenAPI or Swagger document into MCP tools. Rather than requiring separate tool definitions for each REST endpoint, it reads the API specification and makes the described functions available through the Model Context Protocol.

The generated tools are intended for AI agents and other generative AI applications that need to call an OpenAPI-based service. The repository also includes an example centered on a fictional infrastructure API for managing virtual machines, along with an assistant application that accesses that API through MCP.

## How it works

At startup, the server loads the Swagger content from either a local file or an HTTP URL supplied as its OpenAPI location. It examines the API endpoints and creates structured tool definitions from them. When an MCP client invokes one of those tools, the server forwards the call to the corresponding REST API operation.

This approach keeps the exposed MCP operations derived from the API contract rather than from a separately maintained set of hand-written tool declarations. The source repository describes the process as dynamic: changing the supplied specification changes the tools available from the server.

## Setup and configuration

The documented launch method runs the packaged server JAR with Java and supplies the specification through the `openapi.location` option:

```shell
java -jar $PATH_TO_JAR/openapi-mcp-server.jar --openapi.location=<swagger-file-or-url>
```

The location can point to a Swagger/OpenAPI file or an HTTP endpoint. The example also shows the server being started from an IDE by launching the `OpenApiMcpServer` class and providing the OpenAPI location. A development Spring profile may be supplied for that example setup.

The repository contains separate example API and assistant components. The API component provides the sample virtual-machine service, while the assistant component demonstrates a chat application using that service through the MCP server.

## Tools and capabilities

The server provides MCP tools corresponding to the operations found in the supplied OpenAPI or Swagger specification. Its supported flow includes:

- Loading an API definition from a local file.
- Loading an API definition from an HTTP endpoint.
- Inspecting the specification's endpoints.
- Generating structured MCP tool definitions.
- Routing tool invocations to the described REST API.

The exact tool names and available operations depend on the supplied specification. The repository does not list a fixed, built-in tool catalog independent of that document.

## Limitations and notes

The available material does not describe authentication handling, supported OpenAPI versions, schema edge cases, transport configuration, or client-specific setup. It also does not provide a published package-manager command; the documented distribution path is a server JAR.

The bbonnin/openapi-to-mcp MCP server exposes operations from an existing API description, so the quality and coverage of the generated tools depend on the supplied specification. The example's infrastructure API is demonstration code and is not evidence of a built-in virtual-machine integration for other deployments.

_Full upstream README: https://allmcps.com/mcp/bbonnin-openapi-to-mcp/readme_

