mcp-platform-tools
Provides rollout_status to read an Argo Rollouts canary's phase, current step, stable and canary revisions, and whether it was aborted.
Provides deployment_status to read a Kubernetes Deployment's desired, ready, updated, and available replicas, conditions, and images, limited to allowlisted namespaces with get-only access.
Provides slo_status and gateway_spend by querying Prometheus for SLO objectives, error budgets, burn rates, firing alerts, and LLM gateway spend and token metrics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-platform-tools: a governed, read-only MCP server for platform status
A reference implementation of a Model Context Protocol server that platform teams can safely hand to AI agents. An SRE copilot or an incident bot can ask:
"is the llm-gateway canary healthy?"
"how much error budget is left?"
"what did the payments team spend on models this week?"
The agent gets an answer without ever touching kubectl, PromQL or credentials.
Four read-only tools sit on top of the platform built in the other repositories:
Tool | Reads | Scope |
| a Kubernetes Deployment: desired, ready, updated, available, conditions, images |
|
| an Argo Rollouts canary from gitops-argocd-fleet: phase, step, stable and canary revisions, aborted |
|
| objective, error budget remaining, 1h and 6h burn rates, and firing alerts, from the rules generated by monitoring-observability-stack |
|
| llm-gateway spend in USD and tokens per team and model over 1h, 24h, 7d or 30d |
|
flowchart LR
A[AI agent<br/>MCP client] -->|Streamable HTTP<br/>Bearer JWT, aud = this server| S[mcp-platform-tools]
IdP[OAuth 2.1 / OIDC<br/>authorization server] -.->|access token with scopes| A
S -.->|JWKS| IdP
S --> G{governed: scope, allowlist,<br/>rate limit, timeout, cap, audit}
G -->|get only, own service account| K[Kubernetes API]
G -->|instant queries| P[Prometheus<br/>SLO rules + gateway metrics]
G --> L[(audit log, JSON lines)]Governance
Every call goes through the same wrapper (ADR 0001). A prompt-injected agent can at most read a summary it was already allowed to read.
Authentication. An OAuth 2.1 resource server. JWT access tokens must name this server as their audience (RFC 8707). Protected-resource metadata is published at
/.well-known/oauth-protected-resource(RFC 9728). There is no token passthrough: backends are called with the server's own identity (ADR 0002).Authorization. Each tool needs one scope. Namespaces, services and teams are allowlisted in the server's config.
Input. zod schemas: DNS-1123 names and a fixed set of time windows. PromQL is built only from values that passed both the schema and the allowlist.
Limits. A token-bucket rate limit per principal, a timeout on every backend call, a 16 KB result cap and a 64 KB request cap.
Output. Typed summaries, never raw API objects, so a Deployment's environment variables never leave the server. Backend errors reach the agent as a generic message.
Audit. One JSON line per call: principal, client, tool, arguments, decision, outcome, reason, duration, result size. Denials are logged too.
Transport. Stateless Streamable HTTP. Requests from browser origins outside
allowedOriginsare refused, which protects against DNS rebinding (ADR 0004).Kubernetes.
geton deployments and rollouts, bound per allowlisted namespace. Nolist, no Secrets, nothing cluster-wide (ADR 0003, deploy/kubernetes).
Related MCP server: mcp-k8s-context-server
Verified against real systems
The end-to-end test calls the tools over HTTP with the MCP SDK client, against:
the llm-gateway image under traffic
Prometheus evaluating monitoring-observability-stack's generated SLO rules
a Kubernetes cluster
this repository's container image
It checks that every call is audited. A local run against the gitops fleet and the monitoring demo stack returned:
rollout_status {"phase":"Healthy","step":5,"steps":5,"stableRevision":"6b7b985989","aborted":false}
slo_status availability: objective 0.995, budget remaining -2.83, burn rate 1h 2.88,
firing: LlmGatewayAvailabilitySlowBurn (ticket) <- the demo's deliberate 2% errors
gateway_spend slo-demo: $0.0241 over 1h, 1389 input and 926 output tokens
deployment_status kube-system/coredns -> "namespace "kube-system" is not in this server's allowlist"Building the tests caught a real bug. llm-gateway labels token directions
prompt/completion, not input/output
(ADR 0005).
Run it
npm ci
npm test # 28 unit tests
npm run coverage # coverage gate: 85% lines, 75% branches
npm run build && MCP_CONFIG=config.json npm startConfiguration is one JSON file, validated at start-up by src/config.ts:
{
"resource": "https://mcp.platform.example.com/mcp",
"auth": {"issuer": "https://login.example.com/", "jwksUrl": "https://login.example.com/.well-known/jwks.json"},
"allow": {"namespaces": ["llm-gateway"], "services": ["llm-gateway"], "teams": ["payments", "research"]},
"prometheus": {"url": "http://kube-prometheus-stack-prometheus.monitoring.svc:9090"},
"kubernetes": {"apiServer": "https://kubernetes.default.svc", "tokenFile": "/var/run/secrets/kubernetes.io/serviceaccount/token"}
}Deploy with deploy/kubernetes/mcp-platform-tools.yaml,
using the signed image ghcr.io/muhfawad1/mcp-platform-tools. Releases are multi-arch,
keyless-signed with Sigstore, with an SBOM and provenance. The signature's identity, this
repository's release.yml on a version tag, matches the gitops fleet's Kyverno
signature policy.
What CI checks
Job | Checks |
Test | ESLint (strict, type-checked), |
End to end | the container image against llm-gateway, Prometheus with the SLO rules, and a kind cluster; every call audited, a denial included |
Image | Trivy finds no fixable HIGH or CRITICAL vulnerabilities in the image, and no misconfigurations in the Kubernetes manifests |
Design decisions
ADR | Decision |
Governance lives in the server, not in the agent's prompt | |
An OAuth 2.1 resource server, as the MCP authorization spec describes | |
Least privilege at every backend | |
Stateless Streamable HTTP, behind an Origin check | |
Test against the real systems the tools read |
Layout
src/
auth.ts JWT access-token verification, scopes
governance.ts scope check, rate limit, timeout, result cap, audit
tools/ the four tools and their input schemas
backends/ Prometheus and Kubernetes clients
server.ts MCP server with read-only tool annotations
http.ts protected-resource metadata, health, /mcp with bearer auth
test/ unit tests; e2e/ against real systems
deploy/kubernetes/ namespace, RBAC per namespace, config, Deployment, ServiceRoadmap
Per-tool, per-principal allowlists from token claims (for example, a team claim that limits
gateway_spendto the caller's own team).OpenTelemetry spans per tool call, correlated with the audit log.
An agent-eval-harness suite where an agent uses these tools to triage an incident.
Argo Rollouts in the CI cluster, so
rollout_statusruns end to end.A Helm chart and an ApplicationSet entry in gitops-argocd-fleet.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only production context for AI agents: Docker/K8s health, deploys, logs, traffic, code graph
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Fail-closed policy guardrails for AI agents running kubectl, terraform, helm, and argocd.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI agents to execute read-only DevOps operations including kubectl, terraform, helm, docker, and AWS cost analysis through natural language.11MIT
- FlicenseNot gradedqualityCmaintenanceProvides a read-only interface to Kubernetes clusters, enabling LLMs to list pods, get pod status and logs, fetch deployment manifests, and perform pod health analysis with resource trend tracking.-
- AlicenseAqualityDmaintenanceGives AI assistants read-only access to a Kubernetes cluster's observability stack — Loki, Prometheus, Tempo, the Kubernetes API — plus AWS telemetry from CloudTrail, Config, ECR, and RDS. 23 tools for querying logs, metrics, traces, Kubernetes events, deployments, and audit history in plain language.23Apache 2.0
- AlicenseBqualityCmaintenanceEnables AI assistants to query application projects directly for logs, metrics, incidents, and semantic search through read-only tools.17274 npm1MIT