Labsco
MCP SERVER · OFFICIAL PROJECT

Kubeshark

by kubeshark

Ask questions about live Kubernetes traffic — HTTP, gRPC, Redis, Kafka, DNS — and answer them from the cluster's own capture.

Network, Endpoint & Fleet ManagementOfficial source
Summary
Cluster traffic as something you can query, with a filter language instead of tcpdump and a terminal.

KFL carries the weight: a filter like http and response.status == 500 narrows a live capture to the failures worth reading, and the same syntax covers HTTP, gRPC, Redis, Kafka and DNS. The reading tools work in either mode, while starting and stopping Kubeshark itself sits behind --allow-destructive — so an agent connected with the defaults cannot change what is deployed in the cluster.

What it is

The MCP server built into the Kubeshark CLI. It queries a Kubeshark deployment's real-time capture of cluster traffic: L7 API transactions, L4 flows, and PCAP snapshots.

What you get
  • Pods, services and namespaces that have traffic against them — list_workloads
  • L7 API transactions filtered in KFL, Kubeshark's query language, and the full detail of any single call — list_api_calls, get_api_call
  • Aggregated API statistics rather than individual calls — get_api_stats
  • TCP and UDP flows, and a connectivity summary over them — list_l4_flows, get_l4_flow_summary
  • PCAP snapshots created and listed, for going back over something after it happened — create_snapshot, list_snapshots
  • L7 protocol dissection checked, switched on and switched off — get_dissection_status, enable_dissection, disable_dissection
  • Whether Kubeshark is running in the cluster, and — only with --allow-destructive — deploying or removing it — check_kubeshark_status, start_kubeshark, stop_kubeshark
  • Prompts for the investigations people actually run: analyze_traffic, find_errors, trace_request, show_topology, latency_analysis, security_audit, compare_traffic, debug_connection
Requirements

The Kubeshark CLI on the machine — brew, the install script, or choco — launched as kubeshark mcp. By default it goes through your kube context, takes --kubeconfig for an explicit path, and mints and auto-renews its own kubeshark-cli token. Where there is no kubectl access, --url points straight at a Kubeshark Hub; against a gated Hub you supply the token yourself with --token or KUBESHARK_HUB_TOKEN, and since URL mode cannot renew it, that short-lived token — about an hour — expires into a 401 and has to be re-minted. Deploying or removing Kubeshark needs --allow-destructive.

Setup effort

One command plus a key — brew install kubeshark, then supply credentials