Grafana MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GRAFANA_HOST | Yes | Grafana instance URL (e.g. https://your-grafana-instance.com) | |
| GRAFANA_API_KEY | Yes | Grafana API key (starts with glsa_) | |
| MCP_SERVER_PORT | No | Port to run the server on | 8000 |
| MCP_SERVER_DEBUG | No | Enable debug mode for more detailed logs | true |
| GRAFANA_SSL_VERIFY | No | Whether to verify SSL certificates | true |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| test_connectionA | Test connection to Grafana API to verify configuration and connectivity. Requires API key or open Grafana instance. |
| grafana_promql_queryC | Executes PromQL queries against Grafana's Prometheus datasource. Fetches metrics data using PromQL expressions, optimizes time series responses to reduce token size. |
| grafana_loki_queryA | Queries Grafana Loki for log data. Fetches logs for a specified duration (e.g., '5m', '1h', '2d'), converts relative time to absolute timestamps. Note: Loki queries require at least one non-empty matcher. Use patterns like '{job= |
| grafana_get_dashboard_configC | Retrieves dashboard configuration details from the database. Queries the connectors_connectormetadatamodelstore table for dashboard metadata. |
| grafana_query_dashboard_panelsA | Executes queries for specific dashboard panels. Can query up to 4 panels at once, supports template variables, optimizes metrics data. |
| grafana_fetch_label_valuesC | Fetches label values for dashboard variables from Prometheus datasource. Retrieves available values for specific labels (e.g., 'instance', 'job'). |
| grafana_fetch_dashboard_variablesC | Fetches all variables and their values from a Grafana dashboard. Retrieves dashboard template variables and their current values. |
| grafana_fetch_all_dashboardsC | Fetches all dashboards from Grafana with basic information like title, UID, folder, tags, etc. |
| grafana_fetch_datasourcesB | Fetches all datasources from Grafana with their configuration details. |
| grafana_fetch_foldersB | Fetches all folders from Grafana with their metadata and permissions. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Every tool has a clearly distinct purpose targeting specific Grafana resources or functions. For example, grafana_fetch_all_dashboards retrieves dashboard lists while grafana_fetch_dashboard_variables gets template variables, and grafana_loki_query versus grafana_promql_query handle different query types. There is no overlap that would cause agent misselection.
All tools follow a consistent snake_case pattern with 'grafana_' prefix and descriptive verb_noun combinations. The naming convention is perfectly predictable: grafana_fetch_*, grafana_get_*, grafana_query_*, and grafana_*_query patterns are used appropriately throughout the set.
With 10 tools, this server is well-scoped for Grafana operations. Each tool earns its place by covering distinct aspects: dashboard management, data source access, query execution, and connectivity testing. This count provides comprehensive coverage without being overwhelming.
The toolset provides excellent coverage for querying, fetching, and testing Grafana resources. Minor gaps exist in dashboard lifecycle management (no create/update/delete operations for dashboards or folders), but agents can work effectively with the read-oriented operations provided for the core Grafana use cases.