Sign inSign up

sbx/grafana-kit:latest

Manifest digest

sha256:bf2e9b1161234399616c3346f8362c64bc6d14d9a837b0357534b6afea2ef4ef

Last pushed

2 days by sbx

Type

Sandbox Kit

Manifest digest

sha256:bf2e9b1161234399616c3346f8362c64bc6d14d9a837b0357534b6afea2ef4ef

yaml
schemaVersion: "2"
kind: mixin
name: grafana
version: 1.0.0
displayName: Grafana (local)
description: Adds the official Grafana MCP server (mcp-grafana) plus the grafana-client Python library to an agent, pre-wired to a local Grafana on the host - no cloud account, no API token.
licenses:
    - Apache-2.0
agentInstructions:
    content: |
        ## Grafana observability tooling

        The official Grafana MCP server (`mcp-grafana`) is installed at
        `~/.local/bin/mcp-grafana` and wired to a local Grafana via `GRAFANA_URL`
        (`http://host.docker.internal:3000`). Through it you can search dashboards,
        list datasources, and run Prometheus/Loki queries. The `grafana-client`
        Python library is also installed for scripting; see `~/runbooks/` for a
        working example (`grafana_report.py`).
permissions:
    network:
        allow:
            - pypi.org
            - files.pythonhosted.org
            - github.com
            - objects.githubusercontent.com
            - release-assets.githubusercontent.com
environment:
    variables:
        GRAFANA_URL: http://host.docker.internal:3000
        NO_PROXY: localhost,127.0.0.1,host.docker.internal
        no_proxy: localhost,127.0.0.1,host.docker.internal
setup:
    install:
        - command: mkdir -p /home/agent/.local/bin && arch=$(uname -m) && case "$arch" in x86_64) a=x64 ;; aarch64|arm64) a=arm64 ;; *) a=x64 ;; esac && curl -fsSL "https://github.com/grafana/mcp-grafana/releases/download/v1.0.0/linux.${a}.grafana.tar.gz" | tar -xz -C /home/agent/.local/bin mcp-grafana && chmod +x /home/agent/.local/bin/mcp-grafana
          user: "1000"
          description: Download the pinned mcp-grafana v1.0.0 binary for the container arch into ~/.local/bin
        - command: pip install --break-system-packages 'grafana-client==5.1.0'
          user: "1000"
          description: Install the grafana-client Python library (used by the runbooks and for shell verification)
    startup:
        - command:
            - sh
            - -c
            - command -v claude >/dev/null 2>&1 && claude mcp add grafana -- /home/agent/.local/bin/mcp-grafana >/dev/null 2>&1 || true
          user: "1000"
          description: Register mcp-grafana with the Claude agent (best-effort; no-op elsewhere)
    files:
        - path: /home/agent/.grafana/mcp.json
          content: |
            {
              "mcpServers": {
                "grafana": {
                  "command": "/home/agent/.local/bin/mcp-grafana",
                  "args": [],
                  "env": {
                    "GRAFANA_URL": "http://host.docker.internal:3000"
                  }
                }
              }
            }
          mode: "0644"
          onlyIfMissing: true
          description: Portable MCP server definition - copy into any agent that reads an mcpServers block