MAGG MCP server

Meta-MCP server that aggregates and manages multiple MCP servers through intelligent discovery from sources like Glama.ai and GitHub, enabling dynamic server installation, configuration, and unified tool access with automatic conflict resolution.
Back to servers
Setup instructions
Provider
sitbon
Release date
Jun 21, 2025
Language
JavaScript
Stats
9 stars

Magg is a Model Context Protocol (MCP) aggregator server that enables LLMs to dynamically extend their capabilities. It acts as a central hub for managing multiple MCP servers, allowing AI assistants to discover, install, and configure their own tools at runtime.

Installation

Prerequisites

  • Python 3.12 or higher (3.13+ recommended)
  • uv (recommended) - Install from astral.sh/uv

Quick Install

The easiest way to install Magg is using uv:

# Install Magg as a tool
uv tool install magg

# Run with stdio transport (for Claude Desktop, Cline, etc.)
magg serve

# Run with HTTP transport (for system-wide access)
magg serve --http

Run Directly from GitHub

You can run Magg directly without installing:

# Run with stdio transport
uvx --from git+https://github.com/sitbon/magg.git magg

# Run with HTTP transport
uvx --from git+https://github.com/sitbon/magg.git magg serve --http

Docker

Magg is available as pre-built Docker images:

# Run production image
docker run -p 8000:8000 ghcr.io/sitbon/magg:latest

# Run with authentication (mount private key)
docker run -p 8000:8000 \
  -v ~/.ssh/magg:/home/magg/.ssh/magg:ro \
  ghcr.io/sitbon/magg:latest

# Or with environment variable
docker run -p 8000:8000 \
  -e MAGG_PRIVATE_KEY="$(cat ~/.ssh/magg/magg.key)" \
  ghcr.io/sitbon/magg:latest

# Run with custom config directory
docker run -p 8000:8000 \
  -v /path/to/config:/home/magg/.magg \
  ghcr.io/sitbon/magg:latest

Usage

Running Magg

Magg can run in two modes:

  1. Stdio Mode (default) - For integration with Claude Desktop, Cline, Cursor, etc.:

    magg serve
    
  2. HTTP Mode - For system-wide access or web integrations:

    magg serve --http --port 8000
    

Available Tools

Once Magg is running, it exposes these tools to LLMs:

  • magg_list_servers - List all configured MCP servers
  • magg_add_server - Add a new MCP server
  • magg_remove_server - Remove a server
  • magg_enable_server / magg_disable_server - Toggle server availability
  • magg_search_servers - Search for MCP servers online
  • magg_list_tools - List all available tools from all servers
  • magg_smart_configure - Intelligently configure a server from a URL
  • magg_analyze_servers - Analyze configured servers and suggest improvements
  • magg_status - Get server and tool statistics
  • magg_check - Health check servers with repair actions
  • magg_reload_config - Reload configuration from disk
  • magg_load_kit - Load a kit and its servers into the configuration
  • magg_unload_kit - Unload a kit from the configuration
  • magg_list_kits - List all available kits with their status
  • magg_kit_info - Get detailed information about a specific kit

Authentication

Magg supports optional bearer token authentication:

# Initialize authentication (creates RSA keypair)
magg auth init

# Generate a JWT token for clients
magg auth token

# Export as environment variable
export MAGG_JWT=$(magg auth token -q)

Connect with authentication using MaggClient:

from magg.client import MaggClient

async def main():
    async with MaggClient("http://localhost:8000/mcp") as client:
        tools = await client.list_tools()

Configuration

Magg stores its configuration in .magg/config.json in your current working directory. Example configuration:

{
  "servers": {
    "calculator": {
      "name": "calculator",
      "source": "https://github.com/executeautomation/calculator-mcp",
      "command": "npx @executeautomation/calculator-mcp",
      "prefix": "calc",
      "enabled": true
    }
  }
}

Adding Servers

Servers can be added in several ways:

  1. Using the LLM (recommended):

    "Add the Playwright MCP server"
    "Search for and add a calculator tool"
    
  2. Manual configuration via magg_add_server:

    name: playwright
    url: https://github.com/microsoft/playwright-mcp
    command: npx @playwright/mcp@latest
    prefix: pw
    
  3. Direct config editing: Edit .magg/config.json directly

Kit Management

Magg supports organizing related MCP servers into "kits" - bundles that can be loaded and unloaded as a group:

# List available kits
mbro call magg_list_kits

# Load a kit (adds all its servers)
mbro call magg_load_kit name="web-tools"

# Unload a kit (removes servers only in that kit)
mbro call magg_unload_kit name="web-tools"

Kits are JSON files stored in ~/.magg/kit.d/ or .magg/kit.d/ that define a collection of related servers.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "magg" '{"command":"magg","args":["serve"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

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": {
        "magg": {
            "command": "magg",
            "args": [
                "serve"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "magg": {
            "command": "magg",
            "args": [
                "serve"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later