K8s Observability MCP
Fetches trace summaries and detailed spans (with errors) for services from Jaeger.
Provides tools for inspecting Kubernetes resources: listing pods and services, retrieving pod logs with filtering, and examining cluster overview.
Queries service dependency graph from Neo4j, showing which services are used by or depend on a given service.
Retrieves instant and range metrics (CPU, memory, network, etc.) for pods and services from Prometheus.
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.
βΈοΈ K8s Observability MCP
Small MCP server that lets you explore Kubernetes metrics, logs, traces, and service graph data via simple tools.
π Python 3.13
π Prometheus
π Jaeger
πΈοΈ Neo4j
βΈοΈ Kubernetes API
Features
π Get pod/service metrics (instant and range)
π Read pod/service logs with important-line filtering
π Service map from Neo4j (uses/depends)
π§ Cluster overview (pods and services)
π§΅ Trace summaries and details from Jaeger
Related MCP server: k8s-telemetry-mcp
Requirements
π Python 3.13+
π¦ Poetry
βΈοΈ Access to your cluster (kubeconfig on this machine)
π Prometheus URL
π Jaeger URL
πΈοΈ Neo4j URI, user, password
Setup
Install (Poetry)
poetry installConfigure env
cp .env.example .env
# edit .env with your valuesRun
poetry run python mcp_server.pyThen connect with your MCP client to use the tools.
Tools
π Kubernetes Resource Inspection
get_pods_from_service(service)Returns all pods belonging to a specific service
Shows pod names and current status (Running, Pending, etc.)
get_cluster_pods_and_services()Comprehensive cluster overview
Lists all pods and services with counts
π Metrics & Observability
get_metrics(resource_name, resource_type)Retrieves instant Prometheus metrics for a pod or service
Parameters:
resource_name: The exact name of the Kubernetes resourceresource_type: Either "pod" or "service"
Returns CPU, memory, network, thread, and container specifications
get_metrics_range(resource_name, resource_type, time_range_minutes)Historical metrics over a specified time range from Prometheus
Parameters:
resource_name: The exact name of the Kubernetes resourceresource_type: Either "pod" or "service"time_range_minutes: Historical lookback in minutes (minimum 1)
get_logs(resource_name, resource_type, tail=100, important=True)Retrieve pod/service logs with optional keyword filtering
Parameters:
resource_name: The exact name of the Kubernetes resourceresource_type: Either "pod" or "service"tail: Number of recent log lines to retrieve (default: 100)important: If true, filter for ERROR, WARN, CRITICAL keywords (default: true)
π Service Dependencies & Graph
get_services_used_by(service)Returns downstream services called by the given service
Shows service dependency chain (who calls whom)
get_dependencies(service)Retrieves infrastructure dependencies for a service
Includes databases, caches, message queues, etc.
π§΅ Distributed Tracing
get_traces(service_name, only_errors=False)Retrieves traces for a specific service from Jaeger
Parameters:
service_name: The name of the service to retrieve traces foronly_errors: If true, return only traces containing errors (default: false)
Returns: traceID, latency_ms, has_error, service sequence
get_trace(trace_id)Retrieves detailed information for a specific trace by ID
Parameters:
trace_id: The unique trace ID to retrieve
Includes all spans with timestamps, durations, tags, and errors
Dataset
ποΈ The anomaly-detection dataset that
anomaly/build.pybuilds from the AIOpsLab Hotel Reservation and Social Network runs. The dataset is composed of 132 runs (63 Hotel & 45 Social) and contains metrics, logs and traces (sampled at 100% for Hotel, 60% for Social). Keeevin16/AIOpsLab-app-collection-Hotel-Social (CC BY-NC 4.0).
Notes
Uses your default kubeconfig. Set TARGET_NAMESPACE in .env to scope queries.
πΈοΈ Service graph docs: see
service-graph/README.mdfor how the Neo4j service graph is built (Jaeger CALLS + static USES), how to load it, and the result image.
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
Provides read access to your GKE and Kubernetes resources.
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Read-only server insight: why a Linux server or K8s cluster is slow, failing or changed.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying Prometheus metrics, performing cluster diagnostics, and analyzing resource usage through natural language, with automatic Kubernetes connectivity.MIT
- AlicenseAqualityBmaintenanceGives 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 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
- AlicenseBqualityCmaintenanceEnables developers to investigate request failures by querying Prometheus metrics, Loki logs, and Tempo traces without opening Grafana, while supporting read-only access and optional Grafana annotations.11MIT