接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
The Inspektor Gadget MCP Server bridges Inspektor Gadget's low-level kernel observability with LLMs through the Model Context Protocol (MCP). It turns raw eBPF-powered telemetry—DNS traces, TCP connections, process executions, file activity, syscalls, and more—into actionable intelligence that AI agents can reason over, enabling data-driven root cause analysis directly from your IDE or AI chat interface.
flowchart LR
User["👤 User<br/>(IDE / Chat)"]
LLM["🤖 LLM"]
MCP["⚙️ IG MCP Server"]
IG["🔍 Inspektor Gadget"]
Kernel["🐧 Linux Kernel<br/>(eBPF)"]
K8s["☸️ Kubernetes<br/>Cluster"]
User -- prompt --> LLM
LLM -- MCP tool calls --> MCP
MCP -- run gadgets --> IG
IG -- eBPF hooks --> Kernel
Kernel -. telemetry .-> IG
IG -. enriched data .-> MCP
MCP -. structured JSON .-> LLM
LLM -- analysis & RCA --> User
IG -- metadata --> K8s
gadget_trace_dns, gadget_trace_tcp), with parameters, field descriptions, and filtering automatically generated from gadget metadata.Kubernetes troubleshooting is hard. Traditional tools give you logs, metrics, and high-level resource states—but when things go wrong at the network, syscall, or kernel level, there's a gap between what you can see and what's actually happening.
Inspektor Gadget fills this gap. It provides modular observability units called gadgets—eBPF programs that hook into the Linux kernel to collect low-level telemetry data in real time. Gadgets can trace DNS queries, TCP connections, process executions, file opens, signals, OOM kills, syscalls, and much more, all enriched with Kubernetes metadata (pod, namespace, container, node).
This kernel-level data is a superpower, but it's also dense. A single 10-second DNS trace can produce hundreds of events across dozens of pods. Manually sifting through raw telemetry to correlate events, spot anomalies, and identify root causes requires deep expertise and significant time.
LLMs are the missing piece. By exposing Inspektor Gadget through MCP, AI agents can:
sequenceDiagram
actor User
participant LLM
participant MCP as IG MCP Server
participant IG as Inspektor Gadget
participant K8s as Kubernetes
User->>LLM: "DNS is failing for my pod in default namespace"
activate LLM
LLM->>MCP: ig_deploy(action: is_deployed)
MCP-->>LLM: ✅ Deployed
LLM->>MCP: gadget_trace_dns(namespace: default, duration: 10s)
MCP->>IG: Run trace_dns gadget
IG->>K8s: Attach eBPF probes
K8s-->>IG: DNS events (queries, responses, latencies)
IG-->>MCP: Enriched telemetry (pod, namespace, container)
MCP-->>LLM: Structured JSON results
LLM->>MCP: gadget_trace_dns(namespace: kube-system, duration: 10s)
MCP->>IG: Run trace_dns on kube-system
IG-->>MCP: CoreDNS telemetry
MCP-->>LLM: Structured JSON results
deactivate LLM
LLM->>User: 📋 RCA: "NXDOMAIN errors for service.wrong-ns.svc.cluster.local — the service is in a different namespace. Latency is normal (2-5ms), CoreDNS is healthy."
The AI selects relevant gadgets, collects data, and analyzes results—all in a single conversational flow:
The LLM autonomously runs
gadget_tcpdumpandgadget_snapshot_socketto capture TCP connection RESET events, then analyzes the enriched telemetry to identify the exact connection that was refused, correlating it with the pod and container metadata to provide a precise root cause analysis.
kubeconfig fileThe IG MCP Server can be installed via Docker, binary, or deployed directly into your Kubernetes cluster. See the Installation Guide for full instructions, client setup (VS Code, Copilot CLI, Claude Code), and all configuration options.
Each gadget is registered as its own MCP tool, prefixed with gadget_, with full parameter support. The available gadgets depend on your configuration:
Each tool supports foreground (default) and background run modes, field-level output filtering, and produces structured JSON output that the LLM automatically summarizes.
⚠️ Context window note: Every registered MCP tool consumes part of the LLM's context window — its tool definition, parameter schema, and field descriptions all count toward the limit. If you're working with a model that has a smaller context window, or you want to maximize the space available for gadget output and analysis, use
-gadget-imagesto load only the gadgets you need instead of discovering all available gadgets via Artifact Hub. For example,-gadget-images=trace_dns:latest,trace_tcp:latestregisters just two tools instead of 30+.
Control which gadgets are available:
-gadget-discoverer=artifacthub)-gadget-images=trace_dns:latest,trace_tcp:latest)See INSTALL.md for all configuration options.
-read-only mode to restrict to non-destructive operationsApache License 2.0 — see LICENSE for details.
Debug your Container and Kubernetes workloads with an AI interface
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Ig 透過 stdio 在本機執行。
上次檢查時間:2026-10-27。 Debug your Container and Kubernetes workloads with an AI interface