Generated banner for Assistant MCP
Generated logo for Assistant MCP

Assistant MCP

Grafana LabsOfficialPublished by Grafana Labs

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • No issues found

From the author

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 description by Grafana Labs

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides the configuration and setup procedures to connect AI coding agents like Claude Code and Cursor to Grafana Cloud. By deploying the Grafana MCP server, developers can enable their agents to query metrics, search dashboards, manage alerts, and investigate incidents directly from their development environment. The guide covers installation, authentication via service account tokens, and configuration for both stdio and SSE transport modes to support individual or team-shared workflows.

What it does

  • Installs the Grafana MCP server binary via Go.
  • Configures agent settings to enable Grafana tool access.
  • Supports read-only sessions for enhanced security.
  • Enables SSE transport for shared or long-lived server instances.
  • Provides verification steps to ensure successful tool connectivity.
  • Offers guidance on scoping service account permissions.

When to use it

  • When you need to query Grafana metrics or dashboards from within your IDE.
  • When setting up an AI agent to assist with incident investigation.
  • When configuring a shared Grafana MCP server for a development team.
  • When you want to delegate observability tasks to an AI agent.

Advantages

  • Direct integration with existing coding agent workflows.
  • Flexible transport options for local or team-based setups.
  • Granular security control via service account roles and read-only flags.
  • Seamless access to observability data without leaving the editor.

Usage examples

“Give my agent Grafana access.”
The agent is configured with the Grafana MCP server, allowing it to execute tool calls for querying metrics and dashboards.
“List dashboards tagged kubernetes.”
The agent uses the Grafana MCP tool to fetch and display a list of relevant dashboards from your Grafana instance.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/grafana/assistant-mcp/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip assistant-mcp.zip -d .agents/skills

Documentation by Grafana Labs

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.
  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).

  2. 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.

  3. 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):

{
  "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

Files

references/tools.md

Available MCP tools

Tools exposed by the Grafana MCP server once connected. The agent calls these by name; this reference is what's available.

Contents

  • Query tools

  • Dashboard tools

  • Alerting + incident tools

  • Fleet Management tools

  • Annotation tools

Query tools

  • query_prometheus — run PromQL queries against Grafana Cloud Metrics

  • query_loki — run LogQL queries against Grafana Cloud Logs

  • query_tempo — run TraceQL queries against Grafana Cloud Traces

  • list_datasources — enumerate configured data sources

Dashboard tools

  • search_dashboards — find dashboards by name, tag, or folder

  • get_dashboard — retrieve full dashboard JSON

  • create_dashboard — create or update a dashboard (requires Editor role + writes not disabled)

Alerting + incident tools

  • list_alert_rules — list firing and pending alerts

  • get_alert_rule — details for a specific alert rule

  • list_incidents — list active incidents (requires IRM)

Fleet Management tools

Available if grafana-collector-app is installed:

  • list_collectors — list Alloy collectors and their health

  • list_pipelines — list remote configuration pipelines

  • get_pipeline — fetch pipeline YAML

Annotation tools

  • list_annotations — search dashboard annotations by time range

  • create_annotation — add an annotation to a dashboard

How the agent discovers tools

Once connected, run /mcp in Claude Code (or the equivalent in Cursor / VS Code) to see the live list. The list above is the canonical set as of the current mcp-grafana release; new tools are added in releases, see github.com/grafana/mcp-grafana releases.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs an API key

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Grafana Labs
Publisher
Grafana Labs (Official)
Source
grafana/skills · skills/grafana-cloud/assistant-mcp · commit 8fb72a5
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Grafana Labs or Grafana Labs.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download assistant-mcp.zip