ControlAPI-MCP

ControlAPI-MCP

An MCP server that dynamically converts any OpenAPI or REST API into MCP tools, allowing for real-time server switching and schema reloading. It supports variable substitution for headers and bodies, enabling seamless authentication and interaction with multiple API environments.

Category
Visit Server

README

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
  3. set_variable key="token" value="Bearer xyz..."
  4. execute_request with Authorization: {{token}}
  5. Switch servers: set_server_config to test on different environment

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured