MCPHub:模型上下文协议(MCP)服务器的统一中心 logo

MCPHub:模型上下文协议(MCP)服务器的统一中心

CommunityPopular
samanhappy

Self-hosted MCP gateway and control plane for connecting, controlling, and operating MCP servers.

Publishersamanhappy
Repositorymcphub
LanguageTypeScript
Forks
320
Stars
2.5K
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    MCPHub:模型上下文协议(MCP)服务器的统一中心 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    2.5K stars and 320 forks from the linked repository.

MCPHub

An open-source, self-hosted MCP gateway and control plane for connecting, controlling, and operating MCP servers.

CI npm version Docker pulls License Discord GitHub stars

English | Français | 中文版

MCPHub provides a unified control point between AI clients and MCP servers. Connect local and remote MCP servers once, organize and route their capabilities through stable endpoints, control access with authentication, scoped credentials, and per-user visibility, and operate everything with centralized logs, activity tracking, and health monitoring.

It works with MCP clients such as Claude Code, Cursor, Cherry Studio, OpenWebUI, and other MCP-compatible applications.

Dashboard Preview

🌐 Website, Demo & Docs

🚀 Features

Connect once, expose everywhere

  • Smart Routing ⭐ - AI-powered tool discovery using vector semantic search (Learn more)
  • Unified MCP Gateway - Expose all connected servers through stable MCP endpoints, including routes for groups and individual servers
  • Server Aliases and Routing - Define aliases and route clients to all servers, specific groups, individual servers, or smart routing
  • SSE / Streamable HTTP / stdio Support - Connect local and remote MCP servers over the supported transports
  • Hot-Swappable Config - Add, remove, or update servers without downtime

Control access and credentials

  • Per-user Credentials ⭐ - Bind personal keys to one shared server, with encrypted storage and isolated stdio runtimes (Learn more)
  • Authentication and Access Control - Use OAuth 2.0, bearer keys, and server or group visibility controls to manage access
  • OAuth 2.0 Support ⭐ - Both client and server modes for secure authentication (Learn more)
  • Social Login - Seamless GitHub and Google login support with Better Auth integration (requires Database Mode)
  • Server and Group Management - Organize servers into groups, manage visibility, and control Tool, Prompt, and Resource exposure

Operate with confidence

  • Logs and Observability - Inspect tool-call activity, request status, latency, and server logs
  • Health Checks - Monitor connection health and server status from one place
  • Web Dashboard - Manage server configuration and runtime operations from a browser
  • MCP Apps Proxy - Transparently forward interactive MCP Apps on single-server routes (Learn more)
  • Tool Result Compression - Transparently reduce large text tool outputs before they reach clients
  • Database Mode - Store configuration in PostgreSQL for production environments (Learn more)
  • Docker-Ready - Deploy instantly with containerized setup

🔧 Quick Start

Prerequisites

  • Docker (recommended) — the fastest way to run MCPHub; all commands below use it
  • Node.js ^18.0.0 || >=20.0.0 and pnpm 10.12.4 — only needed to run from source or develop locally (see Local Development)

Start with Docker

bash
docker run -p 3000:3000 -v ./data:/app/data samanhappy/mcphub

Open http://localhost:3000 and log in with username admin. On first launch, if no ADMIN_PASSWORD environment variable is set, a random password is generated and printed to the server logs.

Settings, users, and credential bindings persist in ./data by default.

Want your own servers? Before the first launch, create data/mcp_settings.json (see Configuration). After launch, add servers in the dashboard or edit the existing file and restart MCPHub.

Configuration

Create data/mcp_settings.json before the first launch:

