- Home
- MCP servers
- Inspektor Gadget
Inspektor Gadget
- go
21
GitHub Stars
go
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"inspektor-gadget-ig-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--volume",
"ig-mcp-cache:/root/.cache/ig-mcp-server",
"--mount",
"type=bind,src=${env:HOME}/.kube/config,dst=/kubeconfig",
"ghcr.io/inspektor-gadget/ig-mcp-server:latest",
"-gadget-discoverer=artifacthub"
],
"env": {
"IG_MCP_CACHE": "$HOME/.cache/ig-mcp-server"
}
}
}
}You run the Inspektor Gadget MCP Server to enable AI-powered debugging and inspection for Kubernetes clusters from your MCP client. It provides automated gadget discovery, one-click deployment, and intelligent analysis to help you troubleshoot and monitor clusters directly from your development environment.
How to use
You connect to the MCP server from your MCP-enabled client. The server exposes gadget-based tools as MCP endpoints. Use the available gadgets to perform troubleshooting tasks such as DNS tracing or process/socket snapshots, and review summarized results. Gadget discovery can be automatic via Artifact Hub or manual by selecting specific gadgets to load.
How to install
Prerequisites you need before installation:
-
Docker installed on your workstation or CI environment.
-
A valid kubeconfig file that can access your Kubernetes cluster.
Install using Artifact Hub discovery (Docker method)
code --add-mcp '{
"name": "inspektor-gadget",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--volume",
"ig-mcp-cache:/root/.cache/ig-mcp-server",
"--mount",
"type=bind,src=${env:HOME}/.kube/config,dst=/kubeconfig",
"ghcr.io/inspektor-gadget/ig-mcp-server:latest",
"-gadget-discoverer=artifacthub"
]
}'
Install using explicit gadgets (Docker method)
code --add-mcp '{
"name": "inspektor-gadget",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--volume",
"ig-mcp-cache:/root/.cache/ig-mcp-server",
"--mount",
"type=bind,src=${env:HOME}/.kube/config,dst=/kubeconfig",
"ghcr.io/inspektor-gadget/ig-mcp-server:latest",
"-gadget-images=trace_dns:latest,trace_tcp:latest,snapshot_process:latest,snapshot_socket:latest"
]
}'
Binary installation options
You can download and install a prebuilt binary for your platform, then add it to your MCP configuration.
# Linux
MCP_VERSION=$(curl -s https://api.github.com/repos/inspektor-gadget/ig-mcp-server/releases/latest | jq -r .tag_name)
MCP_ARCH=amd64
curl -sL https://github.com/inspektor-gadget/ig-mcp-server/releases/download/${MCP_VERSION}/ig-mcp-server-linux-${MCP_ARCH}.tar.gz | sudo tar -C /usr/local/bin -xzf - ig-mcp-server
# macOS
MCP_VERSION=$(curl -s https://api.github.com/repos/inspektor-gadget/ig-mcp-server/releases/latest | jq -r .tag_name)
MCP_ARCH=arm64
curl -sL https://github.com/inspektor-gadget/ig-mcp-server/releases/download/${MCP_VERSION}/ig-mcp-server-darwin-${MCP_ARCH}.tar.gz | sudo tar -C /usr/local/bin -xzf - ig-mcp-server
# Windows (PowerShell)
$MCP_VERSION = (curl.exe -s https://api.github.com/repos/inspektor-gadget/ig-mcp-server/releases/latest | ConvertFrom-Json).tag_name
$MCP_ARCH = "amd64"
curl.exe -L "https://github.com/inspektor-gadget/ig-mcp-server/releases/download/$MCP_VERSION/ig-mcp-server-windows-$MCP_ARCH.tar.gz" -o "ig-mcp-server.tar.gz"
$destPath = "C:\\Program Files\\ig-mcp-server"
if (-Not (Test-Path $destPath -PathType Container)) { mkdir $destPath}
tar.exe -xzf "ig-mcp-server.tar.gz" -C "$destPath"
rm ig-mcp-server.tar.gz
Write-Host "✅ Extracted to $destPath"
Write-Host "👉 Please add '$destPath' to your PATH environment variable manually."
Finalize MCP configuration in your client
After configuring the MCP server, you can start using AI commands and gadget-based tools in your client. The server supports automatic gadget discovery and explicit gadget loading, allowing you to tailor the available tools to your needs.
Configuration options and notes
-
Gadget discovery can be automatic via Artifact Hub or manual by specifying gadgets directly.
-
You can limit the tools available by choosing the gadget-discoverer or gadget-images options.
-
The server requires read-only access to your kubeconfig and needs network access for Artifact Hub discovery.
Security considerations
-
Ensure your kubeconfig permissions are restricted to what is necessary.
-
Review network access policies for Artifact Hub discovery and gadget downloads.
Resources and support
Explore related tooling and community channels for support, troubleshooting, and updates.
Available tools
ig_deploy
Manage deployment of Inspektor Gadget on the target Kubernetes cluster
ig_gadgets
Manage the lifecycle of running gadgets (stop/list/get-results)
gadget_trace_dns
Trace DNS traffic gadget for troubleshooting DNS behavior in the cluster
gadget_trace_tcp
Trace TCP connections gadget for monitoring network activity in the cluster
gadget_snapshot_process
Snapshot process state for debugging pod behavior
gadget_snapshot_socket
Snapshot sockets for in-depth process/socket analysis