The MCP Server is a tool that simplifies accessing OpenAPI endpoints through semantic search. It allows Claude to discover and interact with API endpoints using natural language queries, even with large API specifications that would normally be too complex to process directly.
Pull the pre-built image from Docker Hub:
docker pull buryhuang/mcp-server-any-openapi:latest
Run the container with your API configuration:
docker run -e OPENAPI_JSON_DOCS_URL=https://api.example.com/openapi.json -e MCP_API_PREFIX=myapi buryhuang/mcp-server-any-openapi:latest
Install directly from PyPI:
pip install mcp-server-any-openapi
Run the server:
python -m mcp_server_any_openapi
Automatically install for Claude Desktop using Smithery:
npx -y @smithery/cli install @baryhuang/mcp-server-any-openapi --client claude
Customize behavior through environment variables:
OPENAPI_JSON_DOCS_URL
: URL to the OpenAPI specification JSON (defaults to https://api.staging.readymojo.com/openapi.json)MCP_API_PREFIX
: Customizable tool namespace (default "any_openapi")GLOBAL_TOOL_PROMPT
: Optional text to prepend to all tool descriptions (important for accurate tool selection)docker run \
-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
Configure in your Claude Desktop settings by adding to the multi-instance configuration:
{
"mcpServers": {
"any_openapi": {
"command": "docker",
"args": [
"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"
]
}
}
}
The server provides two main tools (where {prefix}
is determined by MCP_API_PREFIX
):
Discovers API endpoints based on natural language queries.
Input Schema:
{
"query": {
"type": "string",
"description": "Describe what you want to do with the API (e.g., 'Get user profile information', 'Create a new job posting')"
}
}
Executes API requests with proper parameters.
Input Schema:
{
"method": {
"type": "string",
"description": "HTTP method (GET, POST, PUT, DELETE, PATCH)",
"enum": ["GET", "POST", "PUT", "DELETE", "PATCH"]
},
"url": {
"type": "string",
"description": "Fully qualified API URL (e.g., https://api.example.com/users/123)"
},
"headers": {
"type": "object",
"description": "Request headers (optional)",
"additionalProperties": {
"type": "string"
}
},
"query_params": {
"type": "object",
"description": "Query parameters (optional)",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object",
"description": "Request body for POST, PUT, PATCH (optional)"
}
}
Configure multiple API integrations in one Claude Desktop 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"
]
}
}
}
You can override the base URL from the OpenAPI specification using:
-e API_REQUEST_BASE_URL=https://api.finance.staging.com
In Claude Desktop, add this to your project prompt:
You should get the api spec details from tools financial_api_request_schema
Your task is use financial_make_request tool to make the requests to get response. You should follow the api spec to add authorization header:
Authorization: Bearer <xxxxxxxxx>
Note: The base URL will be returned in the api_request_schema response, you don't need to specify it manually.
Then in the conversation, you can ask natural language questions like:
Get prices for all stocks
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "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"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"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"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"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"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect