Sponsored by Deepsite.site

MCPHub: The Unified Hub for Model Context Protocol (MCP) Servers

Created By
samanhappy9 months ago
A unified hub server that organizes multiple MCP servers into distinct streamable HTTP (SSE) endpoints
Content

MCPHub: The Unified Hub for Model Context Protocol (MCP) Servers

English | 中文版

MCPHub makes it easy to manage and scale multiple MCP (Model Context Protocol) servers by organizing them into flexible Streamable HTTP (SSE) endpoints—supporting access to all servers, individual servers, or logical server groups.

Dashboard Preview

🚀 Features

  • Broadened MCP Server Support: Seamlessly integrate any MCP server with minimal configuration.
  • Centralized Dashboard: Monitor real-time status and performance metrics from one sleek web UI.
  • Flexible Protocol Handling: Full compatibility with both stdio and SSE MCP protocols.
  • Hot-Swappable Configuration: Add, remove, or update MCP servers on the fly — no downtime required.
  • Group-Based Access Control: Organize servers into customizable groups for streamlined permissions management.
  • Secure Authentication: Built-in user management with role-based access powered by JWT and bcrypt.
  • Docker-Ready: Deploy instantly with our containerized setup.

🔧 Quick Start

Configuration

Create a mcp_settings.json file to customize your server settings:

{
  "mcpServers": {
    "amap": {
      "command": "npx",
      "args": ["-y", "@amap/amap-maps-mcp-server"],
      "env": {
        "AMAP_MAPS_API_KEY": "your-api-key"
      }
    },
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest", "--headless"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "your-bot-token",
        "SLACK_TEAM_ID": "your-team-id"
      }
    }
  }
}

Docker Deployment

Recommended: Mount your custom config:

docker run -p 3000:3000 -v $(pwd)/mcp_settings.json:/app/mcp_settings.json samanhappy/mcphub

or run with default settings:

docker run -p 3000:3000 samanhappy/mcphub

Access the Dashboard

Open http://localhost:3000 and log in with your credentials.

Note: Default credentials are admin / admin123.

Dashboard Overview:

  • Live status of all MCP servers
  • Enable/disable or reconfigure servers
  • Group management for organizing servers
  • User administration for access control

Streamable HTTP Endpoint

As of now, support for streaming HTTP endpoints varies across different AI clients. If you encounter issues, you can use the SSE endpoint or wait for future updates.

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

http://localhost:3000/mcp

This endpoint provides a unified streamable HTTP interface for all your MCP servers. It allows you to:

  • Send requests to any configured MCP server
  • Receive responses in real-time
  • Easily integrate with various AI clients and tools
  • Use the same endpoint for all servers, simplifying your integration process

Smart Routing (Experimental):

Smart Routing is MCPHub's intelligent tool discovery system that uses vector semantic search to automatically find the most relevant tools for any given task.

http://localhost:3000/mcp/$smart

How it Works:

  1. Tool Indexing: All MCP tools are automatically converted to vector embeddings and stored in PostgreSQL with pgvector
  2. Semantic Search: User queries are converted to vectors and matched against tool embeddings using cosine similarity
  3. Intelligent Filtering: Dynamic thresholds ensure relevant results without noise
  4. Precise Execution: Found tools can be directly executed with proper parameter validation

Setup Requirements:

Smart Routing

To enable Smart Routing, you need:

  • PostgreSQL with pgvector extension
  • OpenAI API key (or compatible embedding service)
  • Enable Smart Routing in MCPHub settings

Group-Specific Endpoints (Recommended):

Group Management

For targeted access to specific server groups, use the group-based HTTP endpoint:

http://localhost:3000/mcp/{group}

Where {group} is the ID or name of the group you created in the dashboard. This allows you to:

  • Connect to a specific subset of MCP servers organized by use case
  • Isolate different AI tools to access only relevant servers
  • Implement more granular access control for different environments or teams

Server-Specific Endpoints: For direct access to individual servers, use the server-specific HTTP endpoint:

http://localhost:3000/mcp/{server}

Where {server} is the name of the server you want to connect to. This allows you to access a specific MCP server directly.

Note: If the server name and group name are the same, the group name will take precedence.

SSE Endpoint (Deprecated in Future)

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

http://localhost:3000/sse

For smart routing, use:

http://localhost:3000/sse/$smart

For targeted access to specific server groups, use the group-based SSE endpoint:

http://localhost:3000/sse/{group}

For direct access to individual servers, use the server-specific SSE endpoint:

http://localhost:3000/sse/{server}

🧑‍💻 Local Development

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

This starts both frontend and backend in development mode with hot-reloading.

For windows users, you may need to start the backend server and frontend separately: pnpm backend:dev, pnpm frontend:dev.

🛠️ Common Issues

Using Nginx as a Reverse Proxy

If you are using Nginx to reverse proxy MCPHub, please make sure to add the following configuration in your Nginx setup:

proxy_buffering off

🔍 Tech Stack

  • Backend: Node.js, Express, TypeScript
  • Frontend: React, Vite, Tailwind CSS
  • Auth: JWT & bcrypt
  • Protocol: Model Context Protocol SDK

👥 Contributing

Contributions of any kind are welcome!

  • New features & optimizations
  • Documentation improvements
  • Bug reports & fixes
  • Translations & suggestions

Welcome to join our Discord community for discussions and support.

❤️ Sponsor

If you like this project, maybe you can consider:

ko-fi

🌟 Star History

Star History Chart

📄 License

Licensed under the Apache 2.0 License.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"