Hosted MCPUtility

Grafana MCP Server

Query Grafana dashboards, panels, datasources, and alerts via the Grafana HTTP API.

Setup

2 fields · 1 secret

Credentials are injected into an ephemeral sandbox at boot and destroyed with it.

Runtime

Light — starts in seconds

Sessions run up to 60 minutes before the sandbox is reclaimed.

Models

60+ AI models

Chat with 60+ AI models on the same workflow — switch to a different model mid-conversation and re-run the same prompt, or use Compare mode to put several side-by-side.

What the Grafana MCP server does

How models use it and what it is built for.

The Grafana MCP server exposes your dashboards, datasources and alert rules to an AI model through the Grafana HTTP API.

The value is in incident context. During an incident the useful question is rarely "what is this metric" — it is "which dashboards cover this service, which alerts are firing, and what changed". A model with API access can gather all of that in one pass instead of you clicking through folders.

It authenticates with a Grafana service account token scoped to the permissions you choose, which makes it considerably safer to wire up than most credential-based servers.

What a model can do with it

Concrete operations exposed as tools.

  • Search dashboards and folders by name or tag
  • Read dashboard JSON — which panels, which queries, which datasources
  • List configured datasources and their types
  • Query a datasource directly and return the series
  • Inspect alert rules and their current state
  • Correlate a firing alert back to the dashboard and query that defines it

How to set up the Grafana MCP server

In order. Each step assumes the previous one worked.

  1. 01

    Create a service account token

    In Grafana go to Administration → Service accounts, create an account with the Viewer role, and generate a token. Viewer is enough for reading dashboards, datasources and alerts.

  2. 02

    Use the base URL only

    Supply https://my-org.grafana.net or https://grafana.example.com — no trailing path or dashboard URL. Grafana Cloud instances are publicly reachable; a self-hosted instance must be too, or need a tunnel.

  3. 03

    Provide URL and token

    Both are injected at sandbox boot. The token is stored as a secret.

  4. 04

    Verify by listing dashboards

    Ask the model which dashboards exist. A real list confirms both the URL and the token scope.

Configuration

What you provide before the sandbox starts.

Grafana URLRequired

Base URL of your Grafana instance — e.g. https://my-org.grafana.net or https://grafana.example.com. Must be reachable from the public internet.

Grafana Service Account TokenRequiredSecret

Create one under Administration → Service Accounts → Add service account → Add token. Scope to Viewer for read-only use.

Example prompts

Paste any of these into Agent Studio once the server is connected.

List every dashboard tagged "production" and tell me which datasources they use.

Which alert rules are currently firing, and what query does each one evaluate?

Read the API latency dashboard and explain what each panel measures.

Find every dashboard that queries the payments database.

Limits and things to watch

Known constraints, stated plainly.

  • The token scope is the boundary — a Viewer token cannot create or edit dashboards, which is usually what you want.
  • Self-hosted Grafana behind a VPN is unreachable from the sandbox without a tunnel.
  • Large dashboard JSON payloads are truncated; ask about specific panels rather than dumping a whole dashboard.
  • Querying a datasource depends on that datasource being reachable from Grafana itself, not from the sandbox.

Test Grafana against a real model

Deploy the server hosted, then watch which tools a model actually reaches for — with full JSON input and output on every call. Switch models mid-conversation to compare how each one uses the same server.

Frequently asked questions

About the Grafana MCP server.

What permissions does the service account need?

Viewer is sufficient for reading dashboards, datasources and alert rules, and is the recommended scope. Grant Editor only if you specifically want the agent to create or modify dashboards.

Does it work with Grafana Cloud?

Yes, and it is the simplest setup — Cloud instances are already publicly reachable, so you need only the stack URL and a service account token.

Can it query Prometheus through Grafana?

Yes. Grafana proxies datasource queries, so a PromQL query runs through Grafana against whichever Prometheus datasource is configured. If you want to query Prometheus directly instead, the Prometheus MCP server is the more direct route.

Is an API key the same as a service account token?

Legacy API keys still work on older versions, but Grafana has deprecated them in favour of service account tokens. Use a service account — the permissions are clearer and revocation is per-account.

More