assistant-mcp
Connect AI coding agents (Claude Code, Cursor, VS Code, OpenAI Codex) to Grafana Cloud via the `mcp-grafana` Model Context Protocol server. Installs the server with `go install`, generates a Grafana service-account token, wires `~/.claude/settings.json` or `~/.cursor/mcp.json` with the `command` + `
- 0
- Installs
- —
- Rating
- —
- Success rate
- 4
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 380ede0986b568d0… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Grafana Cloud MCP Server Setup
The Grafana MCP server exposes Grafana Cloud capabilities as tools that AI agents can call via the Model Context Protocol. Agents can then query metrics, search dashboards, manage alerts, investigate incidents, and interact with Fleet Management without leaving the coding environment.
Transports: stdio (agent spawns the server as a subprocess, simplest), or SSE (server runs independently, agents connect via HTTP — see references/sse-transport.md).
Common Workflows
Connecting Claude Code to Grafana (stdio)
# 1. Install the server
go install github.com/grafana/mcp-grafana/cmd/mcp-grafana@latest
# 2. Verify the binary
mcp-grafana --version
# If "command not found": ensure $GOPATH/bin (or $HOME/go/bin) is on PATH.
-
Get a service-account token: Grafana Cloud → Administration → Service Accounts → create with
Viewerrole (addEditoronly if you need writes) → generate token. Note the Grafana URL (e.g.https://myorg.grafana.net). -
Wire
~/.claude/settings.json(or project-local.claude/settings.json):{ "mcpServers": { "grafana": { "command": "mcp-grafana", "args": ["--disable-write"], "env": { "GRAFANA_URL": "https://myorg.grafana.net", "GRAFANA_API_KEY": "glsa_xxxx" } } } }--disable-writeis the safer default — drop it once you've verified the read path works. -
Restart Claude Code, then verify:
/mcpThe
grafanaserver should appear with its tool list. Then ask:What data sources are configured in my Grafana instance?A clean response = working. If the tool call fails:
- Check
GRAFANA_URLhas no trailing slash - Confirm the API key hasn't expired
- Re-run with
mcp-grafana --debugto see raw request/response
- Check
Connecting Cursor
Same Grafana token. Settings → Features → MCP Servers (or edit ~/.cursor/mcp.json):
{
"mcpServers": {
"grafana": {
"command": "mcp-grafana",
"args": ["--disable-write"],
"env": {
"GRAFANA_URL": "https://myorg.grafana.net",
"GRAFANA_API_KEY": "glsa_xxxx"
}
}
}
}
Verify the same way — Cursor surfaces MCP servers in its agent panel; run a query like "list dashboards tagged kubernetes".
Sharing the server across a team (SSE)
Switch from stdio to SSE so the server runs once and many agents connect to it. Full setup with VS Code config in references/sse-transport.md.
Security considerations
- API keys belong in env vars or a secrets manager — never in committed files.
- Use
--disable-writefor shared environments and CI; only lift it on the specific machine where the agent should be allowed to mutate Grafana. - Scope service-account permissions to the minimum:
Vieweris enough for queries and dashboard reads. Only grantEditorwhen the agent needs to create dashboards or annotations. - Rotate tokens periodically via Administration → Service Accounts.
References
references/tools.md— full list of MCP tools exposed (query / dashboard / alerting / Fleet Management / annotations) and how to discover the live setreferences/sse-transport.md— SSE setup for team sharing and VS Code, with stdio-vs-SSE decision matrix + common failure modesreferences/a2a.md— Agent-to-Agent (A2A) protocol for delegating reasoning to the Grafana Assistant (vs direct tool calls via MCP)
External resources
Files
4- SKILL.md
3289c779434.9 KB - references/a2a.md
c48e24f7f21.1 KB - references/sse-transport.md
0952babc211.2 KB - references/tools.md
307b3e59391.8 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from grafana/skills8
Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact/regex rules, label-drop config, unused-metric detection, and Alloy remote_write fallback. Use when investigating a high Mimir/Grafana Cloud
Manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO/SAML/OAuth/GitHub auth, service accounts for CI/CD, user invites, team membership, and API-driven provisioning. Creates stacks via the Cloud API, mints service-account tokens, applies role assignments, configures
Use when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating webhook", "add a mutation handler", "validate incoming resources", "implement admission logic", "add admission webhooks", "write ingress validation", or asks how to validate or mutate re
Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack/PagerDuty/email/webhook), notification policies with hierarchical matchers, silences, mute timings, on-call schedules and escala
Build a unified telemetry pipeline with Grafana Alloy — one OpenTelemetry-compatible binary that collects metrics, logs, traces, and profiles and ships to Grafana Cloud / Prometheus / Loki / Tempo / Pyroscope. Covers the Alloy config language (blocks, `sys.env`, component refs), `prometheus.scrape`
Get RED metrics + service maps + frontend RUM + AI/LLM monitoring out of Grafana Cloud — Application Observability (`traces_spanmetrics_*` from OTel traces, p50/p95/p99 latency, exemplar-to-trace, traces-to-logs / profiles), Frontend Observability with the Faro Web SDK (Core Web Vitals, session repl
Use when starting any grafana-app-sdk work — scaffolding a Grafana app, initializing a Grafana App Platform app, picking a deployment mode (standalone operator / grafana/apps / frontend-only), wiring app-specific config, or onboarding to the SDK. Covers `grafana-app-sdk` CLI install, `project init`
Reduces JavaScript dependency footprint with pnpm while preserving lockfile, workspace layout, and dependency range style. Runs /check-npm first, then removes unused deps, dedupes versions, ranks transitive closure, and reports Keep/Replace/Remove triage. Use when cleaning up pnpm dependencies, redu
Related ai-ml skillsscan passed
Configure SuperJSON transformer on both server initTRPC.create({ transformer: superjson }) and every client terminating link (httpBatchLink, httpLink, wsLink, httpSubscriptionLink) to support Date, Map, Set, BigInt over the wire. Transformer must match on both sides. In v11, transformer goes on indi
Knowledge base management, ingestion, sync, and retrieval across multiple storage layers (local files, MCP memory, vector stores, Git repos). Use when the user wants to save, organize, sync, deduplicate, or search across their knowledge systems.
MANDATORY for Flink or Amazon Managed Service for Apache Flink (MSF) questions. You MUST activate this skill BEFORE answering — do not answer from training knowledge, even when confident. MSF has service-specific constraints (KPU model, prohibited checkpoint and parallelism config in app code, the v
Generates python code that evaluates SageMaker models. Supports two evaluation types: LLM-as-Judge and Custom Scorer. Use when the user says "evaluate my model", "run a benchmark", "test model performance", "how did my model perform", "compare models", or other similar requests.
Builds voice and chat AI agents with LiveKit Agents and LiveKit Cloud. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI to my app", "implement handoffs", "structure an agent workflow", "my agent is slow / too chatty", "it says it booked but nothing was saved",
Use Neo4j GenAI Plugin ai.text.* functions and procedures for in-Cypher