matzew/mcp-box

Kind based Cluster with K8S MCP Tooling

โ˜… 1Forks 0ShellGitHub โ†—Compare

README

๐Ÿ“ฆ MCP Box

A local Kubernetes playground for Model Context Protocol (MCP) servers, powered by Kind, the MCP Lifecycle Operator, and MCP Gateway.

Spin up a fully working MCP environment on your machine โ€” a Kind cluster, Gateway API with Istio, the MCP Gateway for federated tool access, and the MCP Launcher web UI for browsing and deploying MCP servers from a catalog.

โœจ Features

  • ๐ŸŒ MCP Gateway โ€” Federated access to all MCP servers through a single endpoint
  • ๐Ÿšช Gateway API + Istio โ€” Envoy-based gateway with ext_proc routing, no service mesh required
  • ๐Ÿš€ MCP Launcher โ€” Web UI to browse, configure, and deploy MCP servers from a catalog
  • ๐Ÿ”Œ Auto-registration โ€” Launcher automatically creates HTTPRoute and MCPServerRegistration for each deployed server
  • ๐Ÿงฉ MCP Lifecycle Operator โ€” Manages MCP server pods via MCPServer custom resources
  • ๐Ÿ“ฆ Single command setup โ€” ./mcp-box.sh gets you from zero to a working MCP gateway

๐Ÿ—๏ธ Architecture

                        localhost:7001 (NodePort)
                              โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   Kind Cluster                              โ”‚
โ”‚                             โ”‚                               โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  gateway-system          โ”‚                            โ”‚  โ”‚
โ”‚  โ”‚  โ”œโ”€ Istio (Gateway API provider)                      โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€ mcp-gateway (Envoy + ext_proc)                    โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  mcp-system                                           โ”‚  โ”‚
โ”‚  โ”‚  โ”œโ”€ MCP Gateway broker + router                       โ”‚  โ”‚
โ”‚  โ”‚  โ”œโ”€ MCP Gateway controller                            โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€ MCP Launcher (web UI)                             โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  mcp-catalog                                          โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€ Catalog ConfigMaps (server entries)               โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  kubernetes-mcp-server (optional, script 05)          โ”‚  โ”‚
โ”‚  โ”‚  โ”œโ”€ MCPServer CR                                      โ”‚  โ”‚
โ”‚  โ”‚  โ”œโ”€ HTTPRoute + MCPServerRegistration (kube_ prefix)  โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€ ServiceAccount (mcp-editor)                       โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ Prerequisites

  • Kind installed
  • kubectl installed
  • A container runtime โ€” Podman (Linux) or Docker (macOS)

๐Ÿš€ Getting Started

Run everything with a single command:

./mcp-box.sh

This installs the full platform: Kind cluster, MCP Lifecycle Operator, Istio, MCP Gateway, and the Launcher UI.

โž• Optional: Kubernetes MCP Server

Deploy the Kubernetes MCP Server with gateway integration (kube_ tool prefix):

./scripts/05-kubernetes-mcp-server.sh

๐Ÿ”ง Gateway infrastructure only

Use install-base.sh to set up the gateway stack without the Launcher:

./install-base.sh

๐Ÿ“ Individual Scripts

./scripts/00-installer-kind.sh          # 1๏ธโƒฃ  Create Kind cluster (NodePort on 7001)
./scripts/01-mcp-lifecycle-operator.sh  # 2๏ธโƒฃ  Install MCP Lifecycle Operator
./scripts/02-gateway-api-istio.sh       # 3๏ธโƒฃ  Install Istio as Gateway API provider
./scripts/03-mcp-gateway.sh            # 4๏ธโƒฃ  Install MCP Gateway
./scripts/04-mcp-launcher.sh           # 5๏ธโƒฃ  Deploy MCP Launcher (web UI + catalog)
./scripts/05-kubernetes-mcp-server.sh  # 6๏ธโƒฃ  Deploy Kubernetes MCP Server (optional)

๐Ÿ” What Each Script Does

Script Description
mcp-box.sh ๐ŸŽ Wrapper that runs scripts 00โ€“04 in order
install-base.sh ๐Ÿ”ง Runs scripts 00โ€“03 (gateway infrastructure only)
00-installer-kind.sh ๐Ÿ—๏ธ Creates a Kind cluster with NodePort mapping (host 7001 โ†’ container 30080), patches CoreDNS for external resolution
01-mcp-lifecycle-operator.sh โš™๏ธ Installs the MCP Lifecycle Operator and waits for readiness
02-gateway-api-istio.sh ๐Ÿšช Installs Istio as a Gateway API provider (no service mesh, just the gateway)
03-mcp-gateway.sh ๐ŸŒ Installs MCP Gateway (broker, router, controller) with NodePort service
04-mcp-launcher.sh ๐Ÿš€ Installs the MCP Launcher web UI with sample catalog entries
05-kubernetes-mcp-server.sh ๐Ÿงฉ Deploys the Kubernetes MCP Server with HTTPRoute + MCPServerRegistration (kube_ prefix). Not run by mcp-box.sh

โœ… Verifying the Setup

Check that all pods are running:

kubectl get pods -A

Check registered MCP servers on the gateway:

kubectl get mcpserverregistrations.mcp.kuadrant.io -A

๐ŸŒ Accessing the Gateway

The gateway is exposed via NodePort on localhost:7001:

http://localhost:7001/mcp

Or via port-forward:

kubectl port-forward -n gateway-system svc/mcp-gateway-istio 8001:8080
# โ†’ http://localhost:8001/mcp

๐Ÿš€ Accessing the MCP Launcher

kubectl port-forward -n mcp-system svc/mcp-launcher 9090:8080

Then open http://localhost:9090 in your browser.

๐Ÿ”Ž MCP Inspector

Test the gateway with the MCP Inspector:

podman run --rm --network host ghcr.io/modelcontextprotocol/inspector:latest

Open http://localhost:6274 and connect to http://localhost:7001/mcp.

๐Ÿงน Cleanup

Delete the entire Kind cluster:

kind delete cluster

๐Ÿ“„ License

Apache License 2.0 โ€” see LICENSE.

Contributors

matzew

Issues