MCP-Compose

by phildougherty

A comprehensive orchestration tool for managing Model Context Protocol (MCP) servers with container and proxy capabilities. Provides a Docker Compose-style interface for deploying, configuring, and managing multiple MCP servers through a unified HTTP proxy.

Developer toolsstdioCommunity

Repository-wide counts · Cached 2026-03-19

Overview

The MCP-Compose MCP server is a publicly available project. Review the upstream repository for installation instructions, supported tools, compatibility, permissions, and current maintenance status.

Configuration

Configuration, transport, authentication, and runtime requirements vary by project. Open the repository before connecting and use the smallest set of credentials and permissions required.

Open the MCP-Compose repository to read the latest documentation.

KEEP EXPLORING

Compare source, connection, and authentication details before choosing an implementation.

View the complete category

模型上下文协议服务器

modelcontextprotocol

Community

一组用于模型上下文协议(MCP)的参考实现,展示了对大型语言模型(LLM)工具和数据源的安全且受控的访问方式。

Context7 Platform - Up-to-date Code Docs For Any Prompt

upstash

Community

Context7 MCP server providing up-to-date, version-specific documentation and code examples for libraries, enabling coding agents to fetch accurate docs and code snippets. Requires an API key for higher rate limits, passed via CONTEXT7_API_KEY header.

Playwright MCP

Microsoft Corporation

Community

A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. Enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.

AIHawk

feder-cr

Community

AIHawk is an anti detect browser and web browsing agent, open source, with an MCP server for coding agents: undetected, no captchas, no blocks. It requires an OpenRouter API key for the standalone web UI mode, which can be provided via the --openrouter-key flag or the OPENROUTER_API_KEY environment variable or a .env file in the running directory.

FROM THE SOURCE

Repository README

Build-time snapshot · Retrieved 2026-10-05

View original

MCP-Compose

codecov Go Report Card License: AGPL v3 Release

Docker Compose for Model Context Protocol servers. Run multiple MCP servers with unified configuration, HTTP proxy, and container orchestration.

MCP-Compose Demo

Features

  • Docker Compose-style YAML configuration
  • HTTP proxy with automatic protocol translation (STDIO → HTTP)
  • Native support for Docker and Podman
  • Session management and connection pooling
  • Built-in dashboard and monitoring
  • OpenAPI spec generation

Installation

git clone https://github.com/phildougherty/mcp-compose.git
cd mcp-compose
make build

# Add to PATH
sudo cp build/mcp-compose /usr/local/bin/
# OR
export PATH="$PWD/build:$PATH"

Quick Start

Interactive Setup

mcp-compose init

Follow the prompts to create your configuration.

Manual Setup

Create mcp-compose.yaml:

version: '1'
servers:
  filesystem:
    protocol: stdio
    command: npx
    args:
      - "-y"
      - "@modelcontextprotocol/server-filesystem"
      - "/tmp"
    capabilities: [resources, tools]

Start servers:

mcp-compose up

Start the HTTP proxy:

mcp-compose proxy --port 9876

Test it:

curl http://localhost:9876/api/servers

Working Examples

Basic - Filesystem + Memory

version: '1'
servers:
  filesystem:
    protocol: stdio
    command: npx
    args:
      - "-y"
      - "@modelcontextprotocol/server-filesystem"
      - "${HOME}"
    capabilities: [resources, tools]
    volumes:
      - "${HOME}:${HOME}:ro"

  memory:
    protocol: stdio
    command: npx
    args:
      - "-y"
      - "@modelcontextprotocol/server-memory"
    capabilities: [resources, tools]

