home / mcp / any openapi mcp server
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.
Configuration
View docs{
"mcpServers": {
"baryhuang-mcp-server-any-openapi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OPENAPI_JSON_DOCS_URL=https://api.finance.com/openapi.json",
"-e",
"MCP_API_PREFIX=finance",
"-e",
"GLOBAL_TOOL_PROMPT='Access to insights apis for ACME Financial Services abc.com .'",
"buryhuang/mcp-server-any-openapi:latest"
],
"env": {
"MCP_API_PREFIX": "finance",
"GLOBAL_TOOL_PROMPT": "Access to insights apis for ACME Financial Services abc.com .",
"OPENAPI_JSON_DOCS_URL": "https://api.finance.com/openapi.json"
}
}
}
}You will run an MCP server that discovers and exposes OpenAPI endpoints for use with Claude-based clients. It uses in-memory semantic search to locate relevant API endpoints from an OpenAPI spec, then provides tools you can invoke to inspect endpoint details and execute API requests. This makes it practical to interact with private APIs via natural language queries while keeping performance fast and avoiding manual parsing of large specs.
Start by running the server in a way that matches your API setup. You can run multiple instances to serve different OpenAPI docs or base URLs. Each instance exposes two tools you’ll use through your MCP client: one to retrieve endpoint schemas and another to perform the actual requests.
Prerequisites you need before starting: a container runtime (Docker is used here). Optional for local development are Python and Node tools if you plan to run from source or use alternate install methods.
# Option 1: Use a prebuilt Docker image directly (recommended)
docker run \
-i \
--rm \
-e OPENAPI_JSON_DOCS_URL=https://api.example.com/openapi.json \
-e MCP_API_PREFIX=finance \
-e GLOBAL_TOOL_PROMPT='Access to insights apis for ACME Financial Services abc.com .' \
buryhuang/mcp-server-any-openapi:latest
# Option 2: Run a second instance for healthcare APIs
docker run \
-i \
--rm \
-e OPENAPI_JSON_DOCS_URL=https://api.healthcare.com/openapi.json \
-e MCP_API_PREFIX=healthcare \
-e GLOBAL_TOOL_PROMPT='Access to insights apis for Healthcare API services efg.com .' \
buryhuang/mcp-server-any-openapi:latest
# Option 3: Install via Smithery for Claude Desktop integration
npx -y @smithery/cli install @buryhuang/mcp-server-any-openapi --client claude
# Option 4: Install via Python package (if you prefer pip)
pip install mcp-server-any-openapi
# Option 5: Run from source (for development)
python -m mcp_server_any_openapiYou can customize how the server presents tools and how it targets the API by setting environment variables in the docker run command. The important ones shown here are:
- OPENAPI_JSON_DOCS_URL: URL to the OpenAPI specification JSON (default is https://api.staging.readymojo.com/openapi.json).
- MCP_API_PREFIX: Prefix used for the tool names. For example, setting this to finance creates tools like finance_api_request_schema and finance_make_request.
- GLOBAL_TOOL_PROMPT: Optional text added to every tool description to guide how Claude selects and uses the tools. This helps ensure your tools are picked correctly.
You can run multiple MCP server instances in parallel, each serving a different OpenAPI source. The following example shows two instances configured via Docker commands. Use the exact command and environment variables as shown to reproduce the setup.
{
"mcpServers": {
"finance_openapi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OPENAPI_JSON_DOCS_URL=https://api.finance.com/openapi.json",
"-e",
"MCP_API_PREFIX=finance",
"-e",
"GLOBAL_TOOL_PROMPT='Access to insights apis for ACME Financial Services abc.com .'",
"buryhuang/mcp-server-any-openapi:latest"
]
},
"healthcare_openapi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OPENAPI_JSON_DOCS_URL=https://api.healthcare.com/openapi.json",
"-e",
"MCP_API_PREFIX=healthcare",
"-e",
"GLOBAL_TOOL_PROMPT='Access to insights apis for Healthcare API services efg.com .'",
"buryhuang/mcp-server-any-openapi:latest"
]
}
}
}- The server processes OpenAPI specs by endpoint, preserving context for each endpoint, which helps Claude identify the exact operation to perform.
- You can override the base URL for API requests by using the API_REQUEST_BASE_URL environment variable when you configure a server instance.
- If you need to run locally, you can build and run the container from the image or run from source using the Python module described for development workflows.
Get API endpoint schemas that match your intent, including path, method, parameters, and response formats.
Execute the chosen API endpoint with a fully formed HTTP request, including method, URL, headers, query parameters, and body.