Server profile

Grafana MCP Server

Connect MCP assistants to Grafana dashboards, datasources, alerts, and incident workflows. It serves observability teams that want to investigate metrics, logs, and traces and manage Grafana resources from an assistant.

Server facts

Grafana MCP Server

Project

Author
grafana
License
Apache-2.0

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
Documented launch / install command
uvx mcp-grafana

The 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.

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.

Claude Desktop configuration
{
  "mcpServers": {
    "mcp-grafana": {
      "command": "uvx",
      "args": [
        "mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "<URL of your Grafana instance>",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
      }
    }
  }
}

Read the Claude Desktop setup guide

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.

Cursor configuration
{
  "mcpServers": {
    "mcp-grafana": {
      "command": "uvx",
      "args": [
        "mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "<URL of your Grafana instance>",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
      }
    }
  }
}

Read the Cursor setup guide

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.

VS Code configuration
{
  "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>"
      }
    }
  }
}

Read the VS Code setup guide

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.

Windsurf configuration
{
  "mcpServers": {
    "mcp-grafana": {
      "command": "uvx",
      "args": [
        "mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "<URL of your Grafana instance>",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
      }
    }
  }
}

Read the Windsurf setup guide

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.

Claude Code configuration
{
  "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>"
      }
    }
  }
}

Read the Claude Code setup guide

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.

ToolWhat it does
add_activity_to_incidentAppend an investigation note and optional URL context to an incident.
alerting_manage_routingManage notification policies, destinations, and active or muted time intervals.
alerting_routing_writeCreate Grafana-managed alert contact points with integration settings.
alerting_rules_readFind and inspect alert rules using configuration and state filters.
alerting_rules_writeCreate, replace, or remove Grafana alert rules.
alerting_silences_readList or retrieve alert notification silences.
alerting_silences_writeCreate, update, or remove temporary notification suppression rules.
analyze_loki_labelsAssess Loki labels and optionally investigate query performance using live cardinality.
check_datasources_healthTest datasource health with optional type or UID filtering.
create_annotationAdd dashboard or panel annotations, including Graphite-format entries.
create_datasourceReview a datasource plugin schema, then create a datasource from approved field values.
create_folderAdd a Grafana folder with a title and optional identifier.
create_incidentOpen an incident with severity and contextual fields; creation may notify responders.
create_snapshotGenerate a dashboard snapshot with optional expiry settings.
delete_annotationPermanently remove an annotation by identifier.
delete_snapshotRemove a snapshot using its key.
diff_tempo_tracesCompare complete traces and return a summary with optional span-level differences.
Build links to dashboards, panels, or preconfigured Explore queries.
get_alert_groupInspect an OnCall alert group and the latest available alert payload.
get_annotation_tagsRetrieve annotation tags with optional name matching.
get_annotationsFind annotations by dashboard, time window, or tags.
get_assertionsRetrieve an entity's assertion summary for a time range.
get_current_oncall_usersIdentify the people currently covering an OnCall schedule.
get_dashboard_by_uidFetch a complete dashboard or a specified saved version.
get_dashboard_panel_queriesExtract dashboard panel queries with optional panel and variable selection.
get_dashboard_propertySelect dashboard sections through JSONPath instead of fetching all content.
get_dashboard_summaryRead compact dashboard metadata, panel counts, types, and variables.
get_datasourceInspect a datasource by name or UID, including connection and secure-field status.
get_docFetch Grafana documentation as an outline or a selected section.
get_incidentRetrieve one incident's status, severity, labels, and metadata.
get_oncall_shiftRead the details of a specific scheduled OnCall shift.
get_panel_imageRender a panel, dashboard, or Explore view as a PNG using Grafana Image Renderer.
get_pluginCheck a Grafana plugin's installation and version details.
get_snapshotRetrieve a snapshot's metadata and dashboard payload by key.
get_tempo_traceFetch a Tempo trace using its identifier.
get_tempo_traceql_docsRead TraceQL syntax guidance and examples before composing trace queries.
grafana_api_requestCall Grafana API endpoints with authentication and optional response filtering.
install_pluginLook up a plugin's latest version or install an explicitly supplied version.
list_alert_groupsFind OnCall alert groups by state, integration, team, labels, or time range.
list_dashboard_versionsList 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

Yes. The README instructs users to supply their Grafana Cloud instance URL.

Use the compact summary or JSONPath property tool rather than requesting the entire dashboard.

No. The README marks several datasource groups as disabled until explicitly enabled.

The supplied tool description requires the Grafana Image Renderer service.

Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.

Related MCP servers

Excel MCP Server

Data & Analytics

Excel MCP Server lets AI agents create and modify workbooks without an installed copy of Microsoft Excel. It covers worksheet management, formulas, formatting, charts, and pivot tables through local or remote MCP connections.

MCP Server Chart

Data & Analytics

Generate charts, diagrams, maps, and tabular views from an AI assistant using AntV. The TypeScript MCP server supports desktop clients, network transports, and an optional private rendering service.

MCP Google Sheets

Data & Analytics

MCP Google Sheets lets AI clients work with spreadsheets through Google Sheets and Drive APIs. It supports reading, writing, tab management, sharing, and batch operations, with tool filtering to reduce context usage.

Jupyter MCP Server

Data & Analytics

Jupyter MCP Server lets AI assistants inspect, edit, and execute notebooks with live output feedback. It supports multiple notebooks, multimodal results, JupyterLab commands, and optional execution tracing.

Google Search Console MCP Server

Data & Analytics

This server connects MCP assistants to Google Search Console data and management actions. SEOs can investigate search performance, inspect indexing, compare periods, and work with sitemaps.

dbt MCP Server

Data & Analytics

dbt MCP Server gives agents project context and operations across dbt Core, Fusion, and Platform. It covers SQL, metrics, lineage, model health, CLI commands, job management, and documentation retrieval.