Skip to content

ravi100k/mcp-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Platform

Managed Control Platform (MCP) is a Kubernetes governance and assurance platform.

This starter monorepo contains:

  • control-plane: central service that tracks clusters and certification results
  • agent: cluster-side service that performs validations and policy checks
  • web: demo frontend for platform overview and certification status

Modes

The repo now supports two agent modes:

  • demo: seeded in-memory clusters for presentation and local UI work
  • live: real cluster inventory collected from kubectl

The live mode reads actual cluster state such as nodes, storage classes, PVCs, pods, and VolumeSnapshots when available. The resulting certification report is therefore based on real inventory, but the checks are still heuristic inventory checks rather than destructive runtime fault-injection tests.

Production-Oriented Flow

The control plane now supports a more realistic cluster registration path:

  • agents discover cluster inventory locally
  • agents send heartbeat registrations to the control plane
  • the control plane persists discovered clusters and certification reports in Postgres

If DATABASE_URL is not set, the control plane falls back to the in-memory store.

Quick Start

1. Start the control plane

go run ./control-plane/cmd/server

2. Start the agent

go run ./agent/cmd/agent

3. Start the web app

cd web
npm run dev

The demo surfaces three seeded clusters:

  • prod-bank-1: healthy and fully certified
  • uat-bank-1: mixed posture with warning-level findings
  • dev-bank-1: intentionally noisy baseline for demo contrast

Open http://localhost:5173 and run certification against any cluster to generate a report.

Live Cluster Mode

If kubectl is installed and your kube context is configured, you can expose a real cluster in the UI alongside the demo clusters.

1. Start the agent in live mode

$env:AGENT_ENABLE_LIVE_CLUSTER="true"
$env:AGENT_CLUSTER_ID="live-cluster"
$env:AGENT_CLUSTER_ENVIRONMENT="LAB"
$env:AGENT_APPROVED_NAMESPACES="regulated-payments,regulated-identity,regulated-ops"
go run .\agent\cmd\agent

Optional:

  • set KUBECONFIG if you want a non-default kubeconfig path
  • set KUBECTL_BIN if kubectl is not on PATH
  • set AGENT_KUBECTL_TIMEOUT such as 20s

2. Start the control plane with the live cluster exposed

$env:LIVE_CLUSTER_ID="live-cluster"
$env:LIVE_CLUSTER_ENVIRONMENT="LAB"
go run .\control-plane\cmd\server

3. Start the web app

cd web
npm run dev

Then open http://localhost:5173, choose live-cluster, and run certification.

4. Test the live agent directly

curl "http://localhost:8081/api/v1/inventory?clusterId=live-cluster"
curl -Method POST "http://localhost:8081/api/v1/certify" -Body '{"clusterId":"live-cluster"}' -ContentType "application/json"

Docker Compose

The compose stack now includes:

  • postgres: persistence for registered clusters and certification reports
  • control-plane: API and persistence layer
  • agent: cluster inventory and heartbeat sender
  • web: UI

Start the stack with live discovery enabled:

cd d:\go-workspace\src\github.com\mcp-platform
$env:AGENT_ENABLE_LIVE_CLUSTER="true"
docker compose up --build

Important environment variables:

  • DATABASE_URL: Postgres connection string for the control plane
  • CONTROL_PLANE_BASE_URL: where the agent sends heartbeat registrations
  • AGENT_HEARTBEAT_INTERVAL: how often the agent re-registers
  • CONTROL_PLANE_SEED_DEMO_CLUSTERS: keep demo clusters enabled or disable them for live-only mode

Kubernetes Release Manifests

For easy installs, the repo now includes single-file Kubernetes deployment bundles:

  • deploy/releases/all-in-one.yaml
  • deploy/releases/v0.2.0/mcp-agent.yaml
  • deploy/releases/latest/mcp-agent.yaml

Apply one file directly:

kubectl apply -f deploy/releases/v0.2.0/mcp-agent.yaml

To regenerate release bundles from the source manifests:

.\scripts\build-release-manifest.ps1 -Version v0.2.0

Sample Workloads

To seed a cluster with realistic namespaces, PVCs, and workloads for MCP to inspect:

kubectl apply -f deploy/samples/cluster-demo/all-in-one.yaml

This sample creates:

  • regulated-payments with a PVC-backed 2-replica app
  • regulated-identity with a PVC-backed app
  • fintech-lab with a PVC-backed sandbox app

Files:

  • deploy/samples/cluster-demo/all-in-one.yaml
  • deploy/samples/cluster-demo/README.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors