Openapi To MCP logo

Openapi To MCP

by bbonnin

Generates MCP tools from a local or remote OpenAPI/Swagger specification and routes calls to the described REST API.

Install Openapi To MCP

Run the project’s own setup commands, in order.

Setup steps from the project

bbonnin/openapi-to-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Start the server
    java -jar $PATH_TO_JAR/openapi-mcp-server.jar --openapi.location=<swagger file or URL>
    

Overview

bbonnin/openapi-to-mcp MCP server converts an OpenAPI or Swagger specification into structured MCP tool definitions. It loads the specification from a local file or HTTP endpoint, analyzes its API endpoints, and routes incoming tool calls to the underlying REST service. Reach for it when an API already has an OpenAPI description and you want to expose its operations to an MCP-compatible agent without manually defining each tool.

Use cases

  • Expose an existing OpenAPI-described REST service to an MCP client
  • Generate agent tools from a local Swagger file
  • Connect an MCP workflow to an API definition hosted at an HTTP URL
  • Prototype an assistant that calls a sample infrastructure API

Key features

  • Generates MCP tools from OpenAPI or Swagger endpoints
  • Loads specifications from local files or HTTP URLs
  • Routes tool calls to the underlying REST API
  • Creates structured tool definitions dynamically
  • Includes a virtual-machine infrastructure API example

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars8Stargazers on the source repository.
Last commit11mo agoMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Openapi To MCP works

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

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Openapi To MCP

It does not provide a package-manager installation command.

Start the JAR with `--openapi.location` set to the OpenAPI or Swagger file location. The documented value may be a local file or an HTTP endpoint.

It analyzes the endpoints in the supplied OpenAPI or Swagger specification, creates structured MCP tool definitions, and routes tool calls to the corresponding REST API operations.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOpenapi To MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bbonnin-openapi-to-mcp?style=directory)](https://allmcps.com/mcp/bbonnin-openapi-to-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/bbonnin-openapi-to-mcp"><img src="https://allmcps.com/api/badge/bbonnin-openapi-to-mcp?style=directory" alt="Openapi To MCP on AllMCPs" /></a>