MCP Directory

How to add Inspektor Gadget MCP Server to Claude Desktop

Debug Kubernetes & container workloads with eBPF kernel telemetry through an AI interface. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 26โ˜… ยท stdio ยท no auth

Claude Desktop config for Inspektor Gadget MCP Server

docker run -i --mount type=bind,src=${HOME}/.kube/config,dst=/kubeconfig ghcr.io/inspektor-gadget/ig-mcp-server:latest -gadget-discoverer=artifacthub
{
  "mcpServers": {
    "inspektor-gadget-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--mount",
        "type=bind,src=${env:HOME}/.kube/config,dst=/kubeconfig",
        "ghcr.io/inspektor-gadget/ig-mcp-server:latest",
        "-gadget-discoverer=artifacthub"
      ]
    }
  }
}

Requires Docker to be installed and running.

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Inspektor Gadget MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Inspektor Gadget MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • A valid kubeconfig file with access to your Kubernetes cluster
  • Docker (for the Docker-based installation) or a compatible binary for your platform
  • An MCP-compatible client (VS Code, GitHub Copilot CLI, Claude Code, etc.)
  • Either -gadget-discoverer or -gadget-images must be specified or the server will not start

What Inspektor Gadget MCP Server can do in Claude Desktop

ig_deploy

Deploy, upgrade, undeploy, or check the status of Inspektor Gadget on your cluster.

ig_gadgets

List running gadgets, retrieve results from background runs, or stop gadgets.

gadget_trace_dns

Dynamically registered tracing gadget tool that captures real-time DNS queries and responses.

gadget_trace_tcp

Dynamically registered tracing gadget tool that captures real-time TCP connection events.

gadget_trace_exec

Dynamically registered tracing gadget tool that captures real-time process executions.

gadget_trace_open

Dynamically registered tracing gadget tool that captures real-time file open events.

gadget_snapshot_process

Dynamically registered snapshot gadget tool that returns a point-in-time snapshot of running processes.

gadget_snapshot_socket

Dynamically registered snapshot gadget tool that returns a point-in-time snapshot of open sockets.

Security

Requires read-only access to your kubeconfig file and network access for Artifact Hub discovery. The server does not implement built-in authentication; for HTTP/in-cluster deployments, place it behind a reverse proxy with auth + TLS and restrict access with network policies. Use -read-only mode to limit the server to non-destructive operations. Every registered gadget tool consumes LLM context window, so prefer -gadget-images to load only the gadgets you need on smaller-context models.

Inspektor Gadget MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Inspektor Gadget MCP Server config there under the "mcpServers" key and restart the client.

Is Inspektor Gadget MCP Server safe to use with Claude Desktop?

Requires read-only access to your kubeconfig file and network access for Artifact Hub discovery. The server does not implement built-in authentication; for HTTP/in-cluster deployments, place it behind a reverse proxy with auth + TLS and restrict access with network policies. Use -read-only mode to limit the server to non-destructive operations. Every registered gadget tool consumes LLM context window, so prefer -gadget-images to load only the gadgets you need on smaller-context models.

Does the server require Kubernetes?

Yes. The environment currently supported is 'kubernetes', and you need a valid kubeconfig with cluster access. Inspektor Gadget itself must be deployable on the cluster (the ig_deploy tool can deploy/upgrade/undeploy it).

How are gadget tools chosen and registered?

Each gadget becomes its own MCP tool prefixed with gadget_. You either discover gadgets automatically from Artifact Hub (-gadget-discoverer=artifacthub) or specify exact images (-gadget-images=trace_dns:latest,trace_tcp:latest). You must supply one of the two or the server won't start.

Why might I limit which gadgets are loaded?

Every registered MCP tool consumes part of the LLM's context window (its schema and field descriptions). On smaller-context models, use -gadget-images to register only the gadgets you need (e.g. two tools instead of 30+) to leave more room for gadget output and analysis.

View repo Full Inspektor Gadget MCP Server page