mcp -any-openapi
A MCP server that enables Claude to discover and call any API endpoint through semantic search. Intelligently chunks OpenAPI specifications to handle large API documentation, with built-in request execution capabilities. Perfect for integrating private APIs with Claude Desktop.
claude mcp add --transport stdio baryhuang-mcp-server-any-openapi docker run -i --rm -e OPENAPI_JSON_DOCS_URL=https://api.staging.readymojo.com/openapi.json -e MCP_API_PREFIX=any_openapi -e GLOBAL_TOOL_PROMPT= buryhuang/mcp-server-any-openapi:latest \ --env MCP_API_PREFIX="Customizable tool namespace (default any_openapi)" \ --env GLOBAL_TOOL_PROMPT="Optional text prepended to all tool descriptions" \ --env OPENAPI_JSON_DOCS_URL="URL to the OpenAPI specification JSON (default https://api.staging.readymojo.com/openapi.json)"
How to use
This MCP server provides scalable discovery and execution tools for any OpenAPI-based API. It loads an OpenAPI document (from a URL you provide via OPENAPI_JSON_DOCS_URL), chunks endpoints into searchable units, and uses an in-memory FAISS index to quickly retrieve relevant endpoints based on natural-language prompts. The server exposes two tools by default, named with the MCP_API_PREFIX (default any_openapi): any_openapi_api_request_schema, which returns endpoint details (path, method, parameters, responses) matching your query, and any_openapi_make_request, which actually constructs and performs HTTP requests against the chosen endpoint with a supplied method, URL, headers, query parameters, and body. This setup allows Claude or other assistants to discover the correct endpoint and then execute the request with the full parameter context. You can override the API base URL for requests using the API_REQUEST_BASE_URL env var if needed, and customize how descriptions are presented via GLOBAL_TOOL_PROMPT.
How to install
Prerequisites:
- Docker installed and running on your host.
- Internet access to pull the image buryhuang/mcp-server-any-openapi:latest.
- Run the MCP server with Docker:
# Basic run using defaults (OPENAPI_JSON_DOCS_URL defaults to staging URL, and prefix is any_openapi)
docker run -i --rm \
-e OPENAPI_JSON_DOCS_URL=https://api.staging.readymojo.com/openapi.json \
-e MCP_API_PREFIX=any_openapi \
-e GLOBAL_TOOL_PROMPT= \
buryhuang/mcp-server-any-openapi:latest
- Optional: Use Smithery/CLI for Claude integration (as described in the README):
npx -y @smithery/cli install @baryhuang/mcp-server-any-openapi --client claude
- Alternative installation via Python/PIP (for environments where you can run a Python-based MCP server):
pip install mcp-server-any-openapi
Additional notes
Environment variables:
- OPENAPI_JSON_DOCS_URL: URL to the OpenAPI spec JSON. Default points to the staging API in the README. Change it to point to your private OpenAPI document if needed.
- MCP_API_PREFIX: The tool namespace. This determines the tool names exposed to the MCP client (e.g., any_openapi_api_request_schema, any_openapi_make_request).
- GLOBAL_TOOL_PROMPT: Optional text prepended to all tool descriptions to bias tool selection. Useful for guiding Claude/Desktop assistants.
- API_REQUEST_BASE_URL: Optional override so returned endpoints use a different base URL than the one in the OpenAPI document.
Common issues:
- Large model loading time on cold start when not using the pre-downloaded docker image. Consider using the official image in Docker with pre-downloaded models.
- Ensure network access to fetch the OpenAPI document if you override OPENAPI_JSON_DOCS_URL.
- If using multiple instances, keep unique MCP_API_PREFIX values to avoid conflicts between tools.
Related MCP Servers
mcpo
A simple, secure MCP-to-OpenAPI proxy server
mcp -qdrant
An official Qdrant Model Context Protocol (MCP) server implementation
chunkhound
Local first codebase intelligence
mcp-hubspot
A Model Context Protocol (MCP) server that enables AI assistants to interact with HubSpot CRM data, providing built-in vector storage and caching mechanisms help overcome HubSpot API limitations while improving response times.
openapi -generator
A Python tool that automatically converts OpenAPI(Swagger, ETAPI) compatible specifications into fully functional Model Context Protocol (MCP) servers. Generates Docker-ready implementations with support for SSE/IO communication protocols, authentication, and comprehensive error handling. https://pypi.org/project/openapi-mcp-generator/
Vector-Knowledge-Base
A semantic search engine that transforms your documents into an intelligent, searchable knowledge base using vector embeddings and AI