Skip to main content
Glama
enrique-pastrana

grafana-mcp-adapter

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GRAFANA_TOKENYesA Grafana service account token with read-only permissions.
GRAFANA_BASE_URLYesThe base URL of the Grafana instance (e.g., https://grafana.example.com).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
grafana_healthA

Read-only Grafana health/config check.

grafana_search_dashboardsA

Read-only search of Grafana dashboards (by title substring and/or tags). Returns uid, title, folder, tags and url for each. Use the uid with grafana_get_dashboard to fetch the full dashboard JSON.

grafana_get_dashboardA

Read-only fetch of a Grafana dashboard's full JSON by uid (panels, variables, queries, meta). Get the uid from grafana_search_dashboards.

grafana_list_datasourcesA

Read-only list of configured Grafana datasources. Returns uid, name, type and is_default. Use a datasource uid with grafana_query.

grafana_queryA

Read-only metric/log query via Grafana's /api/ds/query. Provide the datasource uid (from grafana_list_datasources), a raw expression (PromQL for Prometheus, LogQL for Loki, etc.), and an optional time range. By default returns a compact per-series digest (labels + count/first/last/min/max/avg); pass raw=true for the full (potentially very large) frames.

grafana_logs_linkA

Read-only: build a permanent Grafana Explore (Loki) link for a customer's logs AND return a preview of the most recent lines. Identify the customer/component with free text (e.g. client='april', component='gateway') — it matches case-insensitively against the service_name label, which encodes both. Optionally narrow with line_filter (substring that must appear in the log line). Default range is the last 1 hour; widen with from/to (e.g. from='now-6h'). Returns { query, explore_url, range, preview_count, preview }. Paste explore_url into the ticket; ask the user before widening the range since logs are large.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/enrique-pastrana/grafana-mcp-adapter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server