Self-hosted MCP server registry and proxy — register, proxy, and monitor any MCP server from one place.
MCP Hub acts as a central registry and reverse proxy in front of your MCP servers. Instead of configuring each AI agent to talk directly to each MCP server, you point every agent at MCP Hub and it routes requests, logs traffic, and health-checks servers in the background.
AI agent / Claude
│
▼
MCP Hub (this repo)
│
┌────┴────┬──────────┐
▼ ▼ ▼
MCP MCP MCP
Server A Server B Server C
- Registry — register MCP servers by URL; store name, metadata, and connection config
- Proxy — route MCP protocol requests to the correct upstream server
- Health monitoring — background BullMQ job pings each registered server; marks offline servers
- Live logs — WebSocket gateway streams proxy logs to the dashboard in real time
- REST API — full CRUD for server registry; queryable logs
| Layer | Technology |
|---|---|
| API | NestJS 10, TypeScript |
| Database | PostgreSQL (TypeORM) |
| Cache | Redis |
| Queue | BullMQ (health check jobs) |
| Realtime | WebSocket gateway (NestJS) |
mcp-hub/src/
├── proxy/ # Request proxying to upstream MCP servers
├── health/ # BullMQ health check processor
├── logs/ # Log storage + WebSocket streaming gateway
└── common/ # Shared types
- Node.js 18+
- PostgreSQL
- Redis
git clone https://github.com/DIYA73/mcp-hub.git
cd mcp-hub
cp .env.example .env # if present, or create manuallyDATABASE_URL=postgresql://user:pass@localhost:5432/mcphub
REDIS_URL=redis://localhost:6379
PORT=3000npm install
npm run start:devcurl -X POST http://localhost:3000/servers \
-H "Content-Type: application/json" \
-d '{
"name": "my-filesystem-mcp",
"url": "http://localhost:8080",
"description": "Local filesystem MCP server"
}'curl -X POST http://localhost:3000/proxy/my-filesystem-mcp \
-H "Content-Type: application/json" \
-d '{ "method": "tools/list", "params": {} }'GET /servers # list registered MCP servers
POST /servers # register a new server
GET /servers/:id # server detail + health status
DELETE /servers/:id # remove server
GET /logs # recent proxy logs
GET /logs/:serverId # logs for a specific server
WS /logs/stream # live WebSocket log feed
PRs welcome. Open an issue first for major changes.
MIT