Skip to main content
Glama
README.md
<div align="center">

# ๐Ÿ”ฑ MCPHub

**One gateway to rule them all**

[![npm version](https://img.shields.io/npm/v/mcphub?color=blue)](https://www.npmjs.com/package/mcphub)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub stars](https://img.shields.io/github/stars/NeuZhou/mcphub?style=social)](https://github.com/NeuZhou/mcphub)
[![CI](https://github.com/NeuZhou/mcphub/actions/workflows/ci.yml/badge.svg)](https://github.com/NeuZhou/mcphub/actions)

*A unified gateway and dashboard for managing multiple MCP (Model Context Protocol) servers.*
*Think "Docker Compose + Dashboard" for MCP servers.*

[Quick Start](#-quick-start) ยท [Features](#-features) ยท [Config Reference](#-config-reference) ยท [Contributing](#-contributing)

</div>

---

## ๐Ÿ˜ฉ Why MCPHub?

If you work with AI tools in 2026, you probably have **multiple MCP servers** โ€” filesystem, GitHub, databases, APIs. Managing them is painful:

- โŒ **Scattered configs** โ€” every AI client needs its own MCP server list
- โŒ **No visibility** โ€” which servers are running? What tools are available?
- โŒ **No single endpoint** โ€” each client connects to each server separately
- โŒ **Restart hell** โ€” add a server = restart everything

MCPHub fixes all of this:

- โœ… **One YAML file** to define all your MCP servers
- โœ… **One gateway endpoint** that routes to the right server
- โœ… **Beautiful dashboard** showing status, tools, and stats
- โœ… **Hot reload** โ€” edit config, servers update instantly

## ๐Ÿ—๏ธ Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   AI Clients                     โ”‚
โ”‚         (Claude, Cursor, Copilot, etc.)          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚  MCP Protocol (stdio)
                   โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              ๐Ÿ”ฑ MCPHub Gateway                   โ”‚
โ”‚                                                  โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚   โ”‚ Registry โ”‚ โ”‚ Router   โ”‚ โ”‚  Health Check  โ”‚  โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                  โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚   โ”‚        ๐ŸŒ Web Dashboard (:3000)          โ”‚  โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚              โ”‚              โ”‚
       โ–ผ              โ–ผ              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ filesystem โ”‚ โ”‚   github   โ”‚ โ”‚  postgres  โ”‚
โ”‚   server   โ”‚ โ”‚   server   โ”‚ โ”‚   server   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

## ๐Ÿš€ Quick Start

**1. Install**
```bash
npm install -g mcphub
```

**2. Create `mcphub.yaml`**
```yaml
mcphub:
  port: 3000

servers:
  - name: filesystem
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]

  - name: github
    command: npx
    args: ["-y", "@modelcontextprotocol/server-github"]
    env:
      GITHUB_TOKEN: "${GITHUB_TOKEN}"
```

**3. Run**
```bash
mcphub
```

Open `http://localhost:3000` to see the dashboard ๐ŸŽ‰

## โœจ Features

| Feature | Description |
|---------|-------------|
| ๐Ÿ”ฑ **Unified Gateway** | Single MCP endpoint that routes to all downstream servers |
| ๐Ÿ“‹ **One Config** | Define all MCP servers in one `mcphub.yaml` file |
| ๐ŸŒ **Web Dashboard** | Beautiful dark-themed UI showing servers, tools, and stats |
| ๐Ÿ”„ **Hot Reload** | Edit config โ†’ servers update automatically, no restart needed |
| ๐Ÿ” **Tool Discovery** | Auto-discovers all tools from all connected servers |
| ๐Ÿ’“ **Health Checks** | Periodic health monitoring of all downstream servers |
| ๐Ÿ“Š **Usage Stats** | Request counts and error tracking per server |
| ๐Ÿ”Œ **Env Variables** | Reference `${ENV_VARS}` in your config |

## ๐Ÿ“– Config Reference

```yaml
mcphub:
  port: 3000            # Dashboard port (default: 3000)
  log_level: info       # debug | info | warn | error

servers:
  - name: my-server     # Unique server name (required)
    command: npx         # Command to start the server (required)
    args: ["-y", "pkg"]  # Command arguments (optional)
    enabled: true        # Enable/disable without removing (optional)
    env:                 # Environment variables (optional)
      KEY: "value"
      SECRET: "${FROM_ENV}"  # Reference host env vars
```

### Environment Variable Substitution

Use `${VAR_NAME}` in any string value to reference the host environment:

```yaml
env:
  GITHUB_TOKEN: "${GITHUB_TOKEN}"     # From host env
  DATABASE_URL: "${DATABASE_URL}"
```

## ๐Ÿ”ง Using with AI Clients

Configure your AI client to connect to MCPHub instead of individual servers:

```json
{
  "mcpServers": {
    "mcphub": {
      "command": "mcphub",
      "args": ["/path/to/mcphub.yaml"]
    }
  }
}
```

All tools from all configured servers are now available through this single connection.

## ๐Ÿค Contributing

Contributions are welcome! Here's how:

1. Fork the repo
2. Create your feature branch: `git checkout -b feat/amazing-feature`
3. Commit: `git commit -m 'Add amazing feature'`
4. Push: `git push origin feat/amazing-feature`
5. Open a Pull Request

### Development

```bash
git clone https://github.com/NeuZhou/mcphub.git
cd mcphub
npm install
npm run dev
```

## ๐Ÿ“„ License

MIT ยฉ [Kang Zhou](https://github.com/NeuZhou)

---

<div align="center">

**๐Ÿ”ฑ One gateway to rule them all ๐Ÿ”ฑ**

If MCPHub helps you, consider giving it a โญ

</div>