Skip to content

Commit d231282

Browse files
committed
ai slop README update
1 parent 0551316 commit d231282

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

README.md

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -352,43 +352,43 @@ When an organization ID is provided, the MCP server will set the `X-Grafana-Org-
352352

353353
- **Docker image**: Use the pre-built Docker image from Docker Hub.
354354

355-
**Important**: The Docker image's entrypoint is configured to run the MCP server in SSE mode by default, but most users will want to use STDIO mode for direct integration with AI assistants like Claude Desktop:
355+
The Docker image defaults to **stdio mode**, which is ideal for direct integration with AI assistants like Claude Desktop via the MCP Registry.
356356

357-
1. **STDIO Mode**: For stdio mode you must explicitly override the default with `-t stdio` and include the `-i` flag to keep stdin open:
357+
1. **STDIO Mode** (default): Include the `-i` flag to keep stdin open:
358358

359359
```bash
360-
docker pull mcp/grafana
360+
docker pull grafana/mcp-grafana
361361
# For local Grafana:
362-
docker run --rm -i -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> mcp/grafana -t stdio
362+
docker run --rm -i -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> grafana/mcp-grafana
363363
# For Grafana Cloud:
364-
docker run --rm -i -e GRAFANA_URL=https://myinstance.grafana.net -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> mcp/grafana -t stdio
364+
docker run --rm -i -e GRAFANA_URL=https://myinstance.grafana.net -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> grafana/mcp-grafana
365365
```
366366

367-
2. **SSE Mode**: In this mode, the server runs as an HTTP server that clients connect to. You must expose port 8000 using the `-p` flag:
367+
2. **SSE Mode**: Run as an HTTP server. You must specify `-t sse`, bind to `0.0.0.0`, and expose port 8000:
368368

369369
```bash
370-
docker pull mcp/grafana
371-
docker run --rm -p 8000:8000 -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> mcp/grafana
370+
docker pull grafana/mcp-grafana
371+
docker run --rm -p 8000:8000 -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> grafana/mcp-grafana -t sse --address 0.0.0.0:8000
372372
```
373373

374-
3. **Streamable HTTP Mode**: In this mode, the server operates as an independent process that can handle multiple client connections. You must expose port 8000 using the `-p` flag: For this mode you must explicitly override the default with `-t streamable-http`
374+
3. **Streamable HTTP Mode**: For multiple client connections. Specify `-t streamable-http`, bind to `0.0.0.0`, and expose port 8000:
375375

376376
```bash
377-
docker pull mcp/grafana
378-
docker run --rm -p 8000:8000 -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> mcp/grafana -t streamable-http
377+
docker pull grafana/mcp-grafana
378+
docker run --rm -p 8000:8000 -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> grafana/mcp-grafana -t streamable-http --address 0.0.0.0:8000
379379
```
380380

381381
For HTTPS streamable HTTP mode with server TLS certificates:
382382

383383
```bash
384-
docker pull mcp/grafana
384+
docker pull grafana/mcp-grafana
385385
docker run --rm -p 8443:8443 \
386386
-v /path/to/certs:/certs:ro \
387387
-e GRAFANA_URL=http://localhost:3000 \
388388
-e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> \
389-
mcp/grafana \
389+
grafana/mcp-grafana \
390390
-t streamable-http \
391-
-addr :8443 \
391+
--address 0.0.0.0:8443 \
392392
--server.tls-cert-file /certs/server.crt \
393393
--server.tls-key-file /certs/server.key
394394
```
@@ -402,6 +402,22 @@ When an organization ID is provided, the MCP server will set the `X-Grafana-Org-
402402
GOBIN="$HOME/go/bin" go install github.com/grafana/mcp-grafana/cmd/mcp-grafana@latest
403403
```
404404

405+
- **Build container image with ko**: For local development or custom container builds, you can use [ko](https://ko.build/) to build a container image directly from source:
406+
407+
```bash
408+
# Install ko (if not already installed)
409+
go install github.com/google/ko@latest
410+
411+
# Build and load into local Docker daemon
412+
KO_DOCKER_REPO=ko.local ko build ./cmd/mcp-grafana --bare
413+
414+
# Build for a specific registry
415+
KO_DOCKER_REPO=ghcr.io/myorg/mcp-grafana ko build ./cmd/mcp-grafana --bare -t latest
416+
417+
# Build multi-platform image
418+
KO_DOCKER_REPO=docker.io/myorg/mcp-grafana ko build ./cmd/mcp-grafana --platform linux/amd64,linux/arm64 --bare -t v1.0.0
419+
```
420+
405421
- **Deploy to Kubernetes using Helm**: use the [Helm chart from the Grafana helm-charts repository](https://github.com/grafana/helm-charts/tree/main/charts/grafana-mcp)
406422

407423
```bash
@@ -450,9 +466,7 @@ When an organization ID is provided, the MCP server will set the `X-Grafana-Org-
450466
"GRAFANA_URL",
451467
"-e",
452468
"GRAFANA_SERVICE_ACCOUNT_TOKEN",
453-
"mcp/grafana",
454-
"-t",
455-
"stdio"
469+
"grafana/mcp-grafana"
456470
],
457471
"env": {
458472
"GRAFANA_URL": "http://localhost:3000", // Or "https://myinstance.grafana.net" for Grafana Cloud
@@ -468,11 +482,9 @@ When an organization ID is provided, the MCP server will set the `X-Grafana-Org-
468482
}
469483
```
470484

471-
> Note: The `-t stdio` argument is essential here because it overrides the default SSE mode in the Docker image.
472-
473485
**Using VSCode with remote MCP server**
474486

475-
If you're using VSCode and running the MCP server in SSE mode (which is the default when using the Docker image without overriding the transport), make sure your `.vscode/settings.json` includes the following:
487+
If you're running the MCP server in SSE mode, make sure your `.vscode/settings.json` includes the following:
476488
477489
```json
478490
"mcp": {
@@ -536,9 +548,7 @@ To use debug mode with the Claude Desktop configuration, update your config as f
536548
"GRAFANA_URL",
537549
"-e",
538550
"GRAFANA_SERVICE_ACCOUNT_TOKEN",
539-
"mcp/grafana",
540-
"-t",
541-
"stdio",
551+
"grafana/mcp-grafana",
542552
"-debug"
543553
],
544554
"env": {
@@ -550,8 +560,6 @@ To use debug mode with the Claude Desktop configuration, update your config as f
550560
}
551561
```
552562
553-
> Note: As with the standard configuration, the `-t stdio` argument is required to override the default SSE mode in the Docker image.
554-
555563
### TLS Configuration
556564
557565
If your Grafana instance is behind mTLS or requires custom TLS certificates, you can configure the MCP server to use custom certificates. The server supports the following TLS configuration options:
@@ -602,9 +610,7 @@ If your Grafana instance is behind mTLS or requires custom TLS certificates, you
602610
"GRAFANA_URL",
603611
"-e",
604612
"GRAFANA_SERVICE_ACCOUNT_TOKEN",
605-
"mcp/grafana",
606-
"-t",
607-
"stdio",
613+
"grafana/mcp-grafana",
608614
"--tls-cert-file",
609615
"/certs/client.crt",
610616
"--tls-key-file",
@@ -714,9 +720,9 @@ docker run --rm -p 8443:8443 \
714720
-v /path/to/certs:/certs:ro \
715721
-e GRAFANA_URL=http://localhost:3000 \
716722
-e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> \
717-
mcp/grafana \
723+
grafana/mcp-grafana \
718724
-t streamable-http \
719-
-addr :8443 \
725+
--address 0.0.0.0:8443 \
720726
--server.tls-cert-file /certs/server.crt \
721727
--server.tls-key-file /certs/server.key
722728
```

0 commit comments

Comments
 (0)