K8s Observability MCP

K8s Observability MCP

Enables exploration of Kubernetes metrics, logs, traces, and service graph data via simple tools.

Category
Visit Server

README

☸️ 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

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 install
  • Configure env
cp .env.example .env
# edit .env with your values

Run

poetry run python mcp_server.py

Then 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 resource
      • resource_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 resource
      • resource_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 resource
      • resource_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 for
      • only_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

Notes

  • Uses your default kubeconfig. Set TARGET_NAMESPACE in .env to scope queries.

  • πŸ•ΈοΈ Service graph docs: see service-graph/README.md for how the Neo4j service graph is built (Jaeger CALLS + static USES), how to load it, and the result image.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured