grafana/skills

assistant-mcp

Connect AI coding agents (Claude Code, Cursor, VS Code, OpenAI Codex) to Grafana Cloud via the mcp-grafana Model Context Protocol server.

Vedi sorgente

Come usare

  1. Copia il comando e controlla il pacchetto prima di installarlo nel tuo ambiente agente.
  2. Controlla strumenti, credenziali e ambienti richiesti nel documento originale.
  3. Descrivi input e risultato desiderato; confronta l’output con le fonti.
npx skills add https://github.com/grafana/skills --skill assistant-mcp

Prima di iniziare

  • L’installazione non include abbonamenti, quote API o accesso ai file.
  • Stelle e installazioni indicano attività, non un test indipendente di qualità o sicurezza.
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

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)

bash
# 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.
  1. 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).
  1. Wire `~/.claude/settings.json` (or project-local .claude/settings.json):
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.

  1. 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:

  • Check GRAFANA_URL has no trailing slash
  • Confirm the API key hasn't expired
  • Re-run with mcp-grafana --debug to see raw request/response

Connecting Cursor

Same Grafana token. Settings → Features → MCP Servers (or edit ~/.cursor/mcp.json):

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-write for 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: Viewer is enough for queries and dashboard reads. Only grant Editor when 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 set
  • `references/sse-transport.md` — SSE setup for team sharing and VS Code, with stdio-vs-SSE decision matrix + common failure modes
  • `references/a2a.md` — Agent-to-Agent (A2A) protocol for delegating reasoning to the Grafana Assistant (vs direct tool calls via MCP)

External resources

Correlati per attività

dallo stesso repository

Altri Skills

Tutti gli Skills
grafana
Community

adaptive-metrics

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 remotewrite fallback. Use when investigating a high Mimir/Grafana Cloud bill, hunting high-cardinality labels (poduid, serviceinstanceid, version), pre-aggregating counters/gauges, dropping unused metrics, or measuring grafanacloudinstanceactiveseries before/after — even w

installazioni
1
GitHub Stars
289
Aggiornato
21 ott
grafana
Community

admin

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 SSO providers, and provisions teams/folders/dashboards via Terraform. Use when managing Grafana Cloud access, configuring SSO/SAML/OAuth, setting up service accounts for Terraform/CI/CD, assigning RBA

installazioni
1
GitHub Stars
289
Aggiornato
21 ott
grafana
Community

app-observability

Get RED metrics + service maps + frontend RUM + AI/LLM monitoring out of Grafana Cloud — Application Observability (tracesspanmetrics 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 replay, pushError, React + router integration, TracingInstrumentation for browser → backend trace correlation), and AI Observability via OpenLIT (token / cost / latency, GPU, hallucination + toxicity evals). U

installazioni
1
GitHub Stars
289
Aggiornato
21 ott
grafana
Community

check-npm

Audit a JavaScript/TypeScript repo's npm, yarn, or pnpm configuration for supply-chain hardening: tool version, lifecycle scripts, unsafe dependency protocols, and minimum release age ≥3 days. Use when the user invokes /check-npm or asks to audit package manager security, lifecycle scripts, git dependencies, ignore-scripts, min-release-age, allow-git, approvedGitRepositories, strictDepBuilds, or blockExoticSubdeps in a Grafana plugin or JS/TS project.

installazioni
1
GitHub Stars
289
Aggiornato
21 ott