Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Grafana MCP Server

$ mcp-grafana Official Med Risk
Grafana Labs · Agent Bridges & Meta · Apache-2.0 · macos / linux / windows

Official Grafana Labs MCP server in Go that gives AI agents access to dashboards, Prometheus metrics, Loki logs, Tempo traces, incidents, and alert rules. Supports -t/--transport (stdio, sse, streamable-http), --address, --endpoint-path, --enabled-tools, and --disable-write safety scoping.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
brew install mcp-grafana
CLI vs MCP Decision MCP Preferred

mcp-grafana is purpose-built as an MCP server bridging Grafana, Prometheus, Loki, and alerting APIs into agent tool schemas.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Exposes structured MCP JSON-RPC tools over stdio, sse, and streamable-http, with --enabled-tools filtering and non-interactive startup.

  • Supports -t/--transport (stdio|sse|streamable-http), --address, and --endpoint-path
Trust & Safety 21 / 25

Supports Grafana Service Account tokens and --disable-write / --enabled-tools flags to enforce least-privilege read-only operation.

  • --disable-write and --enabled-tools restrict mutating and unwanted tool categories
Setup & Portability 13 / 15

Single static Go binary available via brew install mcp-grafana, go install, Docker, and GitHub releases across macOS, Linux, and Windows.

  • Distributed via Homebrew, Go install, Docker, and release tarballs
Utility & Efficiency 13 / 15

Consolidates dashboard search, PromQL, LogQL, Tempo, and OnCall queries behind one official server.

  • Unifies multiple Grafana stack APIs in one MCP server
Maintenance & Lineage 9 / 10

Official grafana/mcp-grafana repository maintained by Grafana Labs under Apache-2.0.

  • Official Grafana Labs repository with active releases
Docs & Verifiability 8 / 10

Well-documented README and Grafana Cloud MCP docs detailing flags, transports, and tool categories.

  • README and Grafana docs document all flags and environment variables

Security, Auth & Guardrails

Auth Modes
Env API Key Service Account
Credential Storage

Reads GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN (or basic auth env vars) from process environment.

Side Effects
Read-Only Remote Write
Cost & Quotas

Apache-2.0 open-source binary; requires a self-hosted Grafana instance or Grafana Cloud account.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Grafana MCP Server Agent Rules
- Always pass `--disable-write` and scope `GRAFANA_SERVICE_ACCOUNT_TOKEN` to Viewer role for investigation tasks.
- Use `--enabled-tools` to whitelist only required datasources and prevent prompt bloat.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run mcp-grafana in read-only stdio mode
GRAFANA_URL=https://grafana.example.com GRAFANA_SERVICE_ACCOUNT_TOKEN=$TOKEN mcp-grafana --disable-write

Starts the MCP server over stdio while disabling all mutating dashboard, alert, and incident tools.

Expose selective observability tools via Streamable HTTP
mcp-grafana -t streamable-http --address 127.0.0.1:8000 --endpoint-path /mcp --enabled-tools search,prometheus,loki

Restricts exposed MCP tools to search, Prometheus, and Loki queries on a loopback HTTP endpoint.

Controlled Writes & Previews

Run full mcp-grafana with debug logging enabled
mcp-grafana -t stdio --debug --log-level debug

Enables all configured Grafana tools including write actions with verbose HTTP diagnostics for controlled troubleshooting.

Strengths for Agents

  • + --disable-write and --enabled-tools let operators enforce read-only, minimal-context agent sessions.
  • + Supports stdio, sse, and streamable-http transports in a single Go binary.
  • + Covers dashboards, Prometheus, Loki, Tempo, and alerts without writing custom REST wrappers.

Caveats & Pitfalls

  • ! --debug logs detailed HTTP payloads that may expose sensitive headers in shared CI logs.
  • ! Passing --enabled-tools overrides defaults, so omitted tool groups must be listed explicitly.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI