master-control-program

gokhanarkan/master-control-program

3.2

If you are the rightful owner of master-control-program and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Master Control Program is an intelligent orchestration system for Model Context Protocol servers, designed to simplify tool discovery and selection using AI.

Master Control Program

An intelligent MCP meta-server that discovers, analyses, and selects the right tools from 1000+ Model Context Protocol servers using AI-powered semantic understanding.

"I fight for the users." - Master Control Program

⚠️ Work in Progress: This is an experimental concept for intelligent MCP tool discovery and selection. The system is fully functional but actively evolving.

Overview

Master Control Program is an open-source Go-based orchestration system for Model Context Protocol (MCP) servers. You have full control over the server, database, and AI configuration. It's designed to be run as an MCP server itself, acting as an intelligent gateway to the broader MCP ecosystem.

Instead of manually configuring dozens of MCP servers, simply describe what you need, and Master Control Program will:

  • Analyze your request via an LLM (Google Gemini)
  • Select the most relevant tools from 1000+ available MCP servers
  • Return ready-to-use installation URLs for your IDE

Why This Exists

The MCP ecosystem has grown to 1000+ servers, each providing multiple tools. Manually discovering and configuring the right servers for your task is time-consuming. Master Control Program tries to solve this by:

  1. Syncing with the GitHub MCP Registry and creating a semantic graph database
  2. Understanding your natural language requests
  3. Selecting only the specific tools you need
  4. Filtering out servers without relevant tools

The mission is tool-first selection. You get exactly what you need, nothing more.

Architecture

Master Control Program syncs servers from the GitHub MCP Registry, extracts tools and their schemas from README files, and uses AI to semantically categorize and enhance metadata. All data is stored in a Neo4j graph database for efficient relationship-based queries.

The graph shows relationships between:

  • Servers (from MCP registry)
  • Tools (extracted from server documentation)
  • Categories (AI-generated semantic classifications)

How It Works

  1. Background Sync: Every 24 hours, syncs the GitHub MCP registry (github.com/mcp) to discover new/updated servers
  2. Semantic Analysis: AI analyses each server's README and metadata to generate categories and descriptions
  3. Graph Storage: Stores servers, tools, and relationships in Neo4j with Server -[:PROVIDES]-> Tool and Server -[:HAS_CATEGORY]-> Category
  4. Intelligent Selection: When you make a request, Gemini selects specific tools (not just servers) based on semantic understanding
  5. Installation URLs: Returns VS Code deep links for one-click installation with only the selected tools

Quick Start

Prerequisites

  • Go 1.23+
  • Docker & Docker Compose
  • Make

Installation

# Clone repository
git clone https://github.com/gokhanarkan/master-control-program.git
cd master-control-program

# Configure environment
cp .env.example .env
# Edit .env with your API keys:
#   - GITHUB_TOKEN (for registry access)
#   - GEMINI_API_KEY (for AI selection)
#   - NEO4J_PASSWORD (default: tron-1982)

# Quick start (install tools, build, start services, sync)
make quickstart

This will start the server on http://localhost:8000 and Neo4j on http://localhost:7474.

Testing

Health Check

curl http://localhost:8000/health

Request Tool Selection

Ask for tools in natural language:

curl -X POST http://localhost:8000/api/bring-servers \
  -H "Content-Type: application/json" \
  -d '{
    "query": "I need to transform Salesforce data and send it to Notion",
    "max_servers": 5
  }'

Response:

