Skip to main content
Glama
kahlo-mcp

kahlo-mcp

kahlo-mcp

frida-kahlo

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 credentials

kubectl 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.py

Or 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_CONTEXT

kubectl tools

optional; defaults to current context

ARGOCD_SERVER

ArgoCD tools

e.g. https://argocd.example.com

ARGOCD_AUTH_TOKEN

ArgoCD tools

a project or account API token

ARGOCD_INSECURE_SKIP_VERIFY

ArgoCD tools

true to skip TLS verification (self-signed certs)

DYNATRACE_ENV_URL

Dynatrace tools

e.g. https://abc12345.live.dynatrace.com

DYNATRACE_API_TOKEN

Dynatrace tools

needs entities.read and problems.read scopes

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-band kubectl edit).

kubectl

  • list_pods(namespace="", label_selector="", app="") — pods with phase, restarts, and any waiting/terminated reason (CrashLoopBackOff, OOMKilled, ImagePullBackOff, ...). Filtering by app matches ArgoCD's app.kubernetes.io/instance tracking label.

  • get_pod_logs(pod, namespace, container="", previous=False, tail_lines=200)

  • describe_resource(kind, name, namespace) — raw kubectl describe output, 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 via kubectl debug and 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 (ephemeralcontainers patch + 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 tools
correlate_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

    A4.4/5.0

    Scored across 11 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      339
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables natural language Kubernetes operations, including smart resource queries, pod root-cause analysis, cross-environment diffs, and manifest generation.
      29 PyPI
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides 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
    • A
      license
      B
      quality
      C
      maintenance
      Enables 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.
      57
      Apache 2.0