openapi-mcp

openapi-mcp

Point it at an OpenAPI 3.x document and get an MCP server that exposes the API's endpoints as typed, validated tools for Claude or any MCP client.

Category
Visit Server

README

openapi-mcp

Point it at an OpenAPI 3.x document and get an MCP server that exposes the API's endpoints as typed, validated tools for Claude or any MCP client.

pip install -e .

OPENAPI_SPEC=./openapi.json \
OPENAPI_AUTH_KIND=bearer OPENAPI_AUTH_VALUE=$TOKEN \
python -m openapi_mcp

Each operation in the spec becomes one tool. Parameter schemas come from the spec itself, so the model sees real types and required fields instead of a free-text prompt.

Design choices

  • The model cannot call the API wrongly. Every parameter carries its real JSON Schema, required fields are marked required, and unknown arguments are rejected rather than silently dropped. A tool that quietly ignores an argument is worse than one that errors, because the model believes it worked.
  • Errors are written for a model, not a human with a debugger. An AI client cannot read a stack trace, but it can read "404, the user id does not exist". Failures come back as short factual sentences naming the status and the API's own message. Secrets never appear in them.
  • The whole test suite runs offline. Transport is injected behind a Protocol, so tests run against a fake with no network and no cassettes. PYTHONPATH=src python -m pytest tests/ -q
  • Credentials are environment-only. Command line arguments end up in shell history and in ps output; environment variables do not.

Auth

OPENAPI_AUTH_KIND is one of none, bearer, header, or query, with OPENAPI_AUTH_VALUE and (for header/query) OPENAPI_AUTH_NAME.

Scope, stated plainly

This handles the OpenAPI subset that real-world REST APIs actually use: local $ref, path, query and header parameters, JSON request bodies. It does not resolve remote or URL $ref, and it does not attempt full JSON Schema composition (allOf and oneOf pass through as-is). Unsupported input raises, it never silently degrades. Cookie parameters are parsed but rejected at tool build time, because sending cookies on a machine-driven call is a footgun.

Claude Desktop config

{
  "mcpServers": {
    "my-api": {
      "command": "python",
      "args": ["-m", "openapi_mcp"],
      "env": {
        "OPENAPI_SPEC": "/path/to/openapi.json",
        "OPENAPI_AUTH_KIND": "bearer",
        "OPENAPI_AUTH_VALUE": "your-test-token"
      }
    }
  }
}

MIT licensed. Built and maintained by lumenpike.

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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