{
  "servers": [
    {
      "id": "416851cd-a3e8-57a8-a4f3-2c94d8745e9a",
      "name": "dev.composio.rube/rube",
      "command": "mcp-server",
      "args": ["dev.composio.rube/rube"],
      "description": "Connect your AI to 500+ apps like Gmail, Slack, GitHub, and Notion with streamable HTTP transport.",
      "language": "JavaScript",
      "stars": 271
    },
    {
      "id": "4fd31770-6d53-5fc5-a88e-1125d93f7b1e",
      "name": "io.github.Lyellr88/marm-mcp-server",
      "command": "mcp-server",
      "args": ["io.github.Lyellr88/marm-mcp-server"],
      "description": "Universal MCP Server with advanced AI memory capabilities and semantic search.",
      "language": "Python",
      "stars": 185
    },
    {
      "id": "4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d",
      "name": "io.github.domdomegg/airtable-mcp-server",
      "command": "mcp-server",
      "args": ["io.github.domdomegg/airtable-mcp-server"],
      "description": "Read and write access to Airtable database schemas, tables, and records.",
      "language": "TypeScript",
      "stars": 340
    }
  ],
  "tools": [
    {
      "id": "416851cd-a3e8-57a8-a4f3-2c94d8745e9a__http_request",
      "name": "http_request",
      "description": "Make an HTTP request to a URL",
      "server_id": "416851cd-a3e8-57a8-a4f3-2c94d8745e9a",
      "server_name": "dev.composio.rube/rube",
      "input_schema": {
        "properties": {
          "body": {
            "description": "Request body (for POST/PUT/PATCH)",
            "type": "string"
          },
          "headers": {
            "description": "HTTP headers to include",
            "type": "object"
          },
          "method": {
            "description": "HTTP method (GET, POST, PUT, DELETE)",
            "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"],
            "type": "string"
          },
          "url": {
            "description": "URL to send the request to",
            "type": "string"
          }
        },
        "required": ["url", "method"],
        "type": "object"
      },
      "categories": ["general"]
    },
    {
      "id": "4fd31770-6d53-5fc5-a88e-1125d93f7b1e__search",
      "name": "search",
      "description": "Search for content",
      "server_id": "4fd31770-6d53-5fc5-a88e-1125d93f7b1e",
      "server_name": "io.github.Lyellr88/marm-mcp-server",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 10,
            "description": "Maximum number of results",
            "type": "integer"
          },
          "query": {
            "description": "Search query",
            "type": "string"
          }
        },
        "required": ["query"],
        "type": "object"
      },
      "categories": ["web", "ai"]
    },
    {
      "id": "4fd31770-6d53-5fc5-a88e-1125d93f7b1e__http_request",
      "name": "http_request",
      "description": "Make an HTTP request to a URL",
      "server_id": "4fd31770-6d53-5fc5-a88e-1125d93f7b1e",
      "server_name": "io.github.Lyellr88/marm-mcp-server",
      "input_schema": {
        "properties": {
          "body": {
            "description": "Request body (for POST/PUT/PATCH)",
            "type": "string"
          },
          "headers": {
            "description": "HTTP headers to include",
            "type": "object"
          },
          "method": {
            "description": "HTTP method (GET, POST, PUT, DELETE)",
            "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"],
            "type": "string"
          },
          "url": {
            "description": "URL to send the request to",
            "type": "string"
          }
        },
        "required": ["url", "method"],
        "type": "object"
      },
      "categories": ["web", "ai"]
    },
    {
      "id": "4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d__execute_statement",
      "name": "execute_statement",
      "description": "Execute a SQL statement (INSERT, UPDATE, DELETE)",
      "server_id": "4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d",
      "server_name": "io.github.domdomegg/airtable-mcp-server",
      "input_schema": {
        "properties": {
          "statement": {
            "description": "SQL statement to execute",
            "type": "string"
          }
        },
        "required": ["statement"],
        "type": "object"
      },
      "categories": ["ai"]
    },
    {
      "id": "4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d__query_database",
      "name": "query_database",
      "description": "Execute a SQL query on the database",
      "server_id": "4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d",
      "server_name": "io.github.domdomegg/airtable-mcp-server",
      "input_schema": {
        "properties": {
          "query": {
            "description": "SQL query to execute",
            "type": "string"
          }
        },
        "required": ["query"],
        "type": "object"
      },
      "categories": ["ai"]
    }
  ],
  "installation_urls": [
    "vscode:mcp/by-name/dev.composio.rube/rube?tools=416851cd-a3e8-57a8-a4f3-2c94d8745e9a__http_request",
    "vscode:mcp/by-name/io.github.Lyellr88/marm-mcp-server?tools=4fd31770-6d53-5fc5-a88e-1125d93f7b1e__search,4fd31770-6d53-5fc5-a88e-1125d93f7b1e__http_request",
    "vscode:mcp/by-name/io.github.domdomegg/airtable-mcp-server?tools=4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d__execute_statement,4f2e4498-8efc-5fba-8f1d-a64b8ee5d59d__query_database"
  ],
  "message": "Selected 3 servers with 5 tools (confidence 0.90). The user wants to transform Salesforce data and send it to a Notion table. The `dev.composio.rube/rube` server can connect to various apps like Notion via HTTP requests. The `io.github.Lyellr88/marm-mcp-server` server offers advanced AI memory and semantic search capabilities which could be useful for data transformation. The `io.github.domdomegg/airtable-mcp-server` server provides read/write access to Airtable, which could be used as an intermediate step or for accessing Salesforce data if it has an Airtable integration. The `http_request` tool is general-purpose for API interactions. `search`, `execute_statement`, and `query_database` are included as they might be necessary for data retrieval and manipulation from Salesforce or Notion, depending on their respective APIs.",
  "session_id": "fddb0c9f-7e08-47f2-9249-723043bfd9c0",
  "timestamp": "2025-11-08T21:42:55.110562Z"
}

Key Response Fields:

  • servers: Selected MCP servers with metadata
  • tools: Specific tools with full JSON schemas
  • installation_urls: VS Code deep links for one-click installation (format: vscode:mcp/by-name/{server}?tools=id1,id2)
  • message: AI reasoning explaining the selection
  • session_id: Session identifier for tracking

Manual Sync

Trigger a manual synchronization of the MCP registry:

docker exec mcp-server ./mcp-server sync

Or via make command:

make sync

Development

Project Structure

master-control-program/
├── cmd/server/              # Main application entry point
├── internal/
│   ├── api/                # REST API handlers
│   ├── ai/                 # Gemini AI client for tool selection
│   ├── cache/              # Query result caching
│   ├── discovery/          # Registry sync & tool extraction
│   ├── graph/              # Neo4j operations
│   ├── protocol/           # MCP protocol handler
│   └── scheduler/          # Background sync & AI analysis
├── pkg/types/              # Shared types
└── scripts/neo4j/          # Database initialization

Make Commands

make build        # Build binary
make test         # Run tests
make lint         # Run linters
make run          # Run locally
make docker-up    # Start services
make docker-down  # Stop services
make sync         # Manual sync

Configuration

Edit .env for configuration:

# Required
GEMINI_API_KEY=your_key_here
GITHUB_TOKEN=your_token_here
NEO4J_PASSWORD=tron-1982

# Optional
SERVER_PORT=8000
SYNC_INTERVAL=6h
CACHE_TTL=1h
ENABLE_AI_ANALYSIS=true
AI_CONCURRENCY=1
AI_REQUEST_DELAY=4s
AI_BATCH_SIZE=50

Contributing

This is a personal project, but issues and suggestions are welcome.

License

MIT License - Copyright (c) 2025 Gökhan Arkan

See for details.

Acknowledgments

  • Inspired by TRON's Master Control Program
  • Built for the Model Context Protocol ecosystem
  • Powered by Go, Neo4j, and Google Gemini