Get the FREE Ultimate OpenClaw Setup Guide →

mcphub

A unified hub for centrally managing and dynamically orchestrating multiple MCP servers/APIs into separate endpoints with flexible routing strategies

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio samanhappy-mcphub npx -y time-mcp

How to use

MCPHub serves as a unified control plane for multiple MCP servers, exposing them through Streamable HTTP (SSE) endpoints. You can access all managed MCP servers, target a specific group, or drill down to a single server. The platform also supports smart routing, which uses vector semantic search to discover and route requests to the most relevant MCPs, and it offers hot-swappable configuration so you can add, remove, or update server instances without downtime. To get started, configure your MCP servers in mcp_settings.json, then run the MCPHub instance (or deploy via Docker) and authenticate to access endpoints. Use the provided /mcp endpoints to browse all servers, a group, a single server, or the smart routing interface at /mcp/$smart. The system emphasizes secure access, with authentication enabled by default to prevent unintended exposure, and offers OAuth, social login, and database-backed configurations for production deployments.

How to install

Prerequisites:

  • Node.js (LTS) installed on your machine
  • Git installed
  • Optional: Docker if you prefer containerized deployment

Step 1: Clone the repository

git clone https://github.com/samanhappy/mcphub.git
cd mcphub

Step 2: Install dependencies

pnpm install

Step 3: Create or customize configuration

  • Create mcp_settings.json in the project root and define your mcpServers as needed (example is in the repository's README).
{
  "mcpServers": {
    "time": {
      "command": "npx",
      "args": ["-y", "time-mcp"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}

Step 4: Run the development server

pnpm run dev

Step 5: (Optional) Docker deployment

  • Build and run with default settings:
docker run -p 3000:3000 samanhappy/mcphub
  • Or mount a custom mcp_settings.json and data directory
docker run -p 3000:3000 \
  -v ./mcp_settings.json:/app/mcp_settings.json \
  -v ./data:/app/data \
  samanhappy/mcphub

Prerequisites for Docker: Docker installed and running, and your host ports available.

Additional notes

Tips and caveats:

  • Authentication is enabled by default; to allow unauthenticated MCP access only in trusted environments, disable Enable Bearer Authentication in the Keys section. The Skip Authentication setting only bypasses dashboard login.
  • Smart Routing leverages AI-powered tool discovery for selecting the best MCPs for a given task. Use the /mcp/$smart endpoints to explore routing options.
  • Docker deployment is Docker-Ready and recommended for production; you can mount your own mcp_settings.json and a data directory for persistence.
  • If you’re using Database Mode (PostgreSQL) for production configuration, ensure your DB credentials and network access are correctly set up via environment variables or your configuration files.
  • The platform supports hot-swapping: you can add, remove, or update servers without downtime, but always validate your new configuration in a staging environment before production.
  • For Windows users, you can run backend and frontend separately (e.g., using npm scripts like backend:dev and frontend:dev).

Related MCP Servers

Sponsor this space

Reach thousands of developers