| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Important
Breaking change — this MCP server now focuses on Sysdig Monitor.
Starting with the next major release, the dedicated Sysdig Secure tools (list_runtime_events, get_event_info, get_event_process_tree) have been removed from this server. For Sysdig Secure use cases, install the new @sysdig/secure-mcp-server package, which provides comprehensive coverage of Sysdig Secure capabilities.
This is an implementation of an MCP (Model Context Protocol) Server that exposes Sysdig Monitor capabilities to LLMs. New tools and functionalities will be added over time following semantic versioning. The goal is to provide a simple and easy-to-use interface for querying information from the Sysdig platform using LLMs.
For Sysdig Secure-specific workflows, use the dedicated @sysdig/secure-mcp-server.
Get up and running with the Sysdig MCP Server quickly using our pre-built Docker image.
Get your API Token: Go to your Sysdig instance and navigate to Settings > Sysdig Monitor API. This token is required to authenticate requests to the Sysdig Platform (See the Configuration section for more details).
Configure your MCP client:
Add the server configuration to your MCP client (e.g., Claude Desktop's claude_desktop_config.json). Choose your preferred installation method from the Server Setup section. The Docker method is the easiest to get started with since it requires no local toolchain.
Substitute the following placeholders with your actual values:
The server dynamically filters the available tools based on the permissions associated with the API token used for the request. If the token lacks the required permissions for a tool, that tool will not be listed.
k8s_list_clusters
k8s_list_nodes
k8s_list_workloads
k8s_list_pod_containers
k8s_list_cronjobs
k8s_list_count_pods_per_cluster
k8s_list_top_unavailable_pods
k8s_list_top_restarted_pods
k8s_list_top_http_errors_in_pods
k8s_list_top_network_errors_in_pods
k8s_list_top_cpu_consumed_workload
k8s_list_top_cpu_consumed_container
k8s_list_top_memory_consumed_workload
k8s_list_top_memory_consumed_container
k8s_list_underutilized_pods_cpu_quota
k8s_list_underutilized_pods_memory_quota
Note: When a time window is provided, the underlying PromQL is wrapped in the aggregation appropriate for each tool (avg_over_time, max_over_time, min_over_time, increase, etc.) and evaluated at end. See internal/infra/mcp/tools/README.md for the per-tool aggregation table.
The following environment variables are required for configuring the Sysdig SDK:
You can also set the following variables to override the default configuration:
You can find your API token in the Sysdig UI under Settings > Sysdig Secure API (or Sysdig Monitor API). Make sure to copy the token as it will not be shown again.
Example configuration (stdio):
# Required
SYSDIG_MCP_API_HOST=<your_sysdig_host>
SYSDIG_MCP_API_TOKEN=your-api-token-here
# Optional
SYSDIG_MCP_TRANSPORT=stdio
SYSDIG_MCP_LOGLEVEL=INFOExample configuration (streamable-http / sse):
# Required
SYSDIG_MCP_TRANSPORT=streamable-http
# Optional (Host and Token can be provided via HTTP headers)
# SYSDIG_MCP_API_HOST=<your_sysdig_host>
# SYSDIG_MCP_API_TOKEN=your-api-token-here
SYSDIG_MCP_LISTENING_PORT=8080
SYSDIG_MCP_LISTENING_HOST=
SYSDIG_MCP_MOUNT_PATH=/sysdig-mcp-serverTo use the MCP server tools, your API token needs specific permissions on the Sysdig platform. We recommend creating a dedicated Service Account (SA) with a custom role containing only the required permissions.
Permissions Mapping:
| Permission | Sysdig UI Permission Name |
|---|---|
| metrics-data.read | Data Access Settings: "Metrics Data" (Read) |
Additional Permissions:
Setting up Permissions:
Note: When selecting permissions, some dependent permissions may be automatically added by Sysdig.
For detailed instructions, see the official Sysdig Roles Administration documentation.
The MCP server is never invoked manually. Depending on the transport protocol, the MCP client either starts the server process automatically or connects to a running service:
If you have Go installed, the MCP client can run the server directly without cloning the repository. Configure your client with:
{
"mcpServers": {
"sysdig-mcp-server": {
"command": "go",
"args": [
"run",
"github.com/sysdiglabs/sysdig-mcp-server/cmd/server@latest"
],
"env": {
"SYSDIG_MCP_API_HOST": "<your_sysdig_host>",
"SYSDIG_MCP_API_TOKEN": "<your_sysdig_api_token>",
"SYSDIG_MCP_TRANSPORT": "stdio"
}
}
}
}Or using the CLI:
# Claude Code
claude mcp add --transport stdio \
-e SYSDIG_MCP_API_HOST=<your_sysdig_host> \
-e SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token> \
-e SYSDIG_MCP_TRANSPORT=stdio \
-- sysdig-mcp-server go run github.com/sysdiglabs/sysdig-mcp-server/cmd/server@latest
# Gemini CLI
gemini mcp add -t stdio \
-e SYSDIG_MCP_API_HOST=<your_sysdig_host> \
-e SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token> \
-e SYSDIG_MCP_TRANSPORT=stdio \
sysdig-mcp-server go run github.com/sysdiglabs/sysdig-mcp-server/cmd/server@latest
# Codex CLI
codex mcp add \
--env SYSDIG_MCP_API_HOST=<your_sysdig_host> \
--env SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token> \
--env SYSDIG_MCP_TRANSPORT=stdio \
-- sysdig-mcp-server go run github.com/sysdiglabs/sysdig-mcp-server/cmd/server@latestThe pre-built Docker image is available from the GitHub Container Registry:
docker pull ghcr.io/sysdiglabs/sysdig-mcp-server:latestConfigure your client with:
{
"mcpServers": {
"sysdig-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SYSDIG_MCP_API_HOST",
"-e",
"SYSDIG_MCP_TRANSPORT",
"-e",
"SYSDIG_MCP_API_TOKEN",
"ghcr.io/sysdiglabs/sysdig-mcp-server:latest"
],
"env": {
"SYSDIG_MCP_API_HOST": "<your_sysdig_host>",
"SYSDIG_MCP_API_TOKEN": "<your_sysdig_api_token>",
"SYSDIG_MCP_TRANSPORT": "stdio"
}
}
}
}For remote transports, deploy the container as a service with the appropriate environment variables (see Configuration).
Download the latest pre-built binary for your platform from GitHub Releases, extract it, and place it somewhere in your PATH (e.g., /usr/local/bin):
# macOS (Apple Silicon)
curl -L https://github.com/sysdiglabs/sysdig-mcp-server/releases/latest/download/sysdig-mcp-server_darwin-arm64.tar.gz | tar xz
# macOS (Intel)
curl -L https://github.com/sysdiglabs/sysdig-mcp-server/releases/latest/download/sysdig-mcp-server_darwin-amd64.tar.gz | tar xz
# Linux (x86_64)
curl -L https://github.com/sysdiglabs/sysdig-mcp-server/releases/latest/download/sysdig-mcp-server_linux-amd64.tar.gz | tar xz
# Linux (arm64)
curl -L https://github.com/sysdiglabs/sysdig-mcp-server/releases/latest/download/sysdig-mcp-server_linux-arm64.tar.gz | tar xzWindows .zip archives are also available on the releases page.
Configure your client with:
{
"mcpServers": {
"sysdig-mcp-server": {
"command": "sysdig-mcp-server",
"env": {
"SYSDIG_MCP_API_HOST": "<your_sysdig_host>",
"SYSDIG_MCP_API_TOKEN": "<your_sysdig_api_token>",
"SYSDIG_MCP_TRANSPORT": "stdio"
}
}
}
}Or using the CLI:
# Claude Code
claude mcp add --transport stdio \
-e SYSDIG_MCP_API_HOST=<your_sysdig_host> \
-e SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token> \
-e SYSDIG_MCP_TRANSPORT=stdio \
-- sysdig-mcp-server sysdig-mcp-server
# Gemini CLI
gemini mcp add -t stdio \
-e SYSDIG_MCP_API_HOST=<your_sysdig_host> \
-e SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token> \
-e SYSDIG_MCP_TRANSPORT=stdio \
sysdig-mcp-server sysdig-mcp-server
# Codex CLI
codex mcp add \
--env SYSDIG_MCP_API_HOST=<your_sysdig_host> \
--env SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token> \
--env SYSDIG_MCP_TRANSPORT=stdio \
-- sysdig-mcp-server sysdig-mcp-serverDeploy the MCP server to a Kubernetes cluster as a remote service. MCP clients like Claude Desktop will connect to it via URL.
1. Create a Secret with your Sysdig credentials:
kubectl create namespace mcp-server
kubectl create secret generic mcp-server-secrets \
--namespace mcp-server \
--from-literal=SYSDIG_MCP_API_HOST=<your_sysdig_host> \
--from-literal=SYSDIG_MCP_API_TOKEN=<your_sysdig_api_token>2. Deploy the server:
apiVersion: apps/v1
kind: Deployment
metadata:
name: mcp-server
namespace: mcp-server
labels:
app: mcp-server
spec:
replicas: 1
selector:
matchLabels:
app: mcp-server
template:
metadata:
labels:
app: mcp-server
spec:
containers:
- name: mcp-server
image: ghcr.io/sysdiglabs/sysdig-mcp-server:latest
ports:
- containerPort: 8080
protocol: TCP
env:
- name: SYSDIG_MCP_TRANSPORT
value: "streamable-http"
envFrom:
- secretRef:
name: mcp-server-secrets
---
apiVersion: v1
kind: Service
metadata:
name: mcp-server
namespace: mcp-server
spec:
type: ClusterIP
selector:
app: mcp-server
ports:
- port: 8080
targetPort: 8080Note: Expose the Service externally using a NodePort, LoadBalancer, or Ingress depending on your cluster setup. The examples in the Client Configuration section assume the server is reachable at http://<server-address>:<port>/sysdig-mcp-server.
For local development, we provide a flake.nix file that sets up a reproducible environment with all necessary dependencies (Go, development tools, linters, etc.).
If you have Nix installed, you can enter the development shell:
nix developIf you use direnv, simply run:
direnv allowTo use the MCP server with a client like Claude or Cursor, you need to provide the server's URL and authentication details.
When using the sse or streamable-http transport, the server requires a Bearer token for authentication. The token is passed in the X-Sysdig-Token or default to Authorization header of the HTTP request (i.e Bearer SYSDIG_MCP_API_TOKEN).
Additionally, you can specify the Sysdig host by providing the X-Sysdig-Host header.
Note: When provided, the authentication headers (Authorization, X-Sysdig-Token) and host header (X-Sysdig-Host) take precedence over the configured environment variables.
Example headers:
Authorization: Bearer <your_sysdig_api_token> X-Sysdig-Host: <your_sysdig_host>
If you are running the server with the sse or streamable-http transport, the URL will be http://<host>:<port><mount_path>, where <mount_path> is the value of SYSDIG_MCP_MOUNT_PATH (defaults to /sysdig-mcp-server). Do not include a trailing /.
For example, if you are running the server locally on port 8080 with the default mount path, the URL will be http://localhost:8080/sysdig-mcp-server.
For the Claude Desktop app, configure the MCP server by editing the claude_desktop_config.json file:
Connecting to a Remote Server:
If the MCP server is deployed remotely (e.g., in a Kubernetes cluster), you can connect to it using mcp-remote. This requires Node.js (v18+) installed on your machine.
{
"mcpServers": {
"sysdig-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://<server-address>:<port>/sysdig-mcp-server",
"--allow-http"
]
}
}
}Note: The --allow-http flag is required when connecting over plain HTTP. If your server is behind HTTPS (e.g., via an Ingress with TLS), you can omit it. No authentication headers or tokens are needed in the client configuration when the server has SYSDIG_MCP_API_HOST and SYSDIG_MCP_API_TOKEN set as environment variables.
Using Go:
extensions:
...
sysdig-mcp-server:
args: ["run", "github.com/sysdiglabs/sysdig-mcp-server/cmd/server@latest"]
bundled: null
cmd: go
description: Sysdig MCP server
enabled: true
env_keys:
- SYSDIG_MCP_TRANSPORT
- SYSDIG_MCP_API_HOST
- SYSDIG_MCP_API_TOKEN
envs:
SYSDIG_MCP_TRANSPORT: stdio
name: sysdig-mcp-server
timeout: 300
type: stdio| Back | FazBrowse Home | New Git URL |