Grafana Mcp Server avatar
Grafana Mcp Server

Pricing

Pay per usage

Go to Apify Store
Grafana Mcp Server

Grafana Mcp Server

Connect AI agents to Grafana via MCP. Search dashboards, query Prometheus/Loki, manage alerts, create dashboards, and monitor data sources. 25+ tools for complete Grafana control through natural language.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Quadruped

Quadruped

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

14 days ago

Last modified

Share

Connect AI agents to your Grafana instance via the Model Context Protocol (MCP). Monitor dashboards, query data sources, manage alerts, and more through a standardized interface.

Features

  • Dashboard Management: Search, view, create, and delete dashboards
  • Data Source Operations: List, test, create, and query data sources (Prometheus, Loki, InfluxDB, PostgreSQL, MySQL, Elasticsearch)
  • Alert Monitoring: View alert rules, check alert states, pause/unpause alerts
  • Folder Organization: Create and manage folders for dashboard organization
  • Annotations: Create time-based annotations for events and deployments
  • User & Org Info: Access user and organization details

Input Configuration

FieldTypeRequiredDescription
grafanaUrlstringYesYour Grafana instance URL (e.g., https://mycompany.grafana.net)
grafanaApiTokenstringYesService account token with Editor or Admin role
grafanaOrgIdintegerNoOrganization ID for multi-org setups

Getting a Grafana API Token

  1. Go to Administration > Service Accounts
  2. Click Add service account
  3. Give it a name and select Editor or Admin role
  4. Click Add token and copy the generated token

Available Tools

Health & Status

  • grafana_health - Check instance health, version, and database status

Dashboards

  • grafana_search_dashboards - Search dashboards by query, tag, or folder
  • grafana_get_dashboard - Get full dashboard configuration by UID
  • grafana_create_dashboard - Create a new dashboard with panels
  • grafana_delete_dashboard - Delete a dashboard

Data Sources

  • grafana_list_datasources - List all configured data sources
  • grafana_get_datasource - Get data source details by UID or name
  • grafana_test_datasource - Test data source connectivity
  • grafana_create_datasource - Add a new data source
  • grafana_delete_datasource - Remove a data source
  • grafana_query_datasource - Execute queries (PromQL, LogQL, SQL)

Alerts

  • grafana_list_alert_rules - List all alert rules
  • grafana_get_alert_rule - Get alert rule details
  • grafana_list_alert_instances - View current alert states
  • grafana_pause_alert - Pause or unpause an alert

Folders

  • grafana_list_folders - List all folders
  • grafana_get_folder - Get folder details
  • grafana_create_folder - Create a new folder
  • grafana_delete_folder - Delete a folder

Annotations

  • grafana_list_annotations - List annotations with filters
  • grafana_create_annotation - Create an annotation
  • grafana_delete_annotation - Delete an annotation

Users & Organization

  • grafana_get_current_user - Get authenticated user info
  • grafana_list_org_users - List organization members
  • grafana_get_current_org - Get organization details

Resources

The server exposes these MCP resources:

  • grafana://dashboards - All dashboards
  • grafana://datasources - All data sources
  • grafana://folders - All folders
  • grafana://alerts - Current alert states
  • grafana://health - Instance health

Prompts

Pre-built prompts for common tasks:

  • dashboard-overview - Get an overview of all dashboards
  • alert-status - Check current alert status
  • datasource-health - Verify data source connectivity
  • create-dashboard-template - Template for new monitoring dashboards

Example Usage

Query Prometheus Metrics

{
"tool": "grafana_query_datasource",
"arguments": {
"datasourceUid": "prometheus-uid",
"query": "rate(http_requests_total[5m])",
"from": 1703980800000,
"to": 1704067200000
}
}

Create a Dashboard

{
"tool": "grafana_create_dashboard",
"arguments": {
"title": "Service Monitoring",
"tags": ["production", "api"],
"panels": [
{
"title": "Request Rate",
"type": "timeseries",
"datasource": "Prometheus",
"targets": [{"expr": "rate(http_requests_total[5m])"}]
}
]
}
}

Check Alert Status

{
"tool": "grafana_list_alert_instances",
"arguments": {}
}

Output

The Actor logs tool calls to its dataset with:

  • timestamp - When the call was made
  • tool - Tool name
  • success - Whether it succeeded
  • duration - Execution time in ms
  • error - Error message if failed

Pricing

Pay-per-event pricing:

  • Tool Call: $0.001 per call
  • Query Execution: $0.005 per query
  • Dashboard Creation: $0.01 per dashboard

Requirements

  • Grafana instance (Cloud or self-hosted)
  • Service account token with appropriate permissions
  • Network access to your Grafana instance

Support

For issues or feature requests, please open an issue on the repository.