Skip to content

Commit 4e9f051

Browse files
authored
docs: Improve README file (#24)
1 parent 89b1588 commit 4e9f051

File tree

1 file changed

+50
-26
lines changed

1 file changed

+50
-26
lines changed

README.md

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ Get up and running with the Sysdig MCP Server quickly using our pre-built Docker
107107
<details>
108108
<summary><strong>Sysdig CLI scanner</strong></summary>
109109

110+
> **Note:** This tool is **only available when using `stdio` transport**. It is not available for `streamable-http` or `sse` transports.
111+
110112
| Tool Name | Description | Sample Prompt |
111113
|-----------|-------------|----------------|
112114
| `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
157159
158160
You can set these variables in your shell or in a `.env` file.
159161
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:**
163163
164164
```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
168175
```
169176
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:**
171182
172-
The permissions needed for the Secure platform are:
183+
| Tool Category | Required Permissions | Sysdig UI Permission Names |
184+
|--------------|---------------------|---------------------------|
185+
| **CLI Scanner** | `secure.vm.cli-scanner.exec` | Vulnerability Management: "CLI Execution" (EXEC) |
186+
| **Threat Detection (Events Feed)** | `policy-events.read` | Threats: "Policy Events" (Read) |
187+
| **SysQL** | `sage.exec`, `risks.read` | Sage: "Use Sage chat" (EXEC) + Risks: "Access to risk feature" (Read) |
173188
174-
- Threats: "Policy Events" Read
175-
- Risks: "Access to risk feature" Read
176-
- Vulnerability Management: "CLI Execution" EXEC
177-
- Settings: "API Access Token" View, Read, Edit
178-
- Sage: "Use Sage chat" EXEC
189+
**Additional Permissions:**
179190
180-
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/).
181203
182204
>[!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.
184206
185207
186208
## Running the Server
187209
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)
189213
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)).
191215
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:
193217
194218
```bash
195219
docker build -t sysdig-mcp-server .
196220
```
197221
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:
199223
200224
```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
225+
docker run -e SYSDIG_MCP_API_HOST=<your_sysdig_host> -e SYSDIG_MCP_API_SECURE_TOKEN=<your_sysdig_secure_api_token> -e SYSDIG_MCP_TRANSPORT=stdio -p 8080:8080 sysdig-mcp-server
202226
```
203227
204-
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:
205229
206230
```bash
207-
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
231+
docker run -e SYSDIG_MCP_TRANSPORT=streamable-http -e SYSDIG_MCP_API_HOST=<your_sysdig_host> -e SYSDIG_MCP_API_SECURE_TOKEN=<your_sysdig_secure_api_token> -p 8080:8080 sysdig-mcp-server
208232
```
209233
210-
### UV
234+
### UV (Development)
211235
212-
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:
213237
214238
```bash
215239
uv run main.py
216240
```
217241
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:
219243
220244
```bash
221-
MCP_TRANSPORT=streamable-http uv run main.py
245+
SYSDIG_MCP_TRANSPORT=streamable-http uv run main.py
222246
```
223247
224248
## Client Configuration

0 commit comments

Comments
 (0)