Connections & Capabilities
Connects To
Capabilities
Quickstart
Config
{
"mcpServers": {
"grafana": {
"command": "mcp-grafana",
"args": [],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_USERNAME": "<your username>",
"GRAFANA_PASSWORD": "<your password>",
"GRAFANA_ORG_ID": "2"
}
}
}
}Exposed MCP Tools (7)
search_dashboardsFind dashboards based on title or other metadata.
Read-only operation, no side effects.
get_dashboard_by_uidRetrieve full dashboard details using its unique identifier.
Read-only operation, but large dashboards can consume significant context window space.
update_or_create_a_dashboardModify existing dashboards or create new ones.
Requires full dashboard JSON, potentially leading to unintended modifications or corruption.
query_prometheusExecute PromQL queries against Prometheus datasources.
Read-only operation, but poorly crafted queries can impact performance.
list_usersView all users in an organization in Grafana.
Read-only operation, but exposes user information.
delete_alert_rulesRemove alert rules by UID.
Destructive operation that can disrupt monitoring and alerting.
get_panel_imageRender a Grafana dashboard panel or full dashboard as a PNG image.
Requires Grafana Image Renderer, potential for resource exhaustion if abused.
Safety Assessment
The Grafana MCP server's safety depends heavily on configuration. When used with strict RBAC and only necessary tools enabled, it can be relatively safe. However, enabling admin tools or granting broad permissions significantly increases the risk of unintended or malicious actions.
- Granular RBAC permissions allow for least-privilege access.
- Tools can be selectively enabled or disabled to reduce the attack surface.
- Several tools offer read-only access, minimizing potential damage.
- Context window management strategies help limit exposure of sensitive data.
- Many tools allow write operations, potentially leading to unintended modifications.
- Admin tools, if enabled, grant extensive control over the Grafana instance.
- Improperly configured RBAC can lead to privilege escalation.
- Some tools require access to sensitive data, such as dashboard JSON and datasource credentials.
