Skip to content

Commit e2ef21c

Browse files
authored
docs: remote deployment guide
1 parent b67cf70 commit e2ef21c

File tree

2 files changed

+96
-6
lines changed

2 files changed

+96
-6
lines changed

README.md

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [Running the Server](#running-the-server)
1818
- [Docker (Recommended)](#docker-recommended)
1919
- [Go](#go)
20+
- [Kubernetes](#kubernetes)
2021
- [Client Configuration](#client-configuration)
2122
- [Authentication](#authentication)
2223
- [URL](#url)
@@ -195,7 +196,7 @@ The server dynamically filters the available tools based on the permissions asso
195196
- **Note**: The `generate_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.
196197

197198
## Requirements
198-
- [Go](https://go.dev/doc/install) 1.25 or higher (if running without Docker).
199+
- [Go](https://go.dev/doc/install) 1.26 or higher (if running without Docker).
199200

200201
## Configuration
201202

@@ -309,6 +310,72 @@ By default, the server will run using the `stdio` transport. To use the `streama
309310
SYSDIG_MCP_TRANSPORT=streamable-http go run github.com/sysdiglabs/sysdig-mcp-server/cmd/server@latest
310311
```
311312

313+
### Kubernetes
314+
315+
You can deploy the MCP server to a Kubernetes cluster and connect to it remotely from clients like Claude Desktop.
316+
317+
**1. Create a Secret with your Sysdig credentials:**
318+
319+
```bash
320+
kubectl create namespace mcp-server
321+
322+
kubectl create secret generic mcp-server-secrets \
323+
--namespace mcp-server \
324+
--from-literal=SYSDIG_MCP_API_HOST=<your_sysdig_host> \
325+
--from-literal=SYSDIG_MCP_API_TOKEN=<your_sysdig_secure_api_token>
326+
```
327+
328+
**2. Deploy the server:**
329+
330+
```yaml
331+
apiVersion: apps/v1
332+
kind: Deployment
333+
metadata:
334+
name: mcp-server
335+
namespace: mcp-server
336+
labels:
337+
app: mcp-server
338+
spec:
339+
replicas: 1
340+
selector:
341+
matchLabels:
342+
app: mcp-server
343+
template:
344+
metadata:
345+
labels:
346+
app: mcp-server
347+
spec:
348+
containers:
349+
- name: mcp-server
350+
image: ghcr.io/sysdiglabs/sysdig-mcp-server:latest
351+
ports:
352+
- containerPort: 8080
353+
protocol: TCP
354+
env:
355+
- name: SYSDIG_MCP_TRANSPORT
356+
value: "streamable-http"
357+
- name: SYSDIG_MCP_LISTENING_HOST
358+
value: "0.0.0.0"
359+
envFrom:
360+
- secretRef:
361+
name: mcp-server-secrets
362+
---
363+
apiVersion: v1
364+
kind: Service
365+
metadata:
366+
name: mcp-server
367+
namespace: mcp-server
368+
spec:
369+
type: ClusterIP
370+
selector:
371+
app: mcp-server
372+
ports:
373+
- port: 8080
374+
targetPort: 8080
375+
```
376+
377+
> **Note:** Expose the Service externally using a `NodePort`, `LoadBalancer`, or `Ingress` depending on your cluster setup. The examples in the [Client Configuration](#client-configuration) section assume the server is reachable at `http://<server-address>:<port>/sysdig-mcp-server`.
378+
312379
## Local Development
313380

314381
For local development, we provide a `flake.nix` file that sets up a reproducible environment with all necessary dependencies (Go, development tools, linters, etc.).
@@ -346,9 +413,9 @@ X-Sysdig-Host: <your_sysdig_host>
346413
347414
### URL
348415
349-
If you are running the server with the `sse` or `streamable-http` transport, the URL will be `http://<host>:<port>/sysdig-mcp-server/mcp`.
416+
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 `/`.
350417
351-
For example, if you are running the server locally on port 8080, the URL will be `http://localhost:8080/sysdig-mcp-server/mcp`.
418+
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`.
352419
353420
### Claude Desktop App
354421
@@ -410,9 +477,32 @@ For the Claude Desktop app, you can manually configure the MCP server by editing
410477
}
411478
```
412479
480+
**Option C: Connecting to a Remote Server**
481+
482+
If the MCP server is deployed remotely (e.g., in a [Kubernetes cluster](#kubernetes)), you can connect to it using [`mcp-remote`](https://www.npmjs.com/package/mcp-remote). This requires [Node.js](https://nodejs.org/) (v18+) installed on your machine.
483+
484+
```json
485+
{
486+
"mcpServers": {
487+
"sysdig-mcp-server": {
488+
"command": "npx",
489+
"args": [
490+
"-y",
491+
"mcp-remote",
492+
"http://<server-address>:<port>/sysdig-mcp-server",
493+
"--allow-http"
494+
]
495+
}
496+
}
497+
}
498+
```
499+
500+
> **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.
501+
413502
3. **Replace the placeholders**:
414503
- Replace `<your_sysdig_host>` with your Sysdig Secure host URL.
415504
- Replace `<your_sysdig_secure_api_token>` with your Sysdig Secure API token.
505+
- Replace `<server-address>:<port>` with the address of your remote MCP server (Option C only).
416506
417507
4. **Save the file** and restart the Claude Desktop app for the changes to take effect.
418508

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)