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 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| test_connection | Test connection to Grafana API to verify configuration and connectivity. Requires API key or open Grafana instance. |
| grafana_promql_query | Executes PromQL queries against Grafana's Prometheus datasource. Fetches metrics data using PromQL expressions, optimizes time series responses to reduce token size. |
| grafana_loki_query | 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=~".+"}' instead of '{job=~".*"}' or '{}' to avoid syntax errors. |
| grafana_get_dashboard_config | Retrieves dashboard configuration details from the database. Queries the connectors_connectormetadatamodelstore table for dashboard metadata. |
| grafana_query_dashboard_panels | Executes queries for specific dashboard panels. Can query up to 4 panels at once, supports template variables, optimizes metrics data. |
| grafana_fetch_label_values | Fetches label values for dashboard variables from Prometheus datasource. Retrieves available values for specific labels (e.g., 'instance', 'job'). |
| grafana_fetch_dashboard_variables | Fetches all variables and their values from a Grafana dashboard. Retrieves dashboard template variables and their current values. |
| grafana_fetch_all_dashboards | Fetches all dashboards from Grafana with basic information like title, UID, folder, tags, etc. |
| grafana_fetch_datasources | Fetches all datasources from Grafana with their configuration details. |
| grafana_fetch_folders | 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 | |