OpenAPI to MCP Server

OpenAPI to MCP Server

Automatically converts any OpenAPI specification into an MCP server, exposing all HTTP endpoints as callable tools with support for various authentication methods and request types.

Category
Visit Server

README

OpenAPI to MCP Server

简体中文 | English

This project spins up a Model Context Protocol (MCP) server directly from the supplied openapi.yaml, using uv for dependency management. Every HTTP endpoint becomes an MCP tool that AnythingLLM (or any MCP-aware client) can call.

Quick Start

  1. Install dependencies

    uv sync
    
  2. Configure openapi2mcpserver/config.yaml

    base_url: "https://localhost:12001"
    verify_ssl: false
    openapi_path: "../openapi.yaml"           # Optional, defaults to the repo root copy
    log_file: "../logs/openapi2mcpserver.log" # Optional, enables file logging
    log_level: "INFO"                         # Optional, supports DEBUG/INFO/WARNING/ERROR
    
    auth:
      mode: "basic"                           # Options: none/basic/bearer/header/query
      username: "your-username"
      password: "your-password"
      # basic_token: "cHJlLWVuY29kZWQtY3JlZHM="
      # extra_headers:
      #   X-API-Version: "1"
    
    # default_headers:
    #   X-Request-Source: "mcp"
    
  3. Start the MCP server

    uv run openapi2mcpserver
    

Using This MCP Server in AnythingLLM

The steps below target the AnythingLLM desktop plugin system and list the default paths for macOS and Windows. Create the file if it does not exist and replace the sample paths with the values on your machine.

macOS

  1. Open ~/Library/Application Support/anythingllm-desktop/storage/plugins/anythingllm_mcp_servers.json

  2. Add or merge the following configuration:

    {
      "mcpServers": {
        "rhino-agent": {
          "command": "/Users/<你的用户名>/.local/bin/uv",
          "args": ["run", "--project", "/Users/<你的用户名>/workspace/AIProjects/openapi2mcpserver", "openapi2mcpserver"]
        }
      }
    }
    

Windows

  1. Open %APPDATA%\anythingllm-desktop\storage\plugins\anythingllm_mcp_servers.json

  2. If you use uv.exe, replace the path with the output of where uv, for example:

    {
      "mcpServers": {
        "rhino-agent": {
          "command": "C:\\Users\\<YourUser>\\AppData\\Roaming\\Python\\Scripts\\uv.exe",
          "args": ["run", "--project", "C:\\Users\\<YourUser>\\workspace\\AIProjects\\openapi2mcpserver", "openapi2mcpserver"]
        }
      }
    }
    

Restart AnythingLLM (or reload plugins in settings) after saving, and you should see rhino-agent available in the tool list for your workspace.

Highlights

  • Automatically parses every OpenAPI path and registers a matching MCP tool
  • Exposes OpenAPI_GetSchema to inspect components.schemas
  • Tool inputs cover path params, query params, headers, and request bodies
  • Flexible authentication (none/basic/bearer/custom header/query) plus global default headers
  • Structured logging to both console and file for easier LLM troubleshooting

Layout

openapi2mcpserver/
    __init__.py
    __main__.py
    client.py
    config.py
    openapi_loader.py
    server.py

Runtime Notes

At startup the server ingests the OpenAPI description, builds JSON Schema input for every tool, and forwards calls to the upstream API. Responses (status, headers, and JSON/text bodies) are returned verbatim to the MCP client so you can chain follow-up actions such as polling task status.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured