SuperAPI AI Directory

ig-mcp-server

Debug container and Kubernetes workloads with eBPF via Inspektor Gadget.

Open website

About this tool

Purpose

Inspektor Gadget MCP Server aims to bridge the gap between Inspektor Gadget's low-level kernel observability and large language models. Traditional Kubernetes troubleshooting tools can only provide logs, metrics, and high-level resource status, leaving an observability gap when problems occur at the network, syscall, or kernel level. This server exposes Inspektor Gadget's eBPF telemetry data to AI agents through the Model Context Protocol (MCP), enabling them to perform root cause analysis based on real kernel evidence.

Main Capabilities

  • AI-driven root cause analysis: LLMs can correlate low-level kernel data across multiple gadgets to pinpoint problems with evidence rather than guesswork.
  • Complete gadget lifecycle management: Deploy, run, stop, and retrieve results from Inspektor Gadget tools without leaving the AI chat interface.
  • Foreground and background modes: Foreground mode for quick debugging, background mode for continuous observability, with results available at any time.
  • Dynamic tool registration: Each gadget is automatically registered as an independent MCP tool (for example gadget_trace_dns, gadget_trace_tcp), with its parameters, field descriptions, and filtering options generated from gadget metadata.
  • Read-only mode: The server can be restricted to perform only non-destructive operations, suitable for production environments.
  • Flexible deployment: Can run as a local binary (stdio), a Docker container, or be deployed directly to a Kubernetes cluster (HTTP transport).

Usage

  1. Ensure Docker is installed and a valid kubeconfig file is available.
  2. Configure the MCP server in your IDE or CLI. The official INSTALL.md provides setup guides for VS Code, GitHub Copilot CLI, Claude Code, and other MCP-compatible clients.
  3. Start a conversation in natural language, for example "show DNS traffic", "are there any failed TCP connections?", or "deploy Inspektor Gadget".

It can be installed via Docker, a binary, or deployed directly to a Kubernetes cluster. The tool supports foreground (default)and background operation modes, field-level output filtering, and generates structured JSON output for automatic LLM summarization.

Applicable Scenarios

Suitable for developers and operators who need to diagnose containers and Kubernetes workloads, especially when troubleshooting low-level issues such as network connection failures, DNS query anomalies, process execution problems, file activity, syscalls, OOM kills, and more. AI agents can autonomously select appropriate gadgets, collect and cross-reference data, and ultimately explain findings in plain language and provide actionable recommendations.

Limitations

  • Requires a kubeconfig file (read-only access) and network access for Artifact Hub discovery.
  • Each registered MCP tool consumes LLM context window space; tool definitions, parameter schemas, and field descriptions all count toward the limit. For models with smaller context windows, it is recommended to use the -gadget-images parameter to load only the needed gadgets, for example -gadget-images=trace_dns:latest,trace_tcp:latest registers only two tools instead of more than 30.
  • Gadget availability depends on configuration: it can be automatically discovered via Artifact Hub (-gadget-discoverer=artifacthub) or manually specified.
  • The -read-only mode is supported to restrict operations to non-destructive ones, and the official security guide is provided for setting up least privilege.
  • Other detailed configuration options, troubleshooting, and security settings require reference to the official documentation (INSTALL.md, Troubleshooting, Security Guide); the current material does not provide specific parameter details.