ControlAPI-MCP
MCP server that exposes any OpenAPI/REST API as MCP tools with dynamic server switching and variable substitution.
🚀 One-Click Install
Click to install directly in your editor - no configuration needed!
💡 After Installation: The AI assistant will guide you to connect to an API server. Simply provide the OpenAPI URL when asked, or use the
set_server_configtool to connect to your API.
Quick Start (Auto-Download)
Zero installation - automatically downloads and runs the latest release:
Download the auto-run script:
Use it in your MCP config:
Note: You can optionally set
OPENAPI_URL,BASE_URL, andSERVER_NICKNAMEin env vars, or configure dynamically using theset_server_configtool.
Download from releases or build:
Setup (Development)
Building Binary
Creates a standalone executable at dist/controlapi-mcp (16MB)
MCP Configuration
Using Binary
Using Python (Development)
Optional: OPENAPI_URL, BASE_URL, SERVER_NICKNAME
💡 No Configuration Needed: You can start with no environment variables and configure the server dynamically using the
set_server_configtool. The AI assistant will guide you through the setup.
Features
Dynamic Server Switching
Connect to any OpenAPI server at runtime
Switch between multiple APIs (dev, staging, production)
Server context tracking with history
Automatic schema reloading
Available Tools
set_server_config- Connect to an OpenAPI server (use this first if not configured)get_server_info- Check current server and connection statusget_server_history- View recent server switcheshealth_check- Test server connectivitylist_endpoints- List all API endpointssearch_schema- Search endpoints by keywordexecute_request- Make HTTP requests with variable substitutionset_variable- Store variable (e.g., auth token)get_variables- View all stored variablesreload_schema- Reload current server's schema
Variable Substitution
Use {{variable_name}} in headers, body, or path:
Example Workflow
First time:
set_server_configwith openapi_urlexecute_requestto/auth/login→ get tokenset_variablekey="token" value="Bearer xyz..."execute_requestwithAuthorization: {{token}}Switch servers:
set_server_configto test on different environment