A Model Context Protocol (MCP) platform orchestrator that manages, routes, and monitors requests across multiple MCP servers. It provides a server registry with capability-based discovery, pattern-based request routing with priority rules and round-robin fallback, periodic health checking with automatic server status management, and metrics collection for request counts, latency, and server availability. Built with TypeScript and Bun runtime, with Docker and docker-compose support for production deployment.
| Component | File | Purpose |
|---|---|---|
| Entry Point | src/index.ts | HTTP server setup, API endpoint registration, platform initialization |
| Types | src/types.ts | TypeScript interfaces for servers, routes, health status, metrics |
| Configuration | src/config.ts | Environment-based configuration (port, host, intervals, timeouts) |
| Server Registry | src/registry.ts | Register/deregister servers, capability-based lookup and discovery |
| Request Router | src/router.ts | Pattern-based routing with priority rules, direct match, and round-robin fallback |
| Health Checker | src/health.ts | Periodic health checks, status management (healthy/degraded/unhealthy) |
| Control | Implementation |
|---|---|
| Health Gating | Unhealthy servers are automatically removed from routing pool |
| Request Timeout | Configurable request timeout (default 10s) prevents hung connections |
| Retry Logic | Configurable max retries (default 3) with automatic failover |
| Network Isolation | Docker network isolation for inter-service communication |
| Input Validation | Request parameters validated before routing |
Route patient data queries to HIPAA-compliant MCP servers. Health monitoring ensures clinical system availability SLAs.
Priority-based routing for latency-sensitive trading queries. Metrics tracking for SLA compliance and audit trails.
Route classified vs. unclassified requests to appropriate security-cleared MCP server pools. FedRAMP boundary enforcement.
Round-robin load balancing across regional MCP servers for localized product data. Auto-failover during peak traffic.
Multi-tenant routing by capability. Per-tenant metrics and usage tracking. Horizontal scaling of MCP server pools.
| Variable | Default | Description |
|---|---|---|
MCP_PORT | 3000 | Server port |
MCP_HOST | 0.0.0.0 | Server host |
MCP_LOG_LEVEL | info | Log level |
MCP_HEALTH_INTERVAL | 30000 | Health check interval (ms) |
MCP_REQUEST_TIMEOUT | 10000 | Request timeout (ms) |
MCP_MAX_RETRIES | 3 | Max retry attempts |
bun install
bun run dev # development
bun run start # production
docker-compose up -d
# Or build manually:
docker build -t claude-mcp-platform .
docker run -p 3000:3000 claude-mcp-platform
| Repository | github.com/your-org/claude-mcp-platform |
| README | README.md |
| Changelog | CHANGELOG.md |
| License | MIT License |