MCP Catalogs
Home

openapi-to-mcp

by EvilFreelancer·16·Score 42

OpenAPI-to-MCP converts any OpenAPI/Swagger API into MCP tools with HTTP execution.

developer-toolsai-llmother
3
Forks
0
Open issues
3 mo ago
Last commit
2d ago
Indexed

Overview

This is a standalone proxy that transforms OpenAPI/Swagger-defined HTTP APIs into MCP servers, creating one MCP tool per API endpoint. It loads the OpenAPI specification at startup, allows filtering operations via include/exclude parameters, and registers each operation as an MCP tool. Tool calls are executed as HTTP requests to the backend API. The project supports both file-based and URL-based OpenAPI specifications, with comprehensive logging and correlation ID support.

Try asking AI

After installing, here are 3 things you can ask your AI assistant:

you:Enabling AI clients to interact with existing REST APIs through MCP
you:Creating MCP interfaces for legacy systems with OpenAPI documentation
you:Bridging AI systems with enterprise REST APIs securely

When to choose this

Choose this when you have an existing REST API with OpenAPI documentation and want to quickly enable AI clients to interact with it without backend modifications.

When NOT to choose this

Don't choose this if you need complex authentication flows beyond Basic Auth/Bearer tokens, or if your API requires significant customization for AI clients.

Comparable tools

mcp-openapi-proxyopenapi-mcp-generatoropenapi-mcp-proxy

Installation

Installation

With npm (local)

  1. Copy .env.example to .env and set required variables:

``bash cp .env.example .env # Edit .env: MCP_OPENAPI_SPEC, MCP_API_BASE_URL ``

  1. Install and run:

``bash npm ci npm run build npm run start ``

With Docker

docker run --rm -p 3100:3100 \
  -e MCP_OPENAPI_SPEC=http://your-api/openapi.json \
  -e MCP_API_BASE_URL=http://your-api \
  evilfreelancer/openapi-to-mcp:latest

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "openapi-mcp": {
      "command": "npx",
      "args": ["openapi-to-mcp"],
      "env": {
        "MCP_OPENAPI_SPEC": "http://your-api/openapi.json",
        "MCP_API_BASE_URL": "http://your-api"
      }
    }
  }
}

Compare openapi-to-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.