MCPHub: Unified Management and Dynamic Routing for MCP Servers

Summary
MCPHub is a powerful open-source platform designed for centralized management and dynamic organization of multiple Model Context Protocol (MCP) servers and APIs. It transforms these services into streamable HTTP (SSE) endpoints, offering flexible routing strategies including intelligent semantic routing and group-based access. This solution simplifies the deployment and scaling of AI-driven applications by providing a unified interface and robust control features.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
MCPHub is an innovative, open-source platform designed to streamline the management and organization of multiple Model Context Protocol (MCP) servers and APIs. It unifies these services into flexible, streamable HTTP (SSE) endpoints, making it easier to integrate with various AI clients and applications. With features like a centralized dashboard, hot configuration, group-based access, and secure authentication, MCPHub provides a robust solution for deploying and scaling your MCP-based services. Its intelligent routing capabilities, powered by semantic search, allow AI agents to automatically discover and utilize the most relevant tools.
Installation
Getting started with MCPHub is straightforward, especially with Docker. First, create a mcp_settings.json
file to define your MCP servers. This file specifies the commands and environment variables for each server.
{
"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"]
}
}
}
Once your configuration is ready, deploy MCPHub using Docker. The recommended approach is to mount your 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
Alternatively, you can run with default settings:
docker run -p 3000:3000 samanhappy/mcphub
Examples
After deployment, you can access the MCPHub dashboard and connect your AI clients to its unified endpoints.
Accessing the Dashboard:
Open your web browser and navigate to http://localhost:3000
. Log in with the default credentials (admin
/ admin123
) to monitor server status, manage groups, and configure users.
Connecting AI Clients via HTTP Streamable Endpoints:
- Unified Endpoint (All Servers):
Connect AI clients to
http://localhost:3000/mcp
for a single interface to all configured MCP servers. - Intelligent Routing:
Utilize the experimental intelligent routing feature at
http://localhost:3000/mcp/$smart
. This system uses semantic search to automatically find and execute the most relevant tools based on user queries, requiring PostgreSQL withpgvector
and an OpenAI API key. - Group-Specific Endpoints:
For targeted access to specific server groups, use
http://localhost:3000/mcp/{group}
, where{group}
is the ID or name of a group you've created in the dashboard. This allows for granular access control and organization. - Server-Specific Endpoints:
Directly access individual servers via
http://localhost:3000/mcp/{server}
, where{server}
is the name of the specific MCP server.
Why Use MCPHub?
MCPHub offers several compelling advantages for developers and organizations working with Model Context Protocol servers:
- Centralized Management: A single dashboard provides real-time monitoring and control over all your MCP servers, simplifying operations.
- Flexible Integration: It provides unified HTTP streamable endpoints, making it easy to connect various AI clients and tools without complex individual configurations.
- Intelligent Tool Discovery: The experimental smart routing feature enhances AI agent capabilities by enabling semantic search for relevant tools, improving automation and efficiency.
- Scalability and Reliability: With Docker readiness and hot configuration, MCPHub supports dynamic scaling and updates without downtime.
- Enhanced Security: Built-in user management with JWT and bcrypt ensures secure access control based on roles and groups.
- Simplified Development: By abstracting the complexities of managing multiple MCP servers, MCPHub allows developers to focus on building AI applications rather than infrastructure.
Links
- GitHub Repository: https://github.com/samanhappy/mcphub
- Official Documentation: https://docs.mcphubx.com/
- Live Demo Environment: https://demo.mcphubx.com/