json
{
  "mcpServers": {
    "time": {
      "command": "npx",
      "args": ["-y", "time-mcp"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}

📖 See Configuration Guide for full options including OAuth, environment variables, and more.

Docker Deployment

See Start with Docker for the copy-paste command. Keep ./data mounted so settings, users, and credential bindings survive container recreation.

Two image variants are published under samanhappy/mcphub:

  • latest — the default image. Includes Node.js/pnpm, Python, uv/uvx, Git, and build tools. Covers most MCP servers.
  • latest-full — the extended image. Adds Rust toolchain (Cargo/rustc), Docker Engine, and Playwright browsers (Chrome + Firefox, amd64 only). Use this for Rust-based servers or container-in-container workflows. Larger download.

See Docker Setup for build options and Docker-in-Docker configuration.

Access Dashboard

Open http://localhost:3000 (see Start with Docker for login details). You can also pre-set the password:

bash
# Docker: set admin password via environment variable
docker run -p 3000:3000 -v ./data:/app/data -e ADMIN_PASSWORD=your-secure-password samanhappy/mcphub

Tip: Change the admin password after first login for security.

Headless mode: Set DISABLE_WEB=true to skip serving the bundled dashboard UI and run MCPHub with only the backend/API and MCP endpoints. This is useful when you want to manage servers directly from mcp_settings.json.

Connect AI Clients

Connect AI clients (Claude Desktop, Cursor, etc.) via:

http://localhost:3000/mcp           # All servers
http://localhost:3000/mcp/{group}   # Specific group
http://localhost:3000/mcp/{server}  # Specific server
http://localhost:3000/mcp/$smart    # Smart routing
http://localhost:3000/mcp/$smart/{group}  # Smart routing within group

Security note: MCP endpoints require authentication by default to prevent accidental exposure. To allow unauthenticated MCP access, disable Enable Bearer Authentication in the Keys section. Skip Authentication only affects dashboard login. Use only in trusted environments.

📖 See API Reference for detailed endpoint documentation.

📚 Documentation

TopicDescription
Quick StartGet started in 5 minutes
ConfigurationMCP server configuration options
Database ModePostgreSQL setup for production
OAuthOAuth 2.0 client and server setup
Smart RoutingAI-powered tool discovery
MCP AppsInteractive Apps transparent proxy
CLI GuideManage and call the hub from a terminal
Docker SetupDocker deployment guide

🧑‍💻 Local Development

bash
git clone https://github.com/samanhappy/mcphub.git
cd mcphub
pnpm install
pnpm dev

Local development uses admin / admin123 and stores its writable settings copy at data/mcp_settings.dev.json, so the repository mcp_settings.json stays credential-free.

For Windows users, start backend and frontend separately: pnpm backend:dev, pnpm frontend:dev

📖 See Development Guide for detailed setup instructions.

🔍 Tech Stack

  • Backend: Node.js, Express, TypeScript (ESM)
  • Frontend: React, Vite, Tailwind CSS
  • Storage: file-based mcp_settings.json by default; PostgreSQL via TypeORM with pgvector for Smart Routing
  • Auth: JWT + bcrypt for local accounts; bearer keys; built-in OAuth 2.0 server (@node-oauth/oauth2-server); optional Better Auth for GitHub/Google login
  • Protocol: Model Context Protocol SDK

🏢 Production Support

Running MCPHub in production?

Work directly with the maintainer on production architecture, OAuth/OIDC, identity and access control, credential management, audit, Kubernetes, and HA readiness.

Discuss a production pilot →

👥 Contributing

Contributions welcome! See our Discord community for discussions and support.

❤️ Sponsor

ko-fi

Chinese users can also support via WeChat Pay — see 中文版.

🌟 Star History

Star History Chart

📄 License

Licensed under the Apache 2.0 License.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "samanhappy-mcphub": {
      "command": "npx",
      "args": [
        "-y",
        "@samanhappy/mcphub"
      ]
    }
  }
}

Use MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCPHub:模型上下文协议(MCP)服务器的统一中心 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCPHub:模型上下文协议(MCP)服务器的统一中心 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "samanhappy-mcphub": {
      "command": "npx",
      "args": [
        "-y",
        "@samanhappy/mcphub"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCPHub:模型上下文协议(MCP)服务器的统一中心 to help me with this task?
MCPHub:模型上下文协议(MCP)服务器的统一中心
Sure. I read it.
Here is what I found using MCPHub:模型上下文协议(MCP)服务器的统一中心.

Option 2: Add an MCP server URL

Use this when MCPHub:模型上下文协议(MCP)服务器的统一中心 is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for MCPHub:模型上下文协议(MCP)服务器的统一中心.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the MCPHub:模型上下文协议(MCP)服务器的统一中心 connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the MCPHub:模型上下文协议(MCP)服务器的统一中心 tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the MCPHub:模型上下文协议(MCP)服务器的统一中心 tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCPHub:模型上下文协议(MCP)服务器的统一中心 to help me with this task?
MCPHub:模型上下文协议(MCP)服务器的统一中心
Sure. I read it.
Here is what I found using MCPHub:模型上下文协议(MCP)服务器的统一中心.

Frequently asked questions

What is the MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP server used for?

MCPHub:模型上下文协议(MCP)服务器的统一中心 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCPHub:模型上下文协议(MCP)服务器的统一中心 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCPHub:模型上下文协议(MCP)服务器的统一中心 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP to TypingMind?

MCPHub:模型上下文协议(MCP)服务器的统一中心 can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP provide in TypingMind?

MCPHub:模型上下文协议(MCP)服务器的统一中心 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCPHub:模型上下文协议(MCP)服务器的统一中心 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCPHub:模型上下文协议(MCP)服务器的统一中心 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