admission-control
Use when the user asks to "write a validator", "add validation", "implement admission…
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`
$ npx -y skills add grafana/skills --skill assistant-mcp --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/assistant-mcpContext preview
The summary Claude sees to decide when to auto-load this skill.
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`
name: assistant-mcp license: Apache-2.0 description: 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` + `env` block, runs `--disable-write` for safer read-only sessions, switches to SSE transport for team-shared / VS Code setups, and verifies with `/mcp` + a `list_datasources` round-trip. Use when connecting Claude Code to Grafana, setting up MCP for Grafana, configuring the Grafana MCP server, using Grafana tools in Cursor/VS Code, querying Grafana from an AI agent, sharing the MCP server across a team — even when the user says "give my agent Grafana access", "let Claude see my metrics", or "Cursor + Grafana" without saying "MCP".
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](references/sse-transport.md)).
# 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.
3. **Get a service-account token**: Grafana Cloud → Administration → Service Accounts → create with `Viewer` role (add `Editor` only if you need writes) → generate token. Note the Grafana URL (e.g. `https://myorg.grafana.net`).
4. **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-write` is the safer default — drop it once you've verified the read path works.
5. **Restart Claude Code, then verify**:
/mcp
The `grafana` server 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:
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".
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](references/sse-transport.md).
Public skills for working with Grafana, Prometheus, Loki, Tempo, Pyroscope, k6, and the broader LGTM observability stack. Compatible with Claude Code, Cursor, Codex, and any tool supporting the Agent Skills open standard.
Repo: grafana/skills
Use when the user asks to "write a validator", "add validation", "implement admission…
Use when starting any grafana-app-sdk work — scaffolding a Grafana app, initializing a…
Author CUE kind definitions for grafana-app-sdk apps - schemas, versioning, field…
Implement reconcilers and watchers for grafana-app-sdk apps — write…
Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics…