mcp-grafana
v0.4.1Search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_health Grafana health
Check the Grafana instance is reachable and return its version and database status.
search Search dashboards & folders
Search dashboards and folders by name/tag. Use this first to find a dashboard's UID before get_dashboard. Returns title, uid, type (dash-db | dash-folder), folder and tags.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
query | string | Free-text match on title. Omit to list everything. |
tag | string | Restrict to a dashboard tag. |
type | string | Restrict to dashboards or folders. |
list_dashboards List dashboards
List dashboards (optionally filtered by tag). Shorthand for search with type=dash-db.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
tag | string | Restrict to a tag. |
get_dashboard Get dashboard
Return the full dashboard JSON model (panels, targets, templating, time) plus meta (folder, version, url) for a dashboard UID. This is the model you edit and pass back to create_or_update_dashboard.
| Parameter | Type | Description |
|---|---|---|
uid * | string | Dashboard UID (from search). |
list_folders List folders
List dashboard folders with their UIDs and titles.
get_folder Get folder
Return a folder's details by UID.
| Parameter | Type | Description |
|---|---|---|
uid * | string |
list_datasources List datasources
List configured datasources (uid, name, type, url). Secrets (secureJsonData, passwords, tokens) are never returned. Use the uid with query_datasource.
get_datasource Get datasource
Return a single datasource by UID (secrets redacted).
| Parameter | Type | Description |
|---|---|---|
uid * | string |
query_datasource Query a datasource
Run a query against a datasource through Grafana's unified query API and return the result frames. For Prometheus/Loki set `expr` (PromQL / LogQL); for SQL datasources set `rawSql`. Reading data only — this never mutates anything. Use a bounded time range and a small maxDataPoints to keep results manageable.
| Parameter | Type | Description |
|---|---|---|
datasourceUid * | string | Datasource UID (from list_datasources). |
expr | string | PromQL or LogQL expression, e.g. 'up' or 'rate(http_requests_total[5m])'. |
from | string | Range start, e.g. 'now-1h' or an epoch ms string. Default now-1h. |
maxDataPoints | integer | Cap on returned points. Default 100. |
rawSql | string | SQL for SQL datasources (a single read-only SELECT). |
to | string | Range end, e.g. 'now'. Default now. |
list_alert_rules List alert rules
List Grafana-managed alert rules (via the provisioning API): title, condition, folder, state.
list_annotations List annotations
List annotations (events overlaid on graphs), optionally within a time range or by tag.
| Parameter | Type | Description |
|---|---|---|
from | integer | Range start, epoch ms. |
limit | integer | |
tags | array | Restrict to annotations with these tags. |
to | integer | Range end, epoch ms. |