MCP Hub
Back to servers

MCP Router

A cloud-agnostic orchestration server that routes requests to pluggable tool adapters via the MCP protocol, deployable on EKS or AKS without code changes.

glama
Updated
May 3, 2026

MCP Router

A cloud-agnostic Node.js orchestration server that routes requests to pluggable tool adapters (Claude, Cursor, custom tools) via the MCP protocol pattern. Deployable on EKS (AWS) or AKS (Azure) without code changes.

Architecture decisions

DecisionChoiceReason
ProtocolHTTP + SSEUniversal, no WS infra needed, works through all proxies
Adapter loadingDynamic import() scanDrop-in plugins, zero router changes
AuthDelegated to IngressKeeps router stateless and horizontally scalable
K8s packagingHelm + plain YAMLWorks with ArgoCD, Flux, or raw kubectl
ImageDistroless nonrootMinimal attack surface, no shell

Quick start

cp .env.example .env          # add your ANTHROPIC_API_KEY
npm install
npm run dev

Call the router

# List available tools
curl http://localhost:3000/mcp/tools

# Stream a Claude completion (SSE)
curl -N -X POST http://localhost:3000/mcp \
  -H 'Content-Type: application/json' \
  -d '{
    "tool": "claude",
    "stream": true,
    "input": {
      "messages": [{"role":"user","content":"Explain MCP in one paragraph"}]
    }
  }'

# Buffered JSON response
curl -X POST http://localhost:3000/mcp \
  -H 'Content-Type: application/json' \
  -d '{"tool":"custom","stream":false,"input":{"input":"hello world"}}'

Adding a new adapter

  1. cp src/adapters/custom.js src/adapters/my-tool.js
  2. Change name in meta()
  3. Update InputSchema and implement execute() as an async generator
  4. Restart — the registry auto-discovers the new file

No changes to the router, registry, or Kubernetes manifests.

Deploy to Kubernetes

Prerequisites

  • kubectl configured for your cluster (EKS or AKS)
  • helm v3
  • Your image pushed to ECR or ACR

Create secrets

kubectl create secret generic mcp-router-secrets \
  --from-literal=ANTHROPIC_API_KEY=sk-... \
  --from-literal=CURSOR_API_KEY=optional

Helm install

helm install mcp-router ./helm/mcp-router \
  --set image.repository=<your-registry>/mcp-router \
  --set image.tag=<git-sha>

Or plain kubectl

kubectl apply -f k8s/manifests.yaml

Cloud-specific ingress notes

EKS: install aws-load-balancer-controller and add annotation:

kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing

AKS: install ingress-nginx via Helm (same chart works on both clouds):

helm install ingress-nginx ingress-nginx/ingress-nginx

The default values.yaml targets nginx, which is cloud-agnostic.

Environment variables

VariableRequiredDescription
ANTHROPIC_API_KEYFor claude adapterAnthropic API key
CURSOR_API_URLFor cursor adapterCursor REST endpoint URL
CURSOR_API_KEYFor cursor adapterBearer token for Cursor API
CURSOR_CLI_PATHFor cursor adapterPath to Cursor binary (alternative to REST)
PORTNo (default 3000)HTTP port
LOG_LEVELNo (default info)Pino log level
NODE_ENVNoSet to production to disable pretty-printing

API reference

POST /mcp

{
  "tool": "claude",
  "stream": true,
  "input": { /* adapter-specific, validated by Zod schema */ }
}

SSE events (when stream: true):

data: {"type":"text","data":"Hello"}
data: {"type":"done","data":{"stop_reason":"end_turn","usage":{...}}}
data: {"type":"error","data":"Something went wrong"}

GET /mcp/tools

Returns registered adapters and their descriptions.

GET /health/live

Kubernetes liveness probe.

GET /health/ready

Kubernetes readiness probe — 503 until adapters are loaded.

Reviews

No reviews yet

Sign in to write a review