Back to MCP Catalog

Grafana MCP Server

MonitoringGo
Interact with Grafana dashboards, alerts, and teams through natural language
Available Tools

searchDashboards

Search for dashboards in Grafana

querylimit

getDashboard

Get a specific dashboard by UID

uid

listAlertRules

List alert rules in Grafana

dashboardUIDlimit

getAlertRule

Get a specific alert rule by UID

uid

listAlertInstances

List alert instances (firing alerts)

statelimit

listContactPoints

List contact points for alerting

limit

getContactPoint

Get a specific contact point by UID

uid

listTeams

List teams in Grafana

querylimit

The Grafana MCP server provides a natural language interface to your Grafana instance, allowing you to manage dashboards, alerts, and administrative functions without needing to navigate the Grafana UI. It connects to your Grafana instance via API and enables you to search for dashboards, manage alert rules, configure contact points, and administer teams through simple conversational commands.

Grafana MCP Server

The Grafana MCP server allows you to interact with your Grafana instance through natural language, making it easier to manage dashboards, alerts, and administrative functions.

Prerequisites

  • A running Grafana instance
  • Grafana API key with appropriate permissions
  • Go 1.20 or later (if building from source)

Installation

You can install the Grafana MCP server in several ways:

Using Docker

docker run -p 8080:8080 -e GRAFANA_URL=https://your-grafana-instance.com -e GRAFANA_API_KEY=your-api-key grafana/mcp-grafana

Building from source

  1. Clone the repository:
git clone https://github.com/grafana/mcp-grafana.git
cd mcp-grafana
  1. Build the binary:
make build
  1. Run the server:
./dist/mcp-grafana --grafana-url=https://your-grafana-instance.com --grafana-api-key=your-api-key

Configuration

The Grafana MCP server requires the following environment variables or command-line flags:

  • GRAFANA_URL or --grafana-url: The URL of your Grafana instance
  • GRAFANA_API_KEY or --grafana-api-key: A valid Grafana API key with appropriate permissions

Additional optional configuration:

  • PORT or --port: The port to run the MCP server on (default: 8080)
  • LOG_LEVEL or --log-level: The logging level (default: info)

Adding to your AI assistant

To add the Grafana MCP server to your AI assistant, add the following configuration to your assistant's settings:

"mcpServers": {
  "grafana": {
    "url": "http://localhost:8080"
  }
}

If you're running the server with Docker or on a different host, replace localhost with the appropriate hostname or IP address.

Usage

Once configured, you can interact with your Grafana instance through natural language. Here are some examples:

  • "Show me all dashboards"
  • "Find dashboards related to CPU usage"
  • "List all alert rules"
  • "Show me firing alerts"
  • "Create a new contact point for Slack"
  • "List all teams in my Grafana instance"

The MCP server provides tools for managing dashboards, alerts, contact points, and administrative functions, making it easier to interact with your Grafana instance without navigating the UI.

Related MCPs

Axiom Query
MonitoringGo

Query your Axiom data using APL (Axiom Processing Language)

Prometheus Metrics
MonitoringPython

Query and analyze Prometheus metrics through standardized interfaces

Sentry Issue Analyzer
MonitoringPython

Retrieve and analyze issues from Sentry.io

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.