Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/latest/developer-resources/mcp.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/latest/developer-resources/mcp/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Grafana MCP server
This documentation helps you install and run the open source Grafana MCP server, connect MCP-compatible clients, and configure authentication, transports, and tools.
The Grafana MCP server is a Model Context Protocol (MCP) server that gives AI assistants and LLM clients access to your Grafana instance. You can query metrics and logs, search and manage dashboards, manage alert rules, work with Grafana Incident and Sift, and generate deeplinks to Grafana resources.
Choose the right Grafana MCP option
Grafana offers two MCP server options:
| Option | Best for | Authentication |
|---|---|---|
| Open source Grafana MCP server | Running and managing the MCP server yourself for Grafana Cloud or self-managed Grafana | Service account token |
| Grafana Cloud MCP server | Connecting external AI agents to Grafana Cloud without installing a local server | OAuth 2.1 browser authorization, scoped to the signed-in Grafana user |
Use this documentation for the open source server. For Grafana Cloud’s hosted MCP server, refer to Grafana Cloud MCP server.
Overview
Use the Grafana MCP server to let your preferred MCP-compatible client (for example, Claude Desktop, Cursor, or VS Code with Copilot) talk to Grafana. The server exposes tools for dashboards, datasources (Prometheus, Loki, and others), alerting, incidents, OnCall, and more. You configure which tools are enabled and how the server connects to Grafana (authentication and transport).
Quick start
This quick start requires uv. Add this to your MCP client configuration (for example Claude Desktop or Cursor):
{
"mcpServers": {
"grafana": {
"command": "uvx",
"args": ["mcp-grafana"],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
}
}
}
}When using this open source server with Grafana Cloud, set GRAFANA_URL to your instance URL (for example https://myinstance.grafana.net). Refer to Clients and Set up for next steps.
Grafana 9.0 or later is required for full functionality. Some features, particularly datasource-related operations, may not work correctly with earlier versions due to missing API endpoints.
Explore the docs
- Clients – Cursor, Claude Desktop, VS Code, and more.
- Set up – uvx, Docker, binary, Helm, and client configuration examples.
- Configure – Authentication, command-line flags, transports, TLS, and tools.
- Introduction – MCP concepts and RBAC overview.
- Reference – MCP tools reference (tools, permissions, scopes, and RBAC guidance).
- Guides – Query metrics and logs, dashboards, alerts, deeplinks, incidents.
- Troubleshooting – Common issues including Grafana version compatibility.
- Developer – Go SDK, observability, build and test.
License
The project is licensed under the Apache License, Version 2.0.
Was this page helpful?
Related resources from Grafana Labs


