kahlo-mcp
Integrates with ArgoCD to discover applications, inspect health and sync status, and compare desired Git state with the live cluster to identify drift.
Integrates with Dynatrace to map Kubernetes entities to Dynatrace entity IDs and correlate them with problems, root causes, and evidence in a given timeframe.
Interacts with Kubernetes clusters via kubectl to list pods, retrieve logs and events, describe resources, and run commands or spawn ephemeral debug containers in pods.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kahlo-mcp why did the checkout deployment go unhealthy?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kahlo-mcp

An MCP server for SRE/GitOps forensics. It wraps kubectl, the ArgoCD REST
API, and the Dynatrace REST API into tools so an agent can autonomously
chase "why did this deployment go unhealthy"; find the app, see if the
live cluster has drifted from git, look at pods/events/logs, spawn a debug
container if it needs to look inside a running pod, and correlate what it
found against Dynatrace problems.
Setup
uv sync
cp .env.example .env # fill in your ArgoCD / Dynatrace credentialskubectl must be on PATH and already pointed at the target cluster
(via your normal kubeconfig, or KUBECTL_CONTEXT to pick a specific
context).
Run it directly:
uv run server.pyOr point a Claude Desktop / Claude Code MCP config at it, e.g.:
{
"mcpServers": {
"sre-gitops-forensics": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/frida", "run", "server.py"]
}
}
}Related MCP server: K8s Lens MCP
Configuration
Variable | Required for | Notes |
| kubectl tools | optional; defaults to current context |
| ArgoCD tools | e.g. |
| ArgoCD tools | a project or account API token |
| ArgoCD tools |
|
| Dynatrace tools | e.g. |
| Dynatrace tools | needs |
Tools
ArgoCD
list_argocd_apps(project="")— discover applications and their health/sync status.get_argocd_app_status(app)— health, sync status, last operation result, error conditions, unhealthy/out-of-sync resources.get_live_diff(app)— structural diff between the desired (git) state and the live cluster state, per managed resource. Filters out routine status/metadata noise so what's left is real drift (e.g. an out-of-bandkubectl edit).
kubectl
list_pods(namespace="", label_selector="", app="")— pods with phase, restarts, and any waiting/terminated reason (CrashLoopBackOff, OOMKilled, ImagePullBackOff, ...). Filtering byappmatches ArgoCD'sapp.kubernetes.io/instancetracking label.get_pod_logs(pod, namespace, container="", previous=False, tail_lines=200)describe_resource(kind, name, namespace)— rawkubectl describeoutput, including its event tail.get_events(cursor="", namespace="", involved_object="", limit=50)— cursor-paginated, chronological event feed for walking an incident timeline.exec_in_pod(pod, command, namespace, container="")— run a command in a pod/container, including a spawned debug container.spawn_ephemeral_debug_container(pod, namespace, image="busybox:1.36", target_container="", duration_seconds=3600, initial_command="")— attaches an ephemeral debug container viakubectl debugand waits for it to come up. Mutates the live pod and the container can't be removed short of restarting the pod — scope RBAC for this tool's identity accordingly (ephemeralcontainerspatch +pods/exec).
Dynatrace
find_dynatrace_entity(name, entity_type="")— map a Kubernetes workload/pod name to a Dynatrace entity ID.correlate_trace(dynatrace_entity_id, timeframe="now-2h")— entity identity/tags plus any problems (with root cause and evidence) in the given timeframe.
Typical forensics chain
list_argocd_apps
-> get_argocd_app_status(app)
-> get_live_diff(app) # is this drift, or a real bug?
-> list_pods(app=app) # which pod is actually unhealthy?
-> get_events(involved_object=pod) # what happened around the time it broke?
-> get_pod_logs(pod, previous=True) # what did it say before it died?
-> spawn_ephemeral_debug_container(pod) + exec_in_pod(...) # look inside, if logs aren't enough
-> find_dynatrace_entity(pod) -> correlate_trace(entity_id) # does this line up with a known problem?All tools return plain text and never raise — failures come back as
Error: ... strings so the calling agent can read what went wrong and try
a different path.
Available Tools
11 toolscorrelate_traceA
Given a Dynatrace entity ID (see find_dynatrace_entity), report its identity/tags plus any problems (with root cause and evidence) detected against it within the given timeframe (Dynatrace relative timeframe syntax, e.g. "now-2h", "now-1d"). This is the tool for "does the unhealthy deployment line up with a known Dynatrace problem".
Inputs: dynatrace_entity_id (required), timeframe. Returns: result
describe_resourceA
Run "kubectl describe" on any resource (pod, deployment, replicaset, service, ...) and return the raw text, including its event tail — useful for scheduling failures, probe failures, and admission errors that don't show up in get_events' short-lived event history.
Inputs: kind (required), name (required), namespace. Returns: result
exec_in_podA
Run a shell command inside a pod (or one of its containers, including an ephemeral debug container previously created with spawn_ephemeral_debug_container) and return its combined output. This is how you actually use a spawned debug container once it's running.
Inputs: pod (required), command (required), container, namespace, +1 more. Returns: result
find_dynatrace_entityA
Look up Dynatrace entity IDs by (partial) display name, optionally filtered by type (e.g. "CLOUD_APPLICATION", "KUBERNETES_CLUSTER", "PROCESS_GROUP_INSTANCE"). Use this to bridge a Kubernetes pod/workload name to the Dynatrace entity ID that correlate_trace needs.
Inputs: name (required), entity_type. Returns: result
get_argocd_app_statusA
Get an ArgoCD application's health, sync status, last sync operation result, error conditions, and which managed resources are unhealthy or out-of-sync. Good starting point before drilling into get_live_diff or the underlying pods.
Inputs: app (required). Returns: result
get_eventsA
Page through Kubernetes events in chronological order (oldest first). Pass involved_object to filter to events mentioning a pod/deployment/etc by name (substring match). Pass the next_cursor value returned by a previous call to continue from where you left off — useful for walking the event timeline around an incident without re-fetching everything.
Inputs: limit, cursor, namespace, involved_object. Returns: result
get_live_diffA
Compare an ArgoCD application's desired (git) state against what is actually running in the cluster, resource by resource. Reports drift as added/removed/changed spec fields, ignoring routine status/metadata noise (resourceVersion, managedFields, status subresource, etc). This is the tool for "did someone kubectl edit/patch something out-of-band" or "is the live pod spec what git says it should be".
Inputs: app (required). Returns: result
get_pod_logsA
Fetch recent logs for a pod (optionally a specific container). Set previous=True to get the logs of the last crashed instance of the container, which is usually what you want after a CrashLoopBackOff.
Inputs: pod (required), previous, container, namespace, +1 more. Returns: result
list_argocd_appsA
List ArgoCD applications with their health and sync status. Use this first to discover the application name to pass to get_live_diff or get_argocd_app_status when you don't already know it.
Inputs: project. Returns: result
list_podsA
List pods (optionally scoped by namespace, a raw label selector, and/or an ArgoCD app name — matched via the standard "app.kubernetes.io/instance" tracking label). Surfaces phase, restart counts, and the reason for any waiting/terminated container (CrashLoopBackOff, ImagePullBackOff, OOMKilled, etc) so unhealthy pods are visible at a glance.
Inputs: app, namespace, label_selector. Returns: result
spawn_ephemeral_debug_containerA
Attach an ephemeral debug container to a running pod via "kubectl debug" (e.g. to get a shell with tools a distroless/minimal app image lacks). The container sleeps for duration_seconds so it stays available; use exec_in_pod with the returned container name to run diagnostics against it (or against target_container's process namespace if target_container is set). Note: this mutates the live pod spec and the ephemeral container cannot be removed short of restarting the pod.
Inputs: pod (required), image, namespace, initial_command, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct diagnostic step: ArgoCD app listing/status/diff, Kubernetes pod/log/event/describe/debug operations, and Dynatrace entity lookup/correlation. There is no overlapping purpose; even the three ArgoCD tools are clearly separated by whether you need inventory, status, or spec drift.
All tools use snake_case verb_noun names with clear, consistent verbs: list/get/describe/exec/spawn/find/correlate. The pattern is predictable, so an agent can infer what a tool does from its name alone.
11 tools is a well-scoped size for a Kubernetes/ArgoCD/Dynatrace troubleshooting server. Each tool earns its place in the incident-investigation workflow without redundancy.
The set covers the full observability loop: discover an ArgoCD app, check status and drift, inspect pods/logs/events/describe, spawn debug containers and exec commands, then correlate with Dynatrace problems. No dead ends or obvious missing operations for the stated diagnostic purpose.
Maintenance
Related MCP Connectors
Read-only production context for AI agents: Docker/K8s health, deploys, logs, traffic, code graph
Deploy applications and manage governed Kubernetes preview spaces and capacity.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Watches reliability, change safety, security and cloud cost across your code and clouds.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables intelligent Kubernetes deployments, automated documentation testing, organizational pattern management, and shared prompt libraries. Provides AI-powered recommendations based on cluster capabilities and automates DevOps workflows through conversational interfaces.149 npm339MIT
- AlicenseNot gradedqualityBmaintenanceEnables natural language Kubernetes operations, including smart resource queries, pod root-cause analysis, cross-environment diffs, and manifest generation.29 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceProvides Kubernetes deployment intelligence with typed query tools and AI-synthesized risk briefs, enabling users to list workloads, get detailed snapshots, query Prometheus metrics, record deployment history, and generate risk assessments before promoting to production.Apache 2.0
- AlicenseBqualityCmaintenanceEnables read-only, stack-aware diagnostics for microservices on Kubernetes, turning debugging runbooks into conversational tools that investigate slow requests, changes, leaks, and in-pod conditions without exposing cluster credentials.57Apache 2.0