claude-mcp-platform

MCP Platform Orchestrator for managing, routing, and monitoring requests across MCP servers

TypeScript API/Service v1.0.0

Executive Summary

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.

Overview

TypeScript
Language
API/Service
Category
0
Runtime Dependencies
6
Source Modules
5
API Endpoints
MIT
License

Architecture Diagram

Client Request
v
MCP Platform
Orchestrator Core
v
Request Router
Route Resolution
Server Registry
Register / Discover
Health Checker
Periodic Monitoring
Metrics Endpoint
Stats / Latency
v
Direct Match
Pattern Match
Rule-Based Routing
Round-Robin
Fallback Selection
v
Target MCP Server
Target MCP Server
Target MCP Server
Registered MCP Server Pool

Component Breakdown

ComponentFilePurpose
Entry Pointsrc/index.tsHTTP server setup, API endpoint registration, platform initialization
Typessrc/types.tsTypeScript interfaces for servers, routes, health status, metrics
Configurationsrc/config.tsEnvironment-based configuration (port, host, intervals, timeouts)
Server Registrysrc/registry.tsRegister/deregister servers, capability-based lookup and discovery
Request Routersrc/router.tsPattern-based routing with priority rules, direct match, and round-robin fallback
Health Checkersrc/health.tsPeriodic health checks, status management (healthy/degraded/unhealthy)

Data Flow / Request Flow

  1. Server Registration -- MCP servers register via POST /servers with their URL, capabilities, and metadata. The registry stores them in the active pool.
  2. Health Monitoring -- The health checker polls registered servers at a configurable interval (default 30s). Unhealthy servers are removed from routing.
  3. Request Routing -- Incoming requests to POST /route are resolved via: (1) direct match by server name, (2) pattern match against routing rules with priority, (3) round-robin across healthy servers.
  4. Metrics Collection -- Each routed request increments counters and records latency. GET /metrics exposes request stats, latency percentiles, and server status.
  5. Platform Health -- GET /health returns overall platform status including registered server count, healthy count, and uptime.

Security Controls

ControlImplementation
Health GatingUnhealthy servers are automatically removed from routing pool
Request TimeoutConfigurable request timeout (default 10s) prevents hung connections
Retry LogicConfigurable max retries (default 3) with automatic failover
Network IsolationDocker network isolation for inter-service communication
Input ValidationRequest parameters validated before routing

Industry Adaptation

Healthcare

Route patient data queries to HIPAA-compliant MCP servers. Health monitoring ensures clinical system availability SLAs.

Finance

Priority-based routing for latency-sensitive trading queries. Metrics tracking for SLA compliance and audit trails.

Government

Route classified vs. unclassified requests to appropriate security-cleared MCP server pools. FedRAMP boundary enforcement.

Retail

Round-robin load balancing across regional MCP servers for localized product data. Auto-failover during peak traffic.

SaaS

Multi-tenant routing by capability. Per-tenant metrics and usage tracking. Horizontal scaling of MCP server pools.

Production Readiness Checklist

Configuration / Environment Variables

VariableDefaultDescription
MCP_PORT3000Server port
MCP_HOST0.0.0.0Server host
MCP_LOG_LEVELinfoLog level
MCP_HEALTH_INTERVAL30000Health check interval (ms)
MCP_REQUEST_TIMEOUT10000Request timeout (ms)
MCP_MAX_RETRIES3Max retry attempts

Deployment

Using Bun

bun install
bun run dev     # development
bun run start   # production

Using Docker

docker-compose up -d

# Or build manually:
docker build -t claude-mcp-platform .
docker run -p 3000:3000 claude-mcp-platform

Links

Repositorygithub.com/your-org/claude-mcp-platform
READMEREADME.md
ChangelogCHANGELOG.md
LicenseMIT License