Grafana Cloud MCP server
The Grafana Cloud MCP server is a remotely hosted Model Context Protocol (MCP) server that lets external AI agents connect directly to your Grafana Cloud data. MCP-compatible clients, for example, Cursor, Claude Desktop, Windsurf, and Goose, can query metrics, logs, and other observability data from your Grafana environment without any local installation.
Unlike the open source Grafana MCP server, which runs locally and requires manual service account token configuration, the Grafana Cloud MCP server is fully hosted and uses OAuth 2.1 authorization. You point your AI agent at the Grafana Cloud MCP endpoint, authorize in your browser, and your agent connects.
How Grafana Cloud MCP differs from the local OSS server
The following table compares the Grafana Cloud MCP server with the local OSS MCP server.
Before you begin
Ensure you have the following:
- Grafana Cloud: The Grafana Cloud MCP server works only with hosted Grafana Cloud environments. Self-hosted Grafana users should use the local OSS MCP server
- Assistant terms: Assistant must be available for your stack, and any required Assistant terms must be accepted before you connect the Grafana Cloud MCP server. Depending on your Grafana Cloud agreement, terms acceptance may be handled automatically when you first use an Assistant feature in Grafana, or by an administrator in plugin settings
- Permissions: You need the Assistant Cloud MCP User role or the
grafana-assistant-app.cloud-mcp:accesspermission. Users with the Editor role or higher have this permission by default. Refer to Manage Assistant access with RBAC for details - MCP client: You need an MCP-compatible client, for example, Cursor, Claude Desktop, Windsurf, or Goose
Note
Using the Grafana Cloud MCP server counts toward your Grafana Assistant usage. Each user who connects through MCP is counted as an active user for billing purposes. Refer to Pricing for details on billing, included usage, configured limits, and how to monitor usage.
Connect your AI agent
The Grafana Cloud MCP server endpoint is https://mcp.grafana.com/mcp. Use the Streamable HTTP transport type, because SSE isn’t supported. Find your client in the sections below.
In the examples, replace <your-stack> with your Grafana Cloud stack name. Setting your stack, either in the X-Grafana-URL header or in the endpoint path, is optional but recommended. It skips the URL entry step during authorization and redirects you directly to the consent page.
After you configure your client:
- If you edited a configuration file, restart the client so that it picks up the change. Some clients, for example, Claude Desktop with
claude_desktop_config.json, reload only after you quit them completely, not when you close the window. - Run a prompt in your AI agent that requires Grafana data.
- When prompted, authorize the connection in your browser.
Your AI agent is now connected to your Grafana data.
Claude Code
Run the following in your terminal:
claude mcp add grafana https://mcp.grafana.com/mcp \
--transport http \
--header "X-Grafana-URL: https://<your-stack>.grafana.net"Cursor
For a one-click install, select Install Grafana MCP in Cursor.
To configure it yourself, go to Settings > Features > MCP > + Add New MCP Server, or add the following to .cursor/mcp.json:
{
"mcpServers": {
"grafana": {
"url": "https://mcp.grafana.com/mcp",
"headers": {
"X-Grafana-URL": "https://<your-stack>.grafana.net"
}
}
}
}Codex
Add the following to ~/.codex/config.toml:
[mcp_servers.grafana]
url = "https://mcp.grafana.com/mcp"
http_headers = { "X-Grafana-URL" = "https://<your-stack>.grafana.net" }Then run codex mcp login grafana to authorize.
VS Code
Add the following to .vscode/mcp.json in your workspace:
{
"servers": {
"grafana": {
"type": "http",
"url": "https://mcp.grafana.com/mcp",
"headers": {
"X-Grafana-URL": "https://<your-stack>.grafana.net"
}
}
}
}Claude Desktop
Grafana Labs publishes a Grafana Cloud MCP connector in the Claude connectors directory. Use it unless you need to set the URL yourself:
- Open the Grafana Cloud MCP connector in Claude, or go to Customize > Connectors, select Browse connectors, and find Grafana Cloud MCP by Grafana Labs.
- Select Connect.
- Authorize the connection in your browser, and enter your Grafana Cloud stack URL when prompted.
On Team and Enterprise plans, a Claude administrator must add the connector for the organization before members can connect. If you see Request instead of Connect, ask your Claude administrator to add it. Refer to Use connectors to extend Claude’s capabilities for details.
You can’t change the directory connector’s URL or add headers. To put your stack in the URL, or to connect more than one stack, add a custom connector instead:
- Go to Customize > Connectors and select Add > Add custom connector.
- Enter a name, for example
Grafana, and set the URL tohttps://mcp.grafana.com/mcp/<your-stack>.grafana.net. - Select Continue and follow the prompts to finish adding the connector.
On Team and Enterprise plans, only a Claude administrator can add a custom connector. It applies to everyone in the organization, so each custom connector points all members at the same stack. Refer to Get started with custom connectors for details.
To use claude_desktop_config.json instead, declare a local proxy in it. The proxy runs as a local process launched by Claude Desktop, forwards MCP traffic to https://mcp.grafana.com/mcp, and handles the OAuth flow. Several open source proxies do this. They’re maintained outside Grafana, so refer to their own documentation for setup and support.
Windsurf
Add the following to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"grafana": {
"url": "https://mcp.grafana.com/mcp",
"headers": {
"X-Grafana-URL": "https://<your-stack>.grafana.net"
}
}
}
}Other clients
Any other MCP-compatible client uses the same values:
Most clients express this as JSON in the following shape:
{
"mcpServers": {
"grafana": {
"url": "https://mcp.grafana.com/mcp",
"headers": {
"X-Grafana-URL": "https://<your-stack>.grafana.net"
}
}
}
}Key names vary between clients. Some use servers instead of mcpServers, and some require an explicit "type": "http" field, as in the VS Code example above. Refer to your client’s documentation for the exact file location and key names.
Connect multiple stacks
You can connect more than one Grafana Cloud stack to the same MCP client, for example, a production stack and a staging stack. Add a separate server entry for each stack, and put the stack’s host in the endpoint path instead of using the X-Grafana-URL header: https://mcp.grafana.com/mcp/<your-stack>.grafana.net.
Don’t reuse the same https://mcp.grafana.com/mcp endpoint with a different X-Grafana-URL header for each stack. Some clients, for example, Cursor and Claude Code, treat entries that share an endpoint as duplicates and load only one of them.
Each entry authorizes separately and keeps its own credentials, so you approve access once per stack. The stack in the path also skips the URL entry step during authorization. Give each entry a name that identifies its stack, so it’s clear which stack your agent is querying.
{
"mcpServers": {
"grafana-prod": {
"url": "https://mcp.grafana.com/mcp/<prod-stack>.grafana.net"
},
"grafana-staging": {
"url": "https://mcp.grafana.com/mcp/<staging-stack>.grafana.net"
}
}
}claude mcp add grafana-prod https://mcp.grafana.com/mcp/<prod-stack>.grafana.net --transport http
claude mcp add grafana-staging https://mcp.grafana.com/mcp/<staging-stack>.grafana.net --transport http[mcp_servers.grafana-prod]
url = "https://mcp.grafana.com/mcp/<prod-stack>.grafana.net"
[mcp_servers.grafana-staging]
url = "https://mcp.grafana.com/mcp/<staging-stack>.grafana.net"{
"servers": {
"grafana-prod": {
"type": "http",
"url": "https://mcp.grafana.com/mcp/<prod-stack>.grafana.net"
},
"grafana-staging": {
"type": "http",
"url": "https://mcp.grafana.com/mcp/<staging-stack>.grafana.net"
}
}
}In Codex, run codex mcp login once for each entry, for example, codex mcp login grafana-prod.
For Claude Desktop, add one custom connector per stack. For other clients, use the same pattern: one entry per stack, each with its own https://mcp.grafana.com/mcp/<your-stack>.grafana.net endpoint.
Connect an MCP client that requires manual registration
Most MCP clients register with the Grafana Cloud MCP server automatically. Some require you to provide a client ID and client secret before users can connect.
If your MCP client requires these credentials, register an OAuth client for Grafana Cloud MCP. The registration identifies the application, while each user continues to connect with their own Grafana identity and permissions.
Configure access
When you authorize a Grafana Cloud MCP connection, the consent page shows the permissions the client is requesting. Each one is a separate checkbox, and you can clear any you don’t want to grant:
- Read access: View dashboards, alerts, incidents, metrics, logs, traces, and profiles
- Query access: Run raw queries against SQL data sources such as ClickHouse, Snowflake, Athena, and InfluxDB. These queries execute as written and can modify data
- Write access: Create and modify dashboards, alerts, incidents, data sources, and Assistant investigations. Includes query and read access
To grant read-only access, clear both Write access and Query access, and leave Read access selected. Clearing only Write access prevents write tools, for example, update_dashboard and create_incident, but still allows raw SQL queries when Query access is selected.
Query access is separate from read access because these tools send your query to the data source unchanged. A statement that modifies data runs if the data source credentials allow it, so the tools stay unavailable until you grant query access explicitly. With read access alone, the agent can browse your Grafana data and query Prometheus, Loki, Tempo, and Pyroscope, but the SQL query tools aren’t available.
Users with the Editor role or higher can grant read and query access by default, and organization Admins can also grant write access. If a checkbox is unavailable on the consent page, ask your administrator to assign you the role that grants it. Refer to Manage Assistant access with RBAC for details.
Explore available tools
The Grafana Cloud MCP server exposes the same tool categories as the open source Grafana MCP server, plus Assistant-native tools, for example, infrastructure memory. Tools marked Query require query access, and tools marked Write require write access.
Search and navigation
Use these tools to find dashboards, folders, and generate links to Grafana resources.
Dashboards and folders
Use these tools to view and manage dashboards and folders.
Data sources
Use these tools to list and inspect configured data sources.
Prometheus
Use these tools to discover metrics and execute PromQL queries.
Loki
Use these tools to query logs and discover label metadata.
Tempo
If you have Tempo data sources in your Grafana Cloud stack, the Grafana Cloud MCP server will proxy any tools offered by that Tempo data source.
Pyroscope
Use these tools to query profiling data.
Athena
Use these tools to query Amazon Athena data sources.
ClickHouse
Use these tools to query ClickHouse data sources.
CloudWatch
Use these tools to query AWS CloudWatch metrics.
Elasticsearch
Use this tool to search Elasticsearch data sources.
InfluxDB
Use this tool to query InfluxDB data sources.
Snowflake
Use these tools to query Snowflake data sources.
Alerting
Use these tools to view and manage alert rules and routing configuration.
Annotations
Use these tools to view and create annotations on dashboards.
Incidents
Use these tools to view and manage incidents.
OnCall
Use these tools to view on-call schedules, shifts, teams, and alert groups.
Use Assistant investigations
Use these tools to list, create, and inspect Grafana Assistant Investigations.
Other tools
Use these tools for additional Grafana tasks, including panel rendering and infrastructure summaries.
Manage connections
Manage your Grafana Cloud MCP connections from the Grafana Assistant Settings → Connectors → MCP clients page in your Grafana Cloud stack.
Revoke access
To revoke a Grafana Cloud MCP connection before it expires, go to Settings → Connectors → MCP clients and find the connection under Your connections.
Session lifetime
Your OAuth token is valid for 1 hour and refreshes automatically for 30 days. After 30 days, you’re prompted to log in and re-authorize.
Data privacy
Grafana securely routes your MCP queries via proxy. Grafana doesn’t train AI models on your PromQL, LogQL queries, investigation content, or prompt payload data. Refer to Privacy and security for more information.
Billing and usage
The Grafana Cloud MCP server is part of Grafana Assistant. Users who connect through MCP are counted as active users and contribute to your organization’s monthly usage. The same plan-level included usage and configured limits apply whether you interact with Assistant through the Grafana UI or through an MCP client.
Calling a Cloud MCP tool doesn’t by itself consume Grafana Assistant tokens. A tool consumes tokens only when it invokes an Assistant model. Using Cloud MCP with read-only access doesn’t consume Grafana Assistant tokens.
To monitor usage across all Assistant surfaces including MCP, navigate to Assistant > Usage in your Grafana Cloud stack. Refer to Pricing for full details on billing, limits, and access controls.
Known limitations
- Grafana Cloud only: The Grafana Cloud MCP server doesn’t support self-hosted Grafana instances. Self-hosted users should use the local OSS MCP server
- Transport: Only Streamable HTTP is supported. SSE transport isn’t supported


