Integrate Grafana MCP server into your Slack workspace for instant access to your AI agent.
Tools that your AI agent can use through this MCP server to interact with Grafana
Search for dashboards by title, tag, or folder. Returns dashboard UIDs, titles, URLs, tags, and folder info. Use the UID with Get Dashboard to retrieve the full dashboard model. Use List Folders to discover folder UIDs for filtering.
Create or update a Grafana dashboard. This is an upsert operation — if the dashboard UID exists, it updates; otherwise it creates. Use Get Dashboard to retrieve an existing dashboard model before modifying it. Use List Folders to find the target folder UID. Pass overwrite: true to force-save over version conflicts. See the documentation
Execute a query against any configured data source. Use List Data Sources first to discover available data sources and their UIDs. The query language depends on the data source type:
Prometheus (PromQL): rate(http_requests_total[5m]), sum by (status_code) (rate(http_requests_total[5m]))
Loki (LogQL): {app="myapp"} |= "error", rate({app="myapp"}[5m])
Note: This tool uses the expr query field, which works with Prometheus and Loki. For SQL-based data sources (MySQL, Postgres) or InfluxDB, the query field name differs and may not work with this tool.
Time range defaults to last 1 hour. Use from and to for custom ranges (supports relative: now-24h, now-7d, or epoch milliseconds).
List all dashboard folders. Folders organize dashboards into logical groups. Use folder UIDs with Search Dashboards to filter by folder, or with Save Dashboard to place a dashboard in a specific folder.
List all configured data sources (Prometheus, Loki, InfluxDB, MySQL, etc.), their types, and UIDs. Use the data source UID with Query Data Source to execute queries. The type field indicates what query language to use (e.g., prometheus → PromQL, loki → LogQL, mysql → SQL).
List all alert rules with their current state (firing, normal, pending, inactive). Returns rule definitions including conditions, labels, and annotations. Use this to answer questions like 'what alerts are firing?' or 'what alerts exist for service X?'
Get the full dashboard model by UID, including all panels, their queries, variables, and configuration. Use Search Dashboards first to find the dashboard UID. The returned model can be modified and saved back with Save Dashboard.
Get the current authenticated Grafana user's identity, including user ID, name, email, organization, and role. Use this to understand the user's permissions and organizational context. The user ID and org context may be needed when creating dashboards or filtering resources.
Permanently delete a Grafana dashboard by UID. This cannot be undone. Use Search Dashboards to find the dashboard UID.
Create an annotation on a dashboard or globally. Annotations mark events like deployments, incidents, or configuration changes on dashboard timelines. Use Search Dashboards to find the dashboard UID. Omit dashboardUid for a global annotation visible on all dashboards. Use time and timeEnd for range annotations (e.g., deployment window).