Skip to main content
Glama
grafana-mcp

grafana-mcp

by Jason-Shi-1

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 build

The compiled server is now at build/index.js.

Configuration

The server reads three required environment variables and one optional one:

Variable

Description

GRAFANA_URL

Base URL of your Grafana instance, e.g. http://localhost:3000

GRAFANA_USER

Grafana username

GRAFANA_PASSWORD

Grafana password

SOCKS_PROXY

Optional: SOCKS5 proxy URL, e.g. socks5://localhost:1080

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.

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_PROXY is 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_PROXY is 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

Search dashboards by title, tag, or folder

get-dashboard

Fetch a dashboard by UID

save-dashboard

Create or update a dashboard

delete-dashboard

Delete a dashboard by UID

list-datasources

List all configured datasources

get-datasource

Get a datasource by name or ID

query-datasource

Run instant/range queries via Grafana's /ds/query

list-influx-databases

List InfluxDB databases through a Grafana datasource

list-influx-measurements

List measurements in an InfluxDB database

list-influx-field-keys

List numeric field keys for a measurement

list-influx-tag-keys

List indexed tag keys for a measurement

list-influx-tag-values

Enumerate values for a specific tag key

list-influx-retention-policies

List retention policies for an InfluxDB database

list-alert-rules

List Grafana-managed alerting rules

get-alert-rule

Get an alert rule by UID

create-alert-rule

Create a new alert rule via the provisioning API

update-alert-rule

Update an existing alert rule

delete-alert-rule

Delete an alert rule by UID

get-notification-policy

Get the alert notification policy tree

list-contact-points

List all notification contact points

list-folders

List all dashboard folders

health-check

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 f

Then update command in your MCP config:

"command": "/root/.bobide-server/bin/<hash>/node"

Available Tools

22 tools
create-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

    B3.4/5.0

    Scored across 22 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness3/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      A Model Context Protocol (MCP) server for Grafana. This provides access to your Grafana instance and the surrounding ecosystem.
      3,668
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      A server that enables AI assistants to access and query Grafana dashboards, metrics, logs, and configurations through an MCP protocol interface.
      10
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      8
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Grafana that provides tools to interact with dashboards, data sources, alerts, and more.
      1
      -