npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tocharianou/grafana-mcp

v2.0.0

Published

Grafana MCP Server with comprehensive API access for dashboards, datasources, alerting, and observability

Readme

Grafana MCP Server

A comprehensive Model Context Protocol (MCP) server for Grafana, providing full API access for dashboards, datasources, alerting, annotations, and Prometheus metrics.

Features

  • Dashboards – get, create, update, delete dashboards; version history
  • Folders – list, create, update, delete folders with nested folder support
  • Datasources – list, get, create, update, delete datasources
  • Search – search dashboards and folders by query, tags, type
  • Annotations – list, create, update, delete annotation events
  • Alerting – list/get/create/update/delete alert rules; contact points; notification policies; mute timings; alert instances
  • Prometheus – instant and range PromQL queries; metric name and label discovery
  • Admin – health check, stats, organizations, users, teams, playlists

Quick Start

# Install and run via npx
GRAFANA_URL=http://localhost:3000 GRAFANA_TOKEN=your-token npx @tocharianou/grafana-mcp

Configuration

| Environment Variable | Required | Description | |---------------------|----------|-------------| | GRAFANA_URL | Yes | Grafana instance URL (e.g., http://localhost:3000) | | GRAFANA_TOKEN | No* | Service Account Token (recommended) | | GRAFANA_USERNAME | No* | Basic auth username | | GRAFANA_PASSWORD | No* | Basic auth password | | GRAFANA_ORG_ID | No | Organization ID (default: 1) | | NODE_TLS_REJECT_UNAUTHORIZED | No | Set to 0 to skip TLS validation (dev only) | | MAX_TOKEN_CALL | No | Max tokens per tool result (default: 20000) | | MCP_TRANSPORT | No | stdio (default) or http | | MCP_HTTP_PORT | No | HTTP port when using HTTP transport (default: 3100) | | MCP_HTTP_HOST | No | HTTP host when using HTTP transport (default: localhost) |

*At least one authentication method is recommended. The server will start without credentials but API calls will fail with 401.

Transport Modes

Stdio (Default)

{
  "mcpServers": {
    "grafana": {
      "command": "node",
      "args": ["/path/to/grafana-mcp/dist/index.js"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_TOKEN": "your-service-account-token"
      }
    }
  }
}

HTTP Streamable

MCP_TRANSPORT=http MCP_HTTP_PORT=3100 GRAFANA_URL=http://localhost:3000 GRAFANA_TOKEN=your-token node dist/index.js

Tools Reference

Dashboard Tools

| Tool | Description | |------|-------------| | get_dashboard_by_uid | Get full dashboard JSON by UID | | get_dashboard_summary | Get compact dashboard overview (panel count, variables, time range) | | update_dashboard | Create or update a dashboard | | delete_dashboard | Delete a dashboard by UID | | get_dashboard_versions | List dashboard version history |

Folder Tools

| Tool | Description | |------|-------------| | list_folders | List all folders with pagination | | get_folder_by_uid | Get folder details by UID | | create_folder | Create a new folder | | update_folder | Rename or modify a folder | | delete_folder | Delete a folder and its contents |

Datasource Tools

| Tool | Description | |------|-------------| | list_datasources | List all datasources, optionally filtered by type | | get_datasource | Get datasource by UID or name | | create_datasource | Create a new datasource | | update_datasource | Update a datasource configuration | | delete_datasource | Delete a datasource by UID |

Search Tools

| Tool | Description | |------|-------------| | search_dashboards | Search dashboards and folders by query, tags, type, or folder |

Annotation Tools

| Tool | Description | |------|-------------| | list_annotations | List annotation events with filtering | | create_annotation | Create a new annotation event | | update_annotation | Update an existing annotation | | delete_annotation | Delete an annotation |

Alerting Tools

| Tool | Description | |------|-------------| | list_alert_rules | List all alerting rules | | get_alert_rule | Get alert rule by UID | | create_alert_rule | Create a new alert rule | | update_alert_rule | Update an existing alert rule | | delete_alert_rule | Delete an alert rule | | list_contact_points | List all notification contact points | | list_notification_policies | Get the notification policy routing tree | | list_alert_instances | List active alert instances by state | | list_mute_timings | List all mute timing configurations |

Prometheus Tools

| Tool | Description | |------|-------------| | query_prometheus | Execute an instant PromQL query | | query_prometheus_range | Execute a range PromQL query | | list_prometheus_metric_names | Discover available metric names | | get_prometheus_metric_labels | Get label names for a metric |

Admin Tools

| Tool | Description | |------|-------------| | get_health | Check Grafana health status | | get_grafana_stats | Get server statistics (Admin role required) | | list_organizations | List all organizations (Server Admin required) | | get_current_organization | Get current organization info | | list_users | List users in the current organization | | get_user_profile | Get the current authenticated user's profile | | list_teams | List teams in the organization | | list_playlists | List all playlists |

License

Apache-2.0