ig
Debug your Container and Kubernetes workloads with an AI interface
claude mcp add --transport stdio inspektor-gadget-ig-mcp-server docker run -i inspektor-gadget/ig-mcp-server \ --env READ_ONLY="false - enable read-only mode for safe production use" \ --env KUBECONFIG="path to kubeconfig file (required when deploying into Kubernetes)"
How to use
The IG MCP Server bridges Inspektor Gadget's kernel telemetry with large language models via the Model Context Protocol. It exposes a set of tools that you can invoke from an MCP client or IDE to deploy Inspektor Gadget gadgets, start tracing, and retrieve enriched telemetry in structured JSON. Core capabilities include deploying and managing the gadget lifecycle (ig_deploy), listing and controlling running gadgets (ig_gadgets), and a suite of dynamically registered gadget tools (gadget_trace_, gadget_snapshot_, gadget_top_*) that allow you to collect DNS traces, TCP connections, process executions, file opens, block I/O, and more. You can run gadgets in foreground for quick debugging or in background for continuous observability, and you can constrain the server to read-only mode for safe production usage. With dynamic tool registration, each gadget appears as its own MCP tool with full parameter support, enabling precise queries like gadget_trace_dns(namespace=default, duration=10s) or gadget_snapshot_process(pid=1234). The server can be run locally as a binary, in a Docker container, or directly inside a Kubernetes cluster for HTTP transport accessibility.
How to install
Prerequisites:
- Docker installed and running, or a Kubernetes cluster for direct deployment
- kubeconfig configured if deploying into Kubernetes
- Access to the MCP client tooling compatible with your editor/IDE (VS Code, Copilot CLI, Claude Code, etc.)
Install via Docker (recommended for quick setup):
- Ensure Docker is running and you have network access to pull images.
- Start the MCP server container: docker run -i --env READ_ONLY=false --env KUBECONFIG=/path/to/kubeconfig -v /path/to/kubeconfig:/path/to/kubeconfig inspektor-gadget/ig-mcp-server
- Connect your MCP client to the running server (the client configuration will depend on your IDE or CLI).
Install as a direct binary (if available in your environment):
- Download the latest binary from the release page.
- Make it executable: chmod +x ig-mcp-server
- Run the server: ./ig-mcp-server
Deploy into Kubernetes (HTTP transport):
- Apply the deployment manifests provided in INSTALL.md or the repository install guide.
- Ensure the IG MCP Server pod has access to the cluster and to your kubeconfig if needed by gadgets.
- Configure your MCP client to communicate with the server's HTTP endpoint exposed by the Ingress/Service.
Notes:
- The README references a comprehensive INSTALL.md with client setup and all configuration options; consult that guide for environment-specific steps and advanced options.
Additional notes
Tips and common issues:
- If gadgets fail to attach, verify that the worker node has sufficient privileges to load eBPF probes and that the appropriate kernel headers are available.
- When running in read-only mode, destructive gadget operations will be blocked; ensure this setting aligns with your security posture.
- If using Kubernetes, ensure your kubeconfig path is correctly mounted or configured in the container environment so gadgets can attach to pods properly.
- Environment variables like KUBECONFIG and READ_ONLY can be overridden at runtime to tailor the server's behavior to your environment.
- The available tools are dynamically registered based on your gadget configuration; you can customize which gadgets are exposed by configuring Inspektor Gadget accordingly.
- For troubleshooting, start with ig_deploy to confirm the gadget deployment status, then use gadget_trace_dns or gadget_trace_tcp to validate telemetry collection.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
mcpcan
MCPCAN is a centralized management platform for MCP services. It deploys each MCP service using a container deployment method. The platform supports container monitoring and MCP service token verification, solving security risks and enabling rapid deployment of MCP services. It uses SSE, STDIO, and STREAMABLEHTTP access protocols to deploy MCP。
mcp-for-argocd
An implementation of Model Context Protocol (MCP) server for Argo CD.
jetski
Authentication, analytics, and prompt visibility for MCP servers with zero code changes. Supports OAuth2.1, DCR, real-time logs, and client onboarding out of the box
k8s
Manage Your Kubernetes Cluster with k8s mcp-server
mcp-victoriametrics
The implementation of Model Context Protocol (MCP) server for VictoriaMetrics