You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .envrc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,4 @@ watch_file *.nix
3
3
dotenv_if_exists .env # You can create a .env file with your env vars for this project. You can also use .secrets if you are using act. See the line below.
4
4
dotenv_if_exists .secrets # Used by [act](https://nektosact.com/) to load secrets into the pipelines
Copy file name to clipboardExpand all lines: AGENTS.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ The handler filters tools dynamically based on `GetMyPermissions` from Sysdig Se
49
49
|`get_event_process_tree`|`tool_get_event_process_tree.go`| Retrieve the process tree for an event when available. |`policy-events.read`| “Show the process tree behind event `abc123`.” |
50
50
|`run_sysql`|`tool_run_sysql.go`| Execute caller-supplied Sysdig SysQL queries safely. |`sage.exec`, `risks.read`| “Run the following SysQL…”. |
51
51
|`generate_sysql`|`tool_generate_sysql.go`| Convert natural language to SysQL via Sysdig Sage. |`sage.exec` (does not work with Service Accounts) | “Create a SysQL to list S3 buckets.” |
Every tool has a companion `_test.go` file that exercises request validation, permission metadata, and Sysdig client calls through mocks.
54
55
Note that if you add more tools you need to also update this file to reflect that.
@@ -70,7 +71,7 @@ Note that if you add more tools you need to also update this file to reflect tha
70
71
71
72
## Troubleshooting & Tips
72
73
73
-
-**Missing config:**`SYSDIG_MCP_API_HOST` and `SYSDIG_MCP_API_SECURE_TOKEN` are mandatory in `stdio`. Validation fails early in `internal/config/config.go`.
74
+
-**Missing config:**`SYSDIG_MCP_API_HOST` and `SYSDIG_MCP_API_TOKEN` are mandatory in `stdio`. Validation fails early in `internal/config/config.go`.
74
75
-**Token scope:** If a tool does not appear, verify the token’s permissions under **Settings > Users & Teams > Roles**. `generate_sysql` currently requires a regular user token, not a Service Account.
75
76
-**Remote auth:** When using `streamable-http` or `sse`, pass `Authorization: Bearer <token>` and optionally `X-Sysdig-Host`. These values override env vars via the request context middleware.
76
77
-**Environment drift:** Always run inside `nix develop`; lint/test expect binaries like `gofumpt`, `golangci-lint`, and `ginkgo` provided by the flake.
# Optional (Host and Token can be provided via HTTP headers)
155
160
# SYSDIG_MCP_API_HOST=https://us2.app.sysdig.com
156
-
#SYSDIG_MCP_API_SECURE_TOKEN=your-api-token-here
161
+
#SYSDIG_MCP_API_TOKEN=your-api-token-here
157
162
SYSDIG_MCP_LISTENING_PORT=8080
158
163
SYSDIG_MCP_LISTENING_HOST=localhost
159
164
SYSDIG_MCP_MOUNT_PATH=/sysdig-mcp-server
@@ -199,13 +204,13 @@ You can run the MCP server using Docker (recommended for production) or directly
199
204
The easiest way to run the server is using the pre-built Docker image from GitHub Container Registry (as shown in the [Quickstart Guide](#quickstart-guide)).
mcp.WithDescription("Lists the cluster information for all clusters or just the cluster specified."),
27
+
mcp.WithString("cluster_name", mcp.Description("The name of the cluster to filter by.")),
28
+
mcp.WithNumber("limit",
29
+
mcp.Description("Maximum number of clusters to return."),
30
+
mcp.DefaultNumber(10),
31
+
),
32
+
mcp.WithOutputSchema[map[string]any](),
33
+
WithRequiredPermissions(), // FIXME(fede): Add the required permissions. It should be `promql.exec` but somehow the token does not have that permission even if you are able to execute queries.
0 commit comments