Skip to content

Commit 3438abe

Browse files
committed
feat: Updating docs and k8s related resources
Signed-off-by: S3B4SZ17 <[email protected]>
1 parent 4668cc7 commit 3438abe

File tree

14 files changed

+87
-117
lines changed

14 files changed

+87
-117
lines changed

.github/workflows/helm_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ jobs:
5757
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts
5858

5959
- name: Create kind cluster
60-
if: steps.list-changed.outputs.changed == 'true'
60+
if: steps.list-changed.outputs.changed == 'true' && github.event_name != 'pull_request'
6161
uses: helm/[email protected]
6262

6363
- name: Run chart-testing (install)
64-
if: steps.list-changed.outputs.changed == 'true'
64+
if: steps.list-changed.outputs.changed == 'true' && github.event_name != 'pull_request'
6565
run: |
6666
ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ WORKDIR /app
2929
RUN apt update && apt install -y git
3030
# Copy the application from the builder
3131
COPY --from=builder --chown=app:app /tmp/sysdig_mcp_server.tar.gz /app
32-
COPY --from=builder --chown=app:app /app/app_config.yaml /app
3332

3433
RUN pip install /app/sysdig_mcp_server.tar.gz
3534

README.md

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- [Requirements](#requirements)
1818
- [UV Setup](#uv-setup)
1919
- [Configuration](#configuration)
20-
- [Environment Variables](#environment-variables)
2120
- [Running the Server](#running-the-server)
2221
- [Docker](#docker)
2322
- [K8s Deployment](#k8s-deployment)
@@ -27,6 +26,7 @@
2726
- [URL](#url)
2827
- [Claude Desktop App](#claude-desktop-app)
2928
- [MCP Inspector](#mcp-inspector)
29+
- [Goose Agent](#goose-agent)
3030

3131
## Description
3232

@@ -65,17 +65,17 @@ Get up and running with the Sysdig MCP Server quickly using our pre-built Docker
6565
"-i",
6666
"--rm",
6767
"-e",
68-
"SYSDIG_HOST",
68+
"SYSDIG_MCP_API_HOST",
6969
"-e",
70-
"MCP_TRANSPORT",
70+
"SYSDIG_MCP_TRANSPORT",
7171
"-e",
72-
"SYSDIG_SECURE_TOKEN",
72+
"SYSDIG_MCP_API_SECURE_TOKEN",
7373
"ghcr.io/sysdiglabs/sysdig-mcp-server:latest"
7474
],
7575
"env": {
76-
"SYSDIG_HOST": "<your_sysdig_host>",
77-
"SYSDIG_SECURE_TOKEN": "<your_sysdig_secure_api_token>",
78-
"MCP_TRANSPORT": "stdio"
76+
"SYSDIG_MCP_API_HOST": "<your_sysdig_host>",
77+
"SYSDIG_MCP_API_SECURE_TOKEN": "<your_sysdig_secure_api_token>",
78+
"SYSDIG_MCP_TRANSPORT": "stdio"
7979
}
8080
}
8181
}
@@ -167,14 +167,14 @@ This will create a virtual environment using `uv` and install the required depen
167167
168168
The following environment variables are **required** for configuring the Sysdig SDK:
169169
170-
- `SYSDIG_HOST`: The URL of your Sysdig Secure instance (e.g., `https://us2.app.sysdig.com`).
171-
- `SYSDIG_SECURE_TOKEN`: Your Sysdig Secure API token.
170+
- `SYSDIG_MCP_API_HOST`: The URL of your Sysdig Secure instance (e.g., `https://us2.app.sysdig.com`).
171+
- `SYSDIG_MCP_API_SECURE_TOKEN`: Your Sysdig Secure API token.
172172
173173
You can also set the following variables to override the default configuration:
174174
175-
- `MCP_TRANSPORT`: The transport protocol for the MCP Server (`stdio`, `streamable-http`, `sse`). Defaults to: `stdio`.
176-
- `MCP_MOUNT_PATH`: The URL prefix for the Streamable-http/sse deployment. Defaults to: `/sysdig-mcp-server`
177-
- `LOGLEVEL`: Log Level of the application (`DEBUG`, `INFO`, `WARNING`, `ERROR`). Defaults to: `INFO`
175+
- `SYSDIG_MCP_TRANSPORT`: The transport protocol for the MCP Server (`stdio`, `streamable-http`, `sse`). Defaults to: `stdio`.
176+
- `SYSDIG_MCP_MOUNT_PATH`: The URL prefix for the Streamable-http/sse deployment. Defaults to: `/sysdig-mcp-server`
177+
- `SYSDIG_MCP_LOGLEVEL`: Log Level of the application (`DEBUG`, `INFO`, `WARNING`, `ERROR`). Defaults to: `INFO`
178178
- `SYSDIG_MCP_LISTENING_PORT`: The port for the server when it is deployed using remote protocols (`steamable-http`, `sse`). Defaults to: `8080`
179179
- `SYSDIG_MCP_LISTENING_HOST`: The host for the server when it is deployed using remote protocols (`steamable-http`, `sse`). Defaults to: `localhost`
180180
@@ -203,7 +203,7 @@ Then, you can run the container, making sure to pass the required environment va
203203
docker run -e SYSDIG_HOST=<your_sysdig_host> -e SYSDIG_SECURE_TOKEN=<your_sysdig_secure_api_token> -p 8080:8080 sysdig-mcp-server
204204
```
205205
206-
By default, the server will run using the `stdio` transport. To use the `streamable-http` or `sse` transports, set the `MCP_TRANSPORT` environment variable to `streamable-http` or `sse`:
206+
By default, the server will run using the `stdio` transport. To use the `streamable-http` or `sse` transports, set the `SYSDIG_MCP_TRANSPORT` environment variable to `streamable-http` or `sse`:
207207
208208
```bash
209209
docker run -e MCP_TRANSPORT=streamable-http -e SYSDIG_HOST=<your_sysdig_host> -e SYSDIG_SECURE_TOKEN=<your_sysdig_secure_api_token> -p 8080:8080 sysdig-mcp-server
@@ -267,7 +267,7 @@ To run the server using `uv`, first set up the environment as described in the [
267267
uv run main.py
268268
```
269269
270-
By default, the server will run using the `stdio` transport. To use the `streamable-http` or `sse` transports, set the `MCP_TRANSPORT` environment variable to `streamable-http` or `sse`:
270+
By default, the server will run using the `stdio` transport. To use the `streamable-http` or `sse` transports, set the `SYSDIG_MCP_TRANSPORT` environment variable to `streamable-http` or `sse`:
271271
272272
```bash
273273
MCP_TRANSPORT=streamable-http uv run main.py
@@ -279,9 +279,9 @@ To use the MCP server with a client like Claude or Cursor, you need to provide t
279279

280280
### Authentication
281281

282-
When using the `sse` or `streamable-http` transport, the server requires a Bearer token for authentication. The token is passed in the `Authorization` header of the HTTP request.
282+
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_SECURE_API_TOKEN`).
283283

284-
Additionally, you can specify the Sysdig Secure host by providing the `X-Sysdig-Host` header. If this header is not present, the server will use the value from the env variable.
284+
Additionally, you can specify the Sysdig Secure host by providing the `X-Sysdig-Host` header. If this header is not present, the server will use the value from the env variable `SYSDIG_MCP_API_HOST`.
285285

286286
Example headers:
287287

@@ -319,9 +319,9 @@ For the Claude Desktop app, you can manually configure the MCP server by editing
319319
"main.py"
320320
],
321321
"env": {
322-
"SYSDIG_HOST": "<your_sysdig_host>",
323-
"SYSDIG_SECURE_TOKEN": "<your_sysdig_secure_api_token>",
324-
"MCP_TRANSPORT": "stdio"
322+
"SYSDIG_MCP_API_HOST": "<your_sysdig_host>",
323+
"SYSDIG_MCP_API_SECURE_TOKEN": "<your_sysdig_secure_api_token>",
324+
"SYSDIG_MCP_TRANSPORT": "stdio"
325325
}
326326
}
327327
}
@@ -340,17 +340,17 @@ For the Claude Desktop app, you can manually configure the MCP server by editing
340340
"-i",
341341
"--rm",
342342
"-e",
343-
"SYSDIG_HOST",
343+
"SYSDIG_MCP_API_HOST",
344344
"-e",
345-
"MCP_TRANSPORT",
345+
"SYSDIG_MCP_TRANSPORT",
346346
"-e",
347-
"SYSDIG_SECURE_TOKEN",
347+
"SYSDIG_MCP_API_SECURE_TOKEN",
348348
"ghcr.io/sysdiglabs/sysdig-mcp-server"
349349
],
350350
"env": {
351-
"SYSDIG_HOST": "<your_sysdig_host>",
352-
"SYSDIG_SECURE_TOKEN": "<your_sysdig_secure_api_token>",
353-
"MCP_TRANSPORT": "stdio"
351+
"SYSDIG_MCP_API_HOST": "<your_sysdig_host>",
352+
"SYSDIG_MCP_API_SECURE_TOKEN": "<your_sysdig_secure_api_token>",
353+
"SYSDIG_MCP_TRANSPORT": "stdio"
354354
}
355355
}
356356
}
@@ -371,3 +371,32 @@ For the Claude Desktop app, you can manually configure the MCP server by editing
371371
3. Pass the Authorization header if using "streamable-http" or the SYSDIG_SECURE_API_TOKEN env var if using "stdio"
372372

373373
![mcp-inspector](./docs/assets/mcp-inspector.png)
374+
375+
376+
### Goose Agent
377+
378+
1. In your terminal run `goose configure` and follow the steps to add the extension (more info on the [goose docs](https://block.github.io/goose/docs/getting-started/using-extensions/)), again could be using docker or uv as shown in the above examples.
379+
2. Your `~/.config/goose/config.yaml` config file should have one config like this one, check out the env vars
380+
381+
```yaml
382+
extensions:
383+
...
384+
sysdig-mcp-server:
385+
args: []
386+
bundled: null
387+
cmd: sysdig-mcp-server
388+
description: Sysdig MCP server
389+
enabled: true
390+
env_keys:
391+
- SYSDIG_MCP_TRANSPORT
392+
- SYSDIG_MCP_API_HOST
393+
- SYSDIG_MCP_API_SECURE_TOKEN
394+
envs:
395+
SYSDIG_MCP_TRANSPORT: stdio
396+
name: sysdig-mcp-server
397+
timeout: 300
398+
type: stdio
399+
```
400+
3. Have fun
401+
402+
![goose_results](./docs/assets/goose_results.png)

charts/sysdig-mcp/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ type: application
2020
# This is the chart version. This version number should be incremented each time you make changes
2121
# to the chart and its templates, including the app version.
2222
# Versions are expected to follow Semantic Versioning (https://semver.org/)
23-
version: 0.1.3
23+
version: 0.2.0
2424

2525
# This is the version number of the application being deployed. This version number should be
2626
# incremented each time you make changes to the application. Versions are not expected to
2727
# follow Semantic Versioning. They should reflect the version the application is using.
2828
# It is recommended to use it with quotes.
29-
appVersion: "v0.1.3"
29+
appVersion: "v0.2.0"

charts/sysdig-mcp/templates/configmap.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

charts/sysdig-mcp/templates/deployment.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,28 @@ spec:
3737
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3838
imagePullPolicy: {{ .Values.image.pullPolicy }}
3939
env:
40-
- name: SYSDIG_HOST
40+
- name: SYSDIG_MCP_API_HOST
4141
value: {{ .Values.sysdig.host | quote }}
4242
{{- if .Values.sysdig.secrets.create }}
43-
- name: SYSDIG_SECURE_API_TOKEN
43+
- name: SYSDIG_MCP_API_SECURE_TOKEN
4444
valueFrom:
4545
secretKeyRef:
4646
name: "{{ include "sysdig-mcp.fullname" . }}-sysdig-secrets"
47-
key: SYSDIG_SECURE_API_TOKEN
47+
key: SYSDIG_MCP_API_SECURE_TOKEN
4848
{{- end }}
4949
{{- if .Values.oauth.secrets.create }}
50-
- name: MCP_OAUTH_OAUTH_CLIENT_ID
50+
- name: SYSDIG_MCP_OAUTH_CLIENT_ID
5151
valueFrom:
5252
secretKeyRef:
5353
name: "{{ include "sysdig-mcp.fullname" . }}-oauth-secrets"
5454
key: clientId
55-
- name: MCP_OAUTH_OAUTH_CLIENT_SECRET
55+
- name: SYSDIG_MCP_OAUTH_CLIENT_SECRET
5656
valueFrom:
5757
secretKeyRef:
5858
name: "{{ include "sysdig-mcp.fullname" . }}-oauth-secrets"
5959
key: clientSecret
6060
{{- end }}
61-
- name: MCP_TRANSPORT
61+
- name: SYSDIG_MCP_TRANSPORT
6262
value: {{ .Values.sysdig.mcp.transport | quote }}
6363
ports:
6464
- name: http
@@ -77,17 +77,10 @@ spec:
7777
resources:
7878
{{- toYaml .Values.resources | nindent 12 }}
7979
volumeMounts:
80-
- name: config
81-
mountPath: "/app/app_config.yaml"
82-
subPath: "app_config.yaml"
8380
{{- with .Values.volumeMounts }}
8481
{{- toYaml . | nindent 12 }}
8582
{{- end }}
8683
volumes:
87-
- name: config
88-
configMap:
89-
# Provide the name of the ConfigMap you want to mount.
90-
name: {{ include "sysdig-mcp.fullname" . }}-config
9184
{{- with .Values.volumes }}
9285
{{- toYaml . | nindent 8 }}
9386
{{- end }}

charts/sysdig-mcp/templates/secrets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
release: {{ .Release.Name }}
99
type: Opaque
1010
data:
11-
SYSDIG_SECURE_API_TOKEN: {{ .Values.sysdig.secrets.secureAPIToken | b64enc }}
11+
SYSDIG_MCP_API_SECURE_TOKEN: {{ .Values.sysdig.secrets.secureAPIToken | b64enc }}
1212
{{- end }}
1313
---
1414
{{- if .Values.oauth.secrets.create -}}

charts/sysdig-mcp/values.schema.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
}
1212
},
1313
"required": [
14-
"configMap",
1514
"sysdig"
1615
],
1716
"$defs": {
@@ -116,26 +115,6 @@
116115
"secrets"
117116
],
118117
"additionalProperties": false
119-
},
120-
"AppConfig": {
121-
"type": "object",
122-
"properties": {
123-
"enabled": {
124-
"type": "boolean",
125-
"description": "Whether to create the application configuration"
126-
},
127-
"app_config": {
128-
"type": [
129-
"string",
130-
"null"
131-
],
132-
"description": "The application configuration in YAML format"
133-
}
134-
},
135-
"required": [
136-
"secrets"
137-
],
138-
"additionalProperties": false
139118
}
140119
}
141120
}

charts/sysdig-mcp/values.yaml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image:
88
repository: ghcr.io/sysdiglabs/sysdig-mcp-server
99
pullPolicy: IfNotPresent
1010
# Overrides the image tag whose default is the chart appVersion.
11-
tag: "v0.1.3"
11+
tag: "v0.2.0"
1212

1313
imagePullSecrets: []
1414
nameOverride: ""
@@ -107,28 +107,3 @@ nodeSelector: {}
107107
tolerations: []
108108

109109
affinity: {}
110-
111-
configMap:
112-
enabled: true
113-
app_config: |
114-
# Sysdig MCP Server Configuration
115-
# This file is used to configure the Sysdig MCP server.
116-
# You can add your custom configuration here.
117-
app:
118-
host: "0.0.0.0"
119-
port: 8080
120-
log_level: "ERROR"
121-
122-
sysdig:
123-
host: "https://us2.app.sysdig.com"
124-
125-
mcp:
126-
transport: streamable-http
127-
host: "0.0.0.0"
128-
port: 8080
129-
allowed_tools:
130-
- "events-feed"
131-
- "sysdig-cli-scanner" # You need the sysdig-cli-scanner binary installed in your server to use this tool
132-
- "vulnerability-management"
133-
- "inventory"
134-
- "sysdig-sage"

docs/assets/goose_results.png

182 KB
Loading

0 commit comments

Comments
 (0)