MCP Router

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.

Category
Visit Server

README

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

Decision Choice Reason
Protocol HTTP + SSE Universal, no WS infra needed, works through all proxies
Adapter loading Dynamic import() scan Drop-in plugins, zero router changes
Auth Delegated to Ingress Keeps router stateless and horizontally scalable
K8s packaging Helm + plain YAML Works with ArgoCD, Flux, or raw kubectl
Image Distroless nonroot Minimal 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

Variable Required Description
ANTHROPIC_API_KEY For claude adapter Anthropic API key
CURSOR_API_URL For cursor adapter Cursor REST endpoint URL
CURSOR_API_KEY For cursor adapter Bearer token for Cursor API
CURSOR_CLI_PATH For cursor adapter Path to Cursor binary (alternative to REST)
PORT No (default 3000) HTTP port
LOG_LEVEL No (default info) Pino log level
NODE_ENV No Set 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured