ControlAPI-MCP MCP Server

$curl -O https://raw.githubusercontent.com/fellowabhi/ControlAPI-openapi-to-mcp/main/auto-run.sh && chmod +x auto-run.sh
README.md

Dynamically converts any OpenAPI or REST API into MCP tools

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!

Linux / macOS:

📥 Install in VS Code

📥 Install in VS Code Insiders

💡 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_config tool to connect to your API.

Quick Start (Auto-Download)

Zero installation - automatically downloads and runs the latest release:

  1. Download the auto-run script:
curl -O https://raw.githubusercontent.com/fellowabhi/ControlAPI-openapi-to-mcp/main/auto-run.sh
chmod +x auto-run.sh
  1. Use it in your MCP config:
{
  "servers": {
    "controlapi-mcp": {
      "type": "stdio",
      "command": "/path/to/auto-run.sh"
    }
  }
}

Note: You can optionally set OPENAPI_URL, BASE_URL, and SERVER_NICKNAME in env vars, or configure dynamically using the set_server_config tool.

Download from releases or build:

export OPENAPI_URL='http://your-api.com/openapi.json'
export BASE_URL='http://your-api.com'  # optional
./dist/controlapi-mcp

Setup (Development)

pip install -e .

Building Binary

./build.sh

Creates a standalone executable at dist/controlapi-mcp (16MB)

MCP Configuration

Using Binary

{
  "servers": {
    "controlapi-mcp": {
      "type": "stdio",
      "command": "/path/to/openapi-mcp-adapter/dist/controlapi-mcp",
      "env": {
        "OPENAPI_URL": "http://localhost:8000/openapi.json",
        "BASE_URL": "http://localhost:8000",
        "DEBUG_PORT": "45133"
      }
    }
  }
}

Using Python (Development)

{
  "servers": {
    "controlapi-mcp": {
      "type": "stdio",
      "command": "/path/to/project/.venv/bin/python",
      "args": ["-m", "src.main"],
      "cwd": "/path/to/project",
      "env": {
        "OPENAPI_URL": "http://localhost:8000/openapi.json",
        "REFRESH_INTERVAL": "300",
        "PYTHONPATH": "/path/to/project",
        "BASE_URL": "http://localhost:8000",
        "DEBUG_PORT": "45133"
      }
    }
  }
}

Optional: OPENAPI_URL, BASE_URL, SERVER_NICKNAME, DEBUG_PORT (default: 45133)

💡 No Configuration Needed: You can start with no environment variables and configure the server dynamically using the set_server_config tool. The AI assistant will guide you through the setup.

🔍 Debug UI: Access browser-based request/response monitor at http://localhost:45133 (or custom DEBUG_PORT). URL available in get_server_info response.

Features

Cross-Platform Support

  • Linux (x86_64) - Full support
  • macOS (Intel & Apple Silicon) - Full support
  • Windows - Use Python or WSL

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 status
  • get_server_history - View recent server switches
  • health_check - Test server connectivity
  • list_endpoints - List all API endpoints
  • search_schema - Search endpoints by keyword
  • execute_request - Make HTTP requests with variable substitution
  • set_variable - Store variable (e.g., auth token)
  • get_variables - View all stored variables
  • reload_schema - Reload current server's schema

Variable Substitution

Use {{variable_name}} in headers, body, or path:

{
  "headers": {
    "Authorization": "{{token}}"
  }
}

Example Workflow

  1. First time: set_server_config with openapi_url
  2. execute_request to /auth/login → get token

Tools (10)

set_server_configConnect to an OpenAPI server (use this first if not configured)
get_server_infoCheck current server and connection status
get_server_historyView recent server switches
health_checkTest server connectivity
list_endpointsList all API endpoints
search_schemaSearch endpoints by keyword
execute_requestMake HTTP requests with variable substitution
set_variableStore variable (e.g., auth token)
get_variablesView all stored variables
reload_schemaReload current server's schema

Environment Variables

OPENAPI_URLURL to the OpenAPI JSON specification
BASE_URLBase URL for the API requests
SERVER_NICKNAMENickname for the current server connection
DEBUG_PORTPort for the browser-based request/response monitor (default: 45133)
REFRESH_INTERVALInterval in seconds for schema reloading

Configuration

claude_desktop_config.json
{
  "servers": {
    "controlapi-mcp": {
      "type": "stdio",
      "command": "/path/to/openapi-mcp-adapter/dist/controlapi-mcp",
      "env": {
        "OPENAPI_URL": "http://localhost:8000/openapi.json",
        "BASE_URL": "http://localhost:8000",
        "DEBUG_PORT": "45133"
      }
    }
  }
}

Try it

Connect to the API at http://api.example.com/openapi.json using set_server_config.
List all available endpoints for the current API server.
Search the API schema for any endpoints related to 'users'.
Set a variable named 'token' with my API key and use it to execute a GET request to /profile.
Show me the server history and current connection status.

Frequently Asked Questions

What are the key features of ControlAPI-MCP?

Dynamic Server Switching: Connect to and switch between multiple OpenAPI servers at runtime.. Variable Substitution: Use {{variable_name}} in headers, body, or paths for seamless authentication.. Automatic Schema Reloading: Real-time updates and reloading of API schemas.. Debug UI: Browser-based request/response monitor accessible via a local port.. Cross-Platform: Supports Linux, macOS, and Windows (via Python/WSL)..

What can I use ControlAPI-MCP for?

Developers needing to interact with multiple API environments (dev, staging, production) within a single session.. Automating API testing and exploration by converting static documentation into interactive tools.. Managing complex API workflows that require dynamic authentication tokens and variable passing between requests.. Monitoring API traffic in real-time using the built-in Debug UI monitor..

How do I install ControlAPI-MCP?

Install ControlAPI-MCP by running: curl -O https://raw.githubusercontent.com/fellowabhi/ControlAPI-openapi-to-mcp/main/auto-run.sh && chmod +x auto-run.sh

What MCP clients work with ControlAPI-MCP?

ControlAPI-MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use ControlAPI-MCP with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free