Query Grafana dashboards, panels, datasources, and alerts via the Grafana HTTP API.
2 fields · 1 secret
Credentials are injected into an ephemeral sandbox at boot and destroyed with it.
Light — starts in seconds
Sessions run up to 60 minutes before the sandbox is reclaimed.
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.
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.
Concrete operations exposed as tools.
In order. Each step assumes the previous one worked.
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.
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.
Both are injected at sandbox boot. The token is stored as a secret.
Ask the model which dashboards exist. A real list confirms both the URL and the token scope.
What you provide before the sandbox starts.
Grafana URLRequiredBase 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 TokenRequiredSecretCreate one under Administration → Service Accounts → Add service account → Add token. Scope to Viewer for read-only use.
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.
Known constraints, stated plainly.
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.
About the Grafana MCP server.
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.
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.
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.
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.