Secure Grafana Cloud access for AI agents

Dashboards, metrics, logs, traces, alerts, incidents, and on-call from Grafana Cloud via Grafana's hosted MCP server

Grafana Cloud lets your agents investigate what is happening in your systems from the Grafana Cloud stack your team already uses. Agents can search dashboards, run Prometheus, Loki, Tempo, Pyroscope, and SQL queries, read alert rules, incidents, and on-call schedules, and use Grafana Assistant investigations. Every call runs through your policies and is logged for audit.

Server URL: https://mcp.grafana.com/mcp

Grafana Cloud's MCP server is in public preview

Grafana Labs hosts this server and labels it public preview, with limited support and possible breaking changes before general availability. It works with Grafana Cloud stacks only, not self-managed Grafana.

Credential modes

Grafana Cloud supports per-org dynamic registration only, so there is no app to create on Grafana's side and no client ID or secret to enter. See Credential modes for how it compares with Use SecureAuth's app and Bring your own app.

Before you begin

  • A Grafana Cloud account with access to the stack each person will connect, for example https://<your-stack>.grafana.net.
  • Administrator access to your Agent Authority workspace.
  • If Grafana is already registered here as a custom MCP server with the grafana slug, remove it first. Both would claim the same slug.

Setup

  1. In the Agent Authority console, go to Tools & Services and click Add Resource.
  2. Select Grafana Cloud from the catalog.
  3. On Choose how to install Grafana Cloud, click Per-org dynamic registration. Selecting it adds the resource right away, with its 108 tools pre-configured and no credentials to paste.

Dynamic client registration

When you add the resource, the gateway registers its own OAuth client with Grafana Cloud, the credential it uses to sign users in. Grafana issues it automatically, so you configure nothing on the Grafana side.

Your policies are not the only limit. An agent acts with the Grafana permissions of the user who connected, so it can never see or change more than that person can in Grafana.

How users connect

Access is per user. Each person links their own Grafana Cloud account once:

  1. In Agent Authority, open the Grafana Cloud resource and click Connect.
  2. Sign in to Grafana Cloud if asked.
  3. Choose the stack to connect, then approve access.
  4. Grafana returns you to Agent Authority, and the connection shows Connected.

The connection is tied to the stack chosen in step 3. To work with another stack, the user disconnects and connects again.

Go to Connections to manage linked accounts.

Verify the connection

The gateway syncs the Grafana Cloud tools automatically. To check the connection end to end, ask your agent to run a request:

Check the health of my Grafana datasources

If your stack's datasources come back with their status, the connection is working. If a call is refused, see Troubleshooting.

Available tools

108 tools: 105 read-only and 3 destructive. search_dashboards, list_datasources, and assistant_search are good starting points.

AreaToolsExamples
Dashboards and panels13search_dashboards, get_dashboard_summary, run_panel_query
Datasources4list_datasources, check_datasources_health, get_query_examples
Prometheus6query_prometheus, list_prometheus_metric_names
Loki7query_loki_logs, query_loki_patterns, analyze_loki_labels
Tempo traces7search_tempo_traces, get_tempo_trace, diff_tempo_traces
Pyroscope profiles4query_pyroscope, list_pyroscope_profile_types
SQL datasources5query_sql, list_sql_tables, describe_sql_table
CloudWatch5query_cloudwatch, list_cloudwatch_metrics
Graphite4query_graphite, list_graphite_metrics
Other datasources3query_elasticsearch, query_influxdb, query_quickwit
Alerting7alerting_rules_read, alerting_silences_read, render_alert_status
OnCall7list_alert_groups, get_current_oncall_users, list_oncall_schedules
Incidents3list_incidents, get_incident
Investigations and Assistant9assistant_search, list_investigations, get_investigation_report
Agent Observability3agento11y_manage_agents, agento11y_manage_conversations
App, frontend, and Kubernetes observability5app_observability_handler, kubernetes_handler, get_assertions
Users, teams, and access9user_info, list_teams, get_resource_permissions
Plugins and docs5search_docs, get_doc, search_plugin_information
Grafana CLI and files2exec_gcx, read_grafanafs_file

Grafana marks every tool read-only except these three, which are tagged destructive:

  • exec_gcx – runs a gcx (Grafana Cloud CLI) command against the user's stack.
  • query_sql – runs a query against a SQL datasource.
  • query_influxdb – runs a query against an InfluxDB datasource.

get_doc, search_docs, and search_plugin_information are also tagged external, because they read Grafana's public documentation and plugin catalog rather than your stack.

Required scopes

The gateway requests these automatically, so there is nothing for you to configure.

  • grafana:read – read Grafana resources such as dashboards, alert rules, and users
  • grafana:query – run queries against the stack's datasources
  • grafana:write – make changes in Grafana

Policy examples

Every org starts with an Allow all rule at the bottom of the policy list. Because of it, a resource you just added is reachable as soon as someone connects. Rules are read from the top, and the first one that matches wins. Adding more allow rules changes nothing, so each example below works by adding a deny above that Allow all rule.

  • No CLI access. Deny exec_gcx. Agents keep every dashboard, query, and alerting tool.
  • Read-only investigation. Deny exec_gcx, query_sql, and query_influxdb. Agents can still query Prometheus, Loki, Tempo, and Pyroscope.
  • No people data. Deny list_users_by_org, list_teams, list_team_roles, list_user_roles, and get_role_assignments.

Next steps

  • Create a policy – start from the read-only pattern in Policy examples above.
  • Policies – how first-match-wins rule order and the seeded Allow all rule interact.

On this page