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
>**Note:** This tool is **only available when using `stdio` transport**. It is not available for`streamable-http` or `sse` transports.
111
+
110
112
| Tool Name | Description | Sample Prompt |
111
113
|-----------|-------------|----------------|
112
114
|`run_sysdig_cli_scanner`| Run the Sysdig CLI Scanner to analyze a container image or IaC files for vulnerabilities and posture and misconfigurations. |"Scan this image ubuntu:latest for vulnerabilities"|
@@ -157,68 +159,90 @@ You can find your API token in the Sysdig Secure UI under **Settings > Sysdig Se
157
159
158
160
You can set these variables in your shell or in a `.env` file.
159
161
160
-
### API Permissions
161
-
162
-
The minimum permissions needed for the tools to make the necessary API calls are the following:
162
+
**Example `.env` file:**
163
163
164
164
```bash
165
-
"cli-scanner": ["secure.vm.cli-scanner.exec"],
166
-
"threat-detection": ["policy-events.read"],
167
-
"sysql": ["sage.exec","risks.read"],
165
+
# Required Configuration
166
+
SYSDIG_MCP_API_HOST=https://us2.app.sysdig.com
167
+
SYSDIG_MCP_API_SECURE_TOKEN=your-api-token-here
168
+
169
+
# Optional Configuration (with defaults)
170
+
SYSDIG_MCP_TRANSPORT=stdio
171
+
SYSDIG_MCP_LOGLEVEL=INFO
172
+
SYSDIG_MCP_LISTENING_PORT=8080
173
+
SYSDIG_MCP_LISTENING_HOST=localhost
174
+
SYSDIG_MCP_MOUNT_PATH=/sysdig-mcp-server
168
175
```
169
176
170
-
We advise you to create a separate role for your MCP server ideally a SA. More information on the official [doc for roles-administration](https://docs.sysdig.com/en/administration/roles-administration/) and how to attach it to the SA and/or team user.
177
+
### API Permissions
178
+
179
+
To use the MCP server tools, your API token needs specific permissions in Sysdig Secure. We recommend creating a dedicated Service Account (SA) with a custom role containing only the required permissions.
180
+
181
+
**Minimum Required Permissions by Tool:**
171
182
172
-
The permissions needed for the Secure platform are:
When selecting the above some other permissions dependent will be added.
191
+
- Settings: "API Access Token" - View, Read, Edit (required to generate and manage API tokens)
192
+
193
+
**Setting up Permissions:**
194
+
195
+
1. Go to **Settings > Users & Teams > Roles** in your Sysdig Secure instance
196
+
2. Create a new role with the permissions listed above
197
+
3. Assign this role to a Service Account or user
198
+
4. Use the API token from that account with the MCP server
199
+
200
+
> **Note:** When selecting permissions, some dependent permissions may be automatically added by Sysdig.
201
+
202
+
For detailed instructions, see the official [Sysdig Roles Administration documentation](https://docs.sysdig.com/en/administration/roles-administration/).
181
203
182
204
>[!IMPORTANT]
183
-
> When using a SA token is expected that the `generate_and_run_sysql` will give a 500 error, to use that tool you should use a token assigned to a user for now.
205
+
> **Service Account Limitation:** The `generate_and_run_sysql` tool currently does not work with Service Account tokens and will return a 500 error. For this tool, use an API token assigned to a regular user account.
184
206
185
207
186
208
## Running the Server
187
209
188
-
You can run the MCP server using either Docker, `uv` or install it in your K8s cluster with helm.
210
+
You can run the MCP server using Docker (recommended for production), `uv` (for development), or install it in your K8s cluster with helm.
211
+
212
+
### Docker (Recommended)
189
213
190
-
### Docker
214
+
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)).
191
215
192
-
To run the server using Docker, you first need to build the image:
216
+
If you need to build the image locally, you can do so with:
193
217
194
218
```bash
195
219
docker build -t sysdig-mcp-server .
196
220
```
197
221
198
-
Then, you can run the container, making sure to pass the required environment variables:
222
+
Then, run the container with the required environment variables:
199
223
200
224
```bash
201
-
docker run -e SYSDIG_HOST=<your_sysdig_host> -e SYSDIG_SECURE_TOKEN=<your_sysdig_secure_api_token> -p 8080:8080 sysdig-mcp-server
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`:
228
+
To use the `streamable-http` or `sse` transports (for remote MCP clients), set the `SYSDIG_MCP_TRANSPORT` environment variable accordingly:
To run the server using `uv`, first set up the environment as described in the [UV Setup](#uv-setup) section. Then, run the `main.py` script:
236
+
For local development, you can run the server using `uv`. First set up the environment as described in the [UV Setup](#uv-setup) section, then run:
213
237
214
238
```bash
215
239
uv run main.py
216
240
```
217
241
218
-
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`:
242
+
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:
219
243
220
244
```bash
221
-
MCP_TRANSPORT=streamable-http uv run main.py
245
+
SYSDIG_MCP_TRANSPORT=streamable-http uv run main.py
0 commit comments