MCP Directory

How to add Inspektor Gadget MCP Server to Windsurf

Debug Kubernetes & container workloads with eBPF kernel telemetry through an AI interface. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 26 · stdio · no auth

Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Inspektor Gadget MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Inspektor Gadget MCP Server's tools become available to Cascade.

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 Windsurf

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_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 Windsurf?

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