Add Brave Search (requires API key from https://brave.com/search/api/):

  brave-search:
    protocol: stdio
    command: npx
    args:
      - "-y"
      - "@modelcontextprotocol/server-brave-search"
    capabilities: [tools]
    env:
      BRAVE_API_KEY: "${BRAVE_API_KEY}"
export BRAVE_API_KEY="your-api-key"
mcp-compose up

See examples/ for more configurations.

Commands

Service Management

mcp-compose up                 # Start all services
mcp-compose up filesystem      # Start specific service
mcp-compose down               # Stop all services
mcp-compose down filesystem    # Stop specific service
mcp-compose restart            # Restart all services
mcp-compose ps                 # List service status
mcp-compose logs filesystem    # View logs

System Services

System services are infrastructure components (proxy, dashboard, task-scheduler, memory).

mcp-compose system up          # Start system services
mcp-compose system down        # Stop system services
mcp-compose system ps          # List system services
mcp-compose system status      # Health overview
mcp-compose system logs proxy  # View system logs

Proxy

mcp-compose proxy --port 9876              # Start proxy
mcp-compose proxy --api-key $(openssl rand -hex 32)  # With authentication

Dashboard

mcp-compose dashboard          # Start web dashboard
# Access at http://localhost:3111

Configuration

mcp-compose init               # Interactive setup wizard
mcp-compose validate           # Validate config file
mcp-compose create-config --type claude  # Generate client config

Configuration Reference

Basic Structure

version: '1'

# Optional: proxy authentication
proxy_auth:
  enabled: true
  api_key: "${MCP_API_KEY}"

servers:
  my-server:
    protocol: string           # stdio, http, sse
    command: string            # Executable (e.g., npx, python, node)
    args: [string]             # Command arguments
    capabilities: [string]     # tools, resources, prompts, sampling
    env:                       # Environment variables
      KEY: value
    volumes:                   # Volume mounts
      - "host:container:mode"

Protocol Types

STDIO (most common for NPM packages):

servers:
  my-server:
    protocol: stdio
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]

HTTP:

servers:
  my-server:
    protocol: http
    http_port: 8080

SSE (Server-Sent Events):

servers:
  my-server:
    protocol: sse
    http_port: 8080
    sse_path: /events

Volume Mounts

volumes:
  - "/host/path:/container/path:ro"   # Read-only
  - "/host/path:/container/path:rw"   # Read-write
  - "${HOME}/code:/workspace:ro"      # Environment variables

Environment Variables

In your config:

env:
  API_KEY: "${MY_API_KEY}"

In your shell:

export MY_API_KEY="secret"
mcp-compose up

Security

Never commit secrets to your config file. Use environment variables:

# Generate secure keys
export MCP_API_KEY=$(openssl rand -hex 32)
export OAUTH_CLIENT_SECRET=$(openssl rand -hex 32)

Reference in config:

proxy_auth:
  api_key: "${MCP_API_KEY}"

Client Integration

Claude Desktop

Generate config:

mcp-compose create-config --type claude --output ./claude-config

Copy contents to Claude Desktop settings.

Direct HTTP

# List tools
curl -X POST http://localhost:9876/filesystem \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# Call tool
curl -X POST http://localhost:9876/filesystem \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"tools/call",
    "params":{
      "name":"read_file",
      "arguments":{"path":"/tmp/test.txt"}
    }
  }'

Troubleshooting

Check Service Status

mcp-compose ps
mcp-compose system status

View Logs

mcp-compose logs filesystem
mcp-compose system logs proxy

Validate Configuration

mcp-compose validate

Common Issues

Port already in use:

lsof -i :9876
mcp-compose proxy --port 9877  # Use different port

Container not starting:

mcp-compose logs my-server     # Check logs
docker ps -a                   # Check container status

Authentication errors:

echo $MCP_API_KEY              # Verify key is set

Requirements

  • Docker 20.10+ or Podman 3.0+
  • Linux, macOS, or Windows with WSL2
  • Go 1.19+ (for building from source)

Architecture

┌──────────────────────────────┐
│     MCP-Compose Proxy        │
│  (HTTP API + Authentication) │
└──────────────┬───────────────┘
               │
        ┌──────┼──────┐
        │      │      │
    ┌───▼──┐ ┌─▼──┐ ┌▼───┐
    │ FS   │ │ Mem│ │Search│
    │STDIO │ │HTTP│ │ SSE  │
    └──────┘ └────┘ └──────┘

License

GNU Affero General Public License v3.0 - see LICENSE.