Server facts
Grafana MCP Server
Project
- Author
- grafana
- Repository
- github.com/grafana/mcp-grafana
- License
- Apache-2.0
- Category
- Data & Analytics
Tech
- Runtime / language
- goGo
- Transports
- stdio
- Remote available
- No
- Authentication
- Not specified
Activity
- GitHub stars
- 3,568
- Last commit
- Data as of
Tags
- Dashboards
- Grafana
- Incident Response
- Metrics
- Observability
Overview
Grafana MCP Server gives assistants access to a Grafana instance and related observability services. Its scope spans dashboard inspection, datasource information, metric and log queries, traces, alerts, incidents, and on-call workflows. This makes it relevant to engineers investigating operational problems as well as teams maintaining dashboards and alert configuration. The README documents both local Grafana and Grafana Cloud connection settings.
Dashboard access includes full retrieval, compact summaries, selected properties, and panel-query extraction. Those alternatives matter because a complete dashboard can occupy substantial assistant context. Targeted patching is also described as a way to avoid sending full dashboard payloads for small changes. Query capabilities cover Prometheus and Loki, with additional datasource families available through explicitly enabled tool groups. The supplied tool data also includes annotation, snapshot, plugin, and general Grafana API operations, extending the server beyond read-only dashboard exploration.
The quick-start configuration launches through uvx and supplies a Grafana URL plus a service-account token. Full feature coverage needs at least Grafana version 9.0. Several groups, including administrative operations and specific query integrations, are disabled by default and must be enabled deliberately. Some capabilities have their own service prerequisites: image rendering needs the Grafana Image Renderer, and datasource-specific queries depend on the corresponding Grafana configuration. Operational write tools can change alerts or create incidents, so selecting the needed tool groups is part of deployment planning.
Install & configure
Requirements
- uv
- Grafana 9.0 or later for full functionality
- An MCP client
- A configured Grafana connection and service-account token
uvx mcp-grafanaThe README's quick start uses uvx. Set the instance URL for local Grafana or Grafana Cloud. Several optional query groups and administrative tools are disabled by default.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-grafana": {
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "<URL of your Grafana instance>",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
}
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-grafana": {
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "<URL of your Grafana instance>",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
}
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"mcp-grafana": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "<URL of your Grafana instance>",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
}
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-grafana": {
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "<URL of your Grafana instance>",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
}
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-grafana": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "<URL of your Grafana instance>",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
}
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository tool metadata. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| add_activity_to_incident | Append an investigation note and optional URL context to an incident. |
| alerting_manage_routing | Manage notification policies, destinations, and active or muted time intervals. |
| alerting_routing_write | Create Grafana-managed alert contact points with integration settings. |
| alerting_rules_read | Find and inspect alert rules using configuration and state filters. |
| alerting_rules_write | Create, replace, or remove Grafana alert rules. |
| alerting_silences_read | List or retrieve alert notification silences. |
| alerting_silences_write | Create, update, or remove temporary notification suppression rules. |
| analyze_loki_labels | Assess Loki labels and optionally investigate query performance using live cardinality. |
| check_datasources_health | Test datasource health with optional type or UID filtering. |
| create_annotation | Add dashboard or panel annotations, including Graphite-format entries. |
| create_datasource | Review a datasource plugin schema, then create a datasource from approved field values. |
| create_folder | Add a Grafana folder with a title and optional identifier. |
| create_incident | Open an incident with severity and contextual fields; creation may notify responders. |
| create_snapshot | Generate a dashboard snapshot with optional expiry settings. |
| delete_annotation | Permanently remove an annotation by identifier. |
| delete_snapshot | Remove a snapshot using its key. |
| diff_tempo_traces | Compare complete traces and return a summary with optional span-level differences. |
| generate_deeplink | Build links to dashboards, panels, or preconfigured Explore queries. |
| get_alert_group | Inspect an OnCall alert group and the latest available alert payload. |
| get_annotation_tags | Retrieve annotation tags with optional name matching. |
| get_annotations | Find annotations by dashboard, time window, or tags. |
| get_assertions | Retrieve an entity's assertion summary for a time range. |
| get_current_oncall_users | Identify the people currently covering an OnCall schedule. |
| get_dashboard_by_uid | Fetch a complete dashboard or a specified saved version. |
| get_dashboard_panel_queries | Extract dashboard panel queries with optional panel and variable selection. |
| get_dashboard_property | Select dashboard sections through JSONPath instead of fetching all content. |
| get_dashboard_summary | Read compact dashboard metadata, panel counts, types, and variables. |
| get_datasource | Inspect a datasource by name or UID, including connection and secure-field status. |
| get_doc | Fetch Grafana documentation as an outline or a selected section. |
| get_incident | Retrieve one incident's status, severity, labels, and metadata. |
| get_oncall_shift | Read the details of a specific scheduled OnCall shift. |
| get_panel_image | Render a panel, dashboard, or Explore view as a PNG using Grafana Image Renderer. |
| get_plugin | Check a Grafana plugin's installation and version details. |
| get_snapshot | Retrieve a snapshot's metadata and dashboard payload by key. |
| get_tempo_trace | Fetch a Tempo trace using its identifier. |
| get_tempo_traceql_docs | Read TraceQL syntax guidance and examples before composing trace queries. |
| grafana_api_request | Call Grafana API endpoints with authentication and optional response filtering. |
| install_plugin | Look up a plugin's latest version or install an explicitly supplied version. |
| list_alert_groups | Find OnCall alert groups by state, integration, team, labels, or time range. |
| list_dashboard_versions | List saved dashboard versions and their authors, timestamps, and messages. |
Names, permissions, and defaults can change. Check the current upstream documentation before granting access.
Use cases
- Inspect a dashboard without loading its complete JSON.
- Investigate service behavior using Grafana metrics, logs, and traces.
- Manage alert rules and temporary notification silences.
- Add investigation notes to incidents and inspect on-call coverage.
Strengths
- Covers multiple observability workflows through one Grafana connection.
- Offers context-saving dashboard summaries and property selection.
- Provides configurable tool groups rather than enabling every integration by default.
Limitations
- Full functionality requires Grafana 9.0 or newer.
- Some query and administrative groups need explicit enabling.
- Rendering and datasource features have additional service prerequisites.
Frequently asked questions
Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.