Search for dashboards in Grafana
Get a specific dashboard by UID
List alert rules in Grafana
Get a specific alert rule by UID
List alert instances (firing alerts)
List contact points for alerting
Get a specific contact point by UID
List teams in Grafana
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.
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.
You can install the Grafana MCP server in several ways:
docker run -p 8080:8080 -e GRAFANA_URL=https://your-grafana-instance.com -e GRAFANA_API_KEY=your-api-key grafana/mcp-grafana
git clone https://github.com/grafana/mcp-grafana.git
cd mcp-grafana
make build
./dist/mcp-grafana --grafana-url=https://your-grafana-instance.com --grafana-api-key=your-api-key
The Grafana MCP server requires the following environment variables or command-line flags:
GRAFANA_URL
or --grafana-url
: The URL of your Grafana instanceGRAFANA_API_KEY
or --grafana-api-key
: A valid Grafana API key with appropriate permissionsAdditional 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)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.
Once configured, you can interact with your Grafana instance through natural language. Here are some examples:
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.