grafana-mcp
This server provides comprehensive access to manage and query a Grafana instance through the MCP protocol, covering dashboards, datasources, alerting, and more.
Dashboard Management: Search by title/tag/folder, get by UID, create/update with full JSON model support, delete, and list all folders.
Datasource Operations: List all configured datasources, get a specific datasource by name or ID, and run instant or range queries against any datasource.
InfluxDB Exploration: List databases, measurements, field keys, tag keys, tag values, and retention policies for InfluxDB datasources.
Alerting Management: List, get, create, update, and delete Grafana-managed alert rules; retrieve the notification policy tree and list contact points.
Health Check: Verify the Grafana instance status and version.
Provides tools to interact with a Grafana instance, including searching, fetching, creating, updating, and deleting dashboards; managing datasources; running queries; managing alert rules, notification policies, and contact points; listing folders; and checking health.
Provides tools to query InfluxDB databases through a Grafana datasource, including listing databases, measurements, field keys, tag keys, tag values, and retention policies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@grafana-mcp search for dashboards related to CPU usage"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Grafana-MCP
An MCP (Model Context Protocol) server that gives Bob direct access to your Grafana instance — dashboards, datasources, queries, alerting rules, and more.
Prerequisites
Node.js v18 or later
A running Grafana instance
A Grafana user with sufficient permissions (Admin recommended for full access)
Related MCP server: Grafana MCP Server
Installation
Install dependencies and build
git clone <url>
cd grafana-mcp
npm install
npm run buildThe compiled server is now at build/index.js.
Configuration
The server reads three required environment variables and one optional one:
Variable | Description |
| Base URL of your Grafana instance, e.g. |
| Grafana username |
| Grafana password |
| Optional: SOCKS5 proxy URL, e.g. |
Registering with Bob
There are two places you can register the server. Most users will prefer the global config so the server is available in every Bob workspace without any per-project setup.
Option A — Global config (recommended)
Edit ~/.bob/settings/mcp.json (Windows: %USERPROFILE%\.bob\settings\mcp.json) and add the server entry. Replace the path with the absolute path to the built entry point on your machine:
{
"mcpServers": {
"grafana-mcp": {
"command": "node",
"args": ["C:\\absolute\\path\\to\\grafana-mcp\\build\\index.js"],
"env": {
"GRAFANA_URL": "http://your-grafana-host:3000",
"GRAFANA_USER": "admin",
"GRAFANA_PASSWORD": "your-password",
"SOCKS_PROXY": "socks5://<proxy-host>:<port>"
}
}
}
}
SOCKS_PROXYis optional — omit it if you don't need a proxy.
Option B — Project/workspace config
Add the same entry to .bob/mcp.json at the root of a specific workspace. This scopes the server to that project only.
{
"mcpServers": {
"grafana-mcp": {
"command": "node",
"args": ["/absolute/path/to/grafana-mcp/build/index.js"],
"env": {
"GRAFANA_URL": "http://your-grafana-host:3000",
"GRAFANA_USER": "admin",
"GRAFANA_PASSWORD": "your-password",
"SOCKS_PROXY": "socks5://<proxy-host>:<port>"
}
}
}
}
SOCKS_PROXYis optional — omit it if you don't need a proxy.
To point at a different Grafana instance, change GRAFANA_URL (and credentials as needed) in whichever config file you used.
Available Tools
Tool | Description |
| Search dashboards by title, tag, or folder |
| Fetch a dashboard by UID |
| Create or update a dashboard |
| Delete a dashboard by UID |
| List all configured datasources |
| Get a datasource by name or ID |
| Run instant/range queries via Grafana's |
| List InfluxDB databases through a Grafana datasource |
| List measurements in an InfluxDB database |
| List numeric field keys for a measurement |
| List indexed tag keys for a measurement |
| Enumerate values for a specific tag key |
| List retention policies for an InfluxDB database |
| List Grafana-managed alerting rules |
| Get an alert rule by UID |
| Create a new alert rule via the provisioning API |
| Update an existing alert rule |
| Delete an alert rule by UID |
| Get the alert notification policy tree |
| List all notification contact points |
| List all dashboard folders |
| Check the health and version of the Grafana instance |
Troubleshooting
If MCP server shows "disconnected" in Bob IDE
The system node binary requires a version of c-ares that might not be installed on the machine. Try using the node binary bundled with Bob IDE instead — it has everything it needs built in.
Find it:
find ~/.bobide-server/bin -name "node" -type fThen update command in your MCP config:
"command": "/root/.bobide-server/bin/<hash>/node"Available Tools
22 toolscreate-alert-ruleC
Create a new Grafana-managed alert rule via the provisioning API.
Inputs: rule (required).
create-or-update-dashboardB
Create a new dashboard or update an existing one. Pass the full dashboard JSON model.
Inputs: dashboard (required), message, folderId, overwrite.
delete-alert-ruleB
Delete a Grafana-managed alert rule by UID.
Inputs: uid (required).
delete-dashboardB
Delete a dashboard by its UID.
Inputs: uid (required).
get-alert-ruleB
Get a Grafana-managed alert rule by UID.
Inputs: uid (required).
get-dashboardA
Get a dashboard by its UID. Returns the full dashboard JSON model.
Inputs: uid (required).
get-datasourceB
Get a datasource by its name or numeric ID.
Inputs: identifier (required).
get-healthA
Check the health and version of the Grafana instance.
Inputs: no named parameters.
influx-show-databasesA
List all InfluxDB databases accessible through a Grafana InfluxDB datasource.
Inputs: datasourceId (required).
influx-show-field-keysA
List all field keys (numeric columns) for a measurement in InfluxDB.
Inputs: database (required), measurement (required), datasourceId (required).
influx-show-measurementsA
List all measurements (tables) in an InfluxDB database.
Inputs: database (required), datasourceId (required).
influx-show-retention-policiesA
List retention policies for an InfluxDB database, including duration and replication.
Inputs: database (required), datasourceId (required).
influx-show-tag-keysB
List all tag keys (indexed dimensions) for a measurement in InfluxDB.
Inputs: database (required), measurement (required), datasourceId (required).
influx-show-tag-valuesA
List all values for a specific tag key in an InfluxDB measurement. Useful for discovering hostnames, environments, regions, etc.
Inputs: tagKey (required), database (required), measurement (required), datasourceId (required).
list-alert-rulesC
List all Grafana Alerting rules (Grafana-managed alerts).
Inputs: limit, state, panelId, dashboardId.
list-contact-pointsA
List all Grafana Alerting contact points (notification channels).
Inputs: no named parameters.
list-datasourcesA
List all configured datasources in Grafana.
Inputs: no named parameters.
list-foldersC
List all dashboard folders in Grafana.
Inputs: limit.
list-notification-policiesA
Get the Grafana Alerting notification policy tree.
Inputs: no named parameters.
query-datasourceB
Run an instant or range query against a datasource using Grafana's ds/query endpoint.
Inputs: queries (required), datasourceUid (required), to, from.
search-dashboardsA
Search for Grafana dashboards by query string, folder, or tag.
Inputs: tag, limit, query, folderIds.
update-alert-ruleB
Update an existing Grafana-managed alert rule by UID.
Inputs: uid (required), rule (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each tool targets a distinct resource and action. Alert, dashboard, datasource, folder, contact point, notification policy, health, query, and InfluxDB exploration tools all have clear, non-overlapping purposes. Even within alerts, single vs list tools are distinct.
Most tools follow a verb-noun pattern with hyphens (e.g., create-alert-rule, list-dashboards). Minor inconsistencies include 'create-or-update-dashboard' using a compound verb and 'get-datasource' singular vs 'list-datasources' plural, but overall pattern is predictable.
22 tools is slightly above the typical sweet spot but still reasonable for a comprehensive Grafana server. The scope covers alerts, dashboards, datasources, folders, contact points, notification policies, health, query, and InfluxDB exploration, justifying the count.
Core CRUD for dashboards and alerts is present, but missing create/update/delete for folders, contact points, and notification policies limits workflow completeness. InfluxDB tools are read-only. Basic querying and health checks are included.
Maintenance
Related MCP Connectors
An MCP server giving access to Grafana dashboards, data and more.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol (MCP) server for Grafana. This provides access to your Grafana instance and the surrounding ecosystem.3,668Apache 2.0
- AlicenseAqualityDmaintenanceA server that enables AI assistants to access and query Grafana dashboards, metrics, logs, and configurations through an MCP protocol interface.106MIT
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible agents to interact with Grafana instances for searching, creating, and updating dashboards, exploring logs via Loki, querying datasources, managing alerts, incidents, and on-call shifts, and accessing observability data.8Apache 2.0
- FlicenseNot gradedqualityDmaintenanceMCP server for Grafana that provides tools to interact with dashboards, data sources, alerts, and more.1-