Skip to content
Release Radar

Grafana MCP Server

AI & Agents

MCP server exposing Grafana to AI agents

v1.6.08 days after v1.5.1
View on GitHub

Part of Grafana

Release history

v1.6.0

CompareGitHub

Added

  • Opt-in per-request Grafana URL selection, with an optional allowlist of permitted URLs and a request-scoped token (#1242)
  • Opt-in cloudlogging tool category for the Google Cloud Logging datasource: query_cloud_logging runs Cloud Logging queries, and list_cloud_logging_projects, list_cloud_logging_buckets and list_cloud_logging_views discover what it can read (#1228)
  • Tempo TraceQL metrics tools now describe the query grammar with a worked example and return correction hints for common PromQL-style mistakes, so agents can fix rejected queries (#1207)

Fixed

  • list_prometheus_metric_names now pushes regex filtering and a result limit to the datasource instead of downloading every metric name, avoiding large memory spikes on datasources with many metrics. page * limit must now not exceed 10000 (#1217)
  • --base-path now applies to the streamable HTTP endpoint and works for SSE with or without a trailing slash; /healthz and /metrics stay at the server root, and invalid or conflicting paths are rejected at startup (#1033)
  • query_loki_logs, query_loki_stats and query_loki_patterns return logql is required for an empty query instead of a Loki parse error. VictoriaLogs stats queries now need an explicit selector (* still works) (#1238)
  • get_panel_image now returns the deeplink as structured content, so the panel viewer shows "Open in Grafana" in Claude (#1240)

Fixed

  • shorten_url no longer doubles the Grafana sub-path prefix when generating short links on instances served under a sub-path (#1205)
  • get_annotation_tags now accepts limit as a number instead of a string, fixing type-mismatch errors from LLM callers (#1204)
  • Datasource TLS schema fields no longer include PEM placeholder strings that could confuse LLMs into sending literal placeholder text (#1200)

Added

  • Anonymous usage statistics reporting with per-process event unit, configurable via --usage-stats / GRAFANA_USAGE_STATS (modes: enabled, disabled, log; default disabled). Supports DO_NOT_TRACK=1, reports tool call counts and server configuration with no PII, and flushes on a 4-hour interval and at shutdown (#1188)
  • UserAgent field on GrafanaConfig for identifying API callers in outbound Grafana requests (#1187)

Fixed

  • query_loki_logs now preserves structured metadata when using the compact output format (#1196)

Changed

  • Tempo tools now use direct HTTP calls to the Tempo API instead of proxying through an MCP layer, improving reliability and reducing overhead (#1194)

Added

  • Optional version parameter on get_dashboard_by_uid to retrieve a specific saved version of a dashboard. New list_dashboard_versions tool returns version metadata (version number, author, timestamp, message) (#1158)

Fixed

  • Removed unconditional tools/list response field injection (resultType, cacheScope, ttlMs) that broke legacy MCP clients which validate against the base protocol schema (#1179)

Added

  • labelSelector parameter on the Sift tools (find_error_pattern_logs, find_slow_requests), accepting PromQL/LogQL stream selector syntax so investigations can be scoped with regex and negative matchers (e.g. {namespace=~"prod.*", cluster="us-east-1"}) rather than exact label equality only. Breaking: this replaces the previous required labels map parameter on those tools (#1165)

Fixed

  • run_panel_query now routes on the datasource's real type rather than the type recorded in the dashboard panel, so --loki-enforced-matchers can no longer be bypassed by a panel that mislabels a Loki datasource (#1169)
  • The default-organisation warning is no longer logged at startup when dynamic multi-org support is enabled, where a default org is expected to be absent (#1167)

Added

  • Unified SQL datasource tools (query_athena, query_clickhouse, query_snowflake, query_mssql, query_postgresql) into a shared dialect system, reducing duplication and making it easier to add new SQL datasources (#1126)
  • --enable-write-tools flag to selectively re-enable specific tools under --disable-write, so operators can allow individual write tools (e.g. Sift investigation tools) without enabling all writes. --enable-query is now shorthand for naming the raw-SQL query tools in this list (#1157)
  • Optional folderUid, tag, and starred filters on search_dashboards, forwarded to Grafana /api/search. Empty-query searches now always restrict results to dashboards (type=dash-db) (#1154)
  • Optional matcher parameter on list_loki_label_names and list_loki_label_values to narrow label discovery to a subset of streams (a LogQL stream selector on Loki, LogsQL on VictoriaLogs) (#1135)
  • delete_annotation tool (write-gated) to permanently delete a Grafana annotation by ID, completing the annotation CRUD surface (#1134)
  • list_cloudwatch_dimension_values tool to list the values available for a CloudWatch dimension key, rather than requiring an LLM to guess them (#1141)
  • --loki-enforced-matchers: operator-configured LogQL label matchers AND-ed into every native-Loki query (logs, stats, patterns, and label enumeration) to restrict which streams the server can read. Fails closed on unparseable queries and refuses VictoriaLogs datasources while set. Pair with --disable-api so the raw datasource proxy cannot bypass it. A companion --loki-label-enumeration-fallback controls label-enumeration behaviour under purely-negative matchers (#978)
  • --instructions-append flag to append operator-supplied text to the server instructions returned to MCP clients on initialize, so every connecting agent sees it (#978)
  • Separate /healthz listener with its own port, so health checks and Prometheus metrics are served independently of the MCP transport (#1137)

Fixed

  • alerting_manage_rules list operation now applies search_rule_name filtering client-side when listing datasource-provisioned rules, which the Grafana ruler API does not filter server-side (#1161)
  • tools/list response now includes resultType, cacheScope, and ttlMs fields for all protocol versions, fixing a ValidationError that silently dropped all tools when mcp-grafana was used behind a Python MCP proxy (mcp >= 2.0.0, fastmcp >= 4.0.0) (#1151)
  • get_current_oncall_users now handles user objects (not just ID strings) in the IRM proxy API's on_call_now response, fixing empty results on instances using the IRM proxy (#1150)
  • --allowed-hosts is now honored when the request arrives via a loopback reverse proxy, so non-loopback hostnames work behind nginx/Caddy on the same machine (#1142)
  • check_datasources_health no longer reports a frontend-only datasource plugin (e.g. the built-in Alertmanager datasource) as unhealthy; such datasources now report "status": "UNKNOWN" and are counted separately in a new unknown field (#1139)
  • Tool calls with a type mismatch (e.g. string where number is expected) now return a structured MCP tool error instead of an opaque internal error (#1138)
  • Explore deeplinks now use the panes format introduced in Grafana 10.2, fixing broken Cloud Monitoring and Loki links caused by lossy migration of the legacy left parameter. Falls back to the legacy format for Grafana < 10.2 (#1088)
  • query_loki_logs no longer double-encodes timestamps in stream results (#982)

Added

  • Optional per-call orgId argument, where applicable, to target a Grafana organization, opt-in via the --dynamic-multi-org flag; also discovers proxied datasource tools across every org the credential can access. Tools that address no organization β€” documentation lookups, local config generation, static query examples β€” do not advertise it, since selecting one could not change their answer (#943)
  • user_info tool reporting the current identity, whether it is a Grafana admin, and the organizations the credential can access (with roles) (#943)
  • Incident custom fields support for creating and updating incidents with user-defined fields (#1131)
  • Grafana documentation tools backed by mcp-doc-server for querying Grafana product documentation (#1116)
  • --disable-query flag to disable all query tools, and raw-SQL query tools (ClickHouse, Snowflake, Athena, MSSQL, PostgreSQL) are now gated behind --disable-write by default (#1085)
  • grafana_api_request now supports POST to /api/ds/query when query tools are enabled, allowing datasource queries through the generic API tool (#1125)

Fixed

  • run_panel_query now resolves sqlstring-type dashboard variables correctly (#1132)
  • Dashboard tool now describes structured panel targets (e.g. CloudWatch, Elasticsearch) instead of silently dropping them (#1130)
  • Proxied tools close non-published MCP clients before signaling readiness, preventing resource leaks during tool discovery (#1128)

Changed

  • get_panel_image no longer declares its own orgId argument, using the per-call orgId injected into the native tools where an organization applies instead. The argument is therefore only advertised with --dynamic-multi-org, and without that flag a call passing orgId is rejected as an unknown argument. Renders still scope the organization with targetOrgId rather than orgId, so they do not change the user's active organization, and an organization fixed by GRAFANA_ORG_ID or the X-Grafana-Org-Id header now sets targetOrgId too.
  • get_panel_image returns the dashboard deeplink only when it would open in the organization the image was rendered from, which now also accounts for an organization fixed on the connection rather than passed per call. A link cannot carry an organization safely β€” ?orgId=N is intercepted by Grafana's OrgRedirect middleware, which persists the switch onto the viewer's user record β€” so for any other organization the image is returned without a deeplink (and without the MCP Apps panel-viewer fallback) rather than with one that can resolve to a different dashboard of the same UID.

Added

  • alerting_manage_silences tool (opt-in, read/write-gated) to list, create, and expire Grafana alert silences (#991)
  • update_incident tool to update fields on an existing incident (#1080)
  • update_alert_group tool to acknowledge and resolve Grafana OnCall alert groups (#1083)
  • get_alert_group now returns the last alert payload for the group, so callers can inspect the triggering alert without a second lookup (#1081)
  • Agent Observability agento11y_manage_experiments and agento11y_manage_test_suites tools, in the opt-in agento11y category (#1062)
  • Compact output format for query_loki_logs, reducing token usage for large log result sets (#990)
  • Opt-in Loki query cost guardrail for query_loki_logs (--loki-guardrail-mode / GRAFANA_LOKI_GUARDRAIL_MODE, off by default, with shadow and enforce modes). Because Loki query cost is bytes scanned β€” determined only by the stream selector and time range, not line filters β€” the guardrail requires a selective stream selector, caps the time range (--loki-guardrail-max-range, default 24h), and pre-checks Loki's index/stats byte estimate against a budget (--loki-guardrail-max-bytes, default 100GiB). Blocked queries return an MCP tool error with rewrite guidance; unparseable queries fail open (#1031)
  • OpenTelemetry counters recording Loki cost-guardrail decisions (allowed, blocked, failed-open), so operators can observe the guardrail's impact (#1095)
  • run_panel_query now supports PostgreSQL (#1112) and MSSQL (#1042) datasources
  • Datasource resolution falls back to /api/frontend/settings when the datasource metadata API is forbidden, so tools keep working on instances that restrict it (#1015)
  • GrafanaVersion(ctx) exposes the targeted Grafana version to tools, so they can gate behaviour on it instead of inferring capability from API versions (#1091)
  • Optional orgId parameter on get_panel_image to render a panel for a specific organisation (#903)
  • list_datasources now supports filtering by name (#973)
  • --server-name flag (and GRAFANA_MCP_SERVER_NAME env var) to set a custom MCP server name in the handshake and OTel service.name, so operators can distinguish multiple instances (#1011)
  • Scoped SOCKS5 egress proxy via GRAFANA_SOCKS5_PROXY, routing outbound Grafana traffic through a SOCKS5 proxy (#1119)
  • An MCP Bundle (.mcpb) for Claude Desktop is now built and attached on release (#1077)

Changed

  • Bumped mcp-go from v0.55.0 to v0.58.0, picking up fixes for tool-filter scans on the tools/call hot path, raw JSON preservation for tool arguments and structuredContent, schema tags on nested fields, multi-line SSE data fields, and HEAD requests returning 200. This also inherits mcp-go's new default-on DNS rebinding protection, which returns 403 when a request arrives over a loopback connection with a non-loopback Host header β€” a second check underneath DNSRebindingProtectionMiddleware that --allowed-hosts cannot loosen. Default deployments are unaffected, since DefaultAllowedHosts already restricts Host to loopback variants; operators who widen --allowed-hosts while a same-host reverse proxy forwards over loopback preserving a non-localhost Host should configure the proxy to rewrite Host to localhost (#1097)
  • tools.Stats.Bytes is now int64 (was int) so index/stats byte counts cannot overflow on 32-bit platforms; Go API consumers of the exported struct may need a cast (#1031)
  • /api/frontend/settings is now fetched once per Grafana instance instead of up to three times. The public URL, the Grafana version and the dashboard namespace previously each fetched that endpoint behind a cache of their own, even though a single response carries all three fields. mcpgrafana.GrafanaClient gains a Version field populated by the same request that populates PublicURL, and mcpgrafana.GrafanaVersion prefers it, so a tool holding a client reads the version with no HTTP request at all β€” previously it cost a blocking round trip on a detached context the caller could not cancel. The namespace keeps a separate org-keyed cache, because Grafana computes it for the requesting org and a URL-keyed entry would serve one org another org's namespace. Failed fetches are still retried rather than cached, but a successful fetch that simply omits buildInfo is now cached instead of being refetched on every call (#1115)

Fixed

  • Closed two gaps in the GRAFANA_SOCKS5_PROXY egress guarantee. The install_plugin and search_plugin_information tools reached the grafana.com plugin catalog via http.DefaultClient, bypassing the configured SOCKS5 proxy entirely; these requests now route through the proxy (carrying no Grafana credentials or forwarded headers) and fail closed when it is misconfigured. NewGrafanaClient now installs a fail-closed transport instead of panicking when the proxy cannot be applied, matching the OnCall and incident paths, and the per-call fail-closed logic is centralised in one helper (#1121)
  • observability.ToolMetricDimensions now bounds the mcp.tool.phase metric label against the toolMetricDims allowlist, like mcp.tool.operation and mcp.tool.resource_type. Phase is read from a tool result's _meta, and results proxied from an MCP-enabled datasource come from a remote server rather than from this repo, so the label was unbounded-cardinality in the general case. A tool that does not opt into phases now contributes no phase, and an opted-in tool reporting an unexpected value reports other. Behaviour is unchanged for every in-tree tool: create_datasource is the only producer, with schema and created (#1094)
  • Distributed traces are no longer broken over the HTTP transports: the server now installs a global OTel TextMapPropagator (via autoprop, honouring OTEL_PROPAGATORS, default tracecontext,baggage), so an inbound traceparent continues the caller's trace and outbound Grafana API requests carry one of their own. Previously every hop started a disconnected trace. Trace context forwarded via GRAFANA_FORWARD_HEADERS no longer overrides the propagated value, which would have cut mcp-grafana out of the middle of the trace (#1084)
  • Grafana-managed alert rule UIDs are recovered from the internal __alert_rule_uid__ / __alert_rule_namespace_uid__ labels when older Grafana responses omit the top-level UID fields; those internal labels are stripped from the returned summary so they don't surface as user labels (#968)
  • Alert rule matchers are now encoded in the JSON shape Grafana expects, fixing rule create/update requests that Grafana previously rejected (#1111)
  • run_panel_query now resolves constant and textbox dashboard variables from their query field, so panels using them return correct results (#1041)
  • Datasource queries fall back to the legacy proxy on a 401, restoring queries against datasources the metadata proxy rejects (#1022)
  • URL shortening for navigation deeplinks now sends a relative path, fixing link generation on some deployments (#974)
  • GRAFANA_URL is normalized where it enters the process (trailing slash trimmed, missing scheme supplied), so the config, API client, and client-cache key all agree on the target. Previously a schemeless value such as 127.0.0.1:3000 could panic at startup or produce hostless requests (#1034)
  • Proxied tools auto-wire SetToolManager and report a clearer error when the tool manager is nil (#1102)
  • The session wait when building a proxied tool set is now bounded, so a slow or unavailable datasource can no longer hang tool discovery (#1087)
  • Transient proxied-tool discovery/connect failures are retried and connections are established in parallel, making proxied tool startup faster and more resilient (#1071)
  • The client cache and session OTel meters are now injectable, so embedders can supply their own instrumentation (#1073)

Added

  • Optional bearer-token caller authentication for the SSE and streamable-http transports via --server-auth-token / MCP_GRAFANA_SERVER_TOKEN. When set, callers must present Authorization: Bearer <token> and unauthenticated requests are rejected with 401 before any tool runs. Caller authentication is enforced only when a token is configured; when it isn't, a non-loopback bind still starts but logs a security error at startup (#1059, #1060)
  • ask_assistant tool (opt-in, write-gated) for asking Grafana Assistant open-ended questions and getting a full text reply (#1026)
  • Agent Observability tool agento11y_manage_agents, in the opt-in agento11y category. Read-only: list for the agent catalog, get for one agent version in full (system prompt, tools, models), list_versions for an agent's version history, and list_version_scores for evaluation score aggregates per version. Needs grafana-agento11y-app.data:read and is registered whether or not write tools are enabled (#1036)
  • Agent Observability tool agento11y_manage_eval_collections, in the opt-in agento11y category. Reads cover saved conversations, the collections that group them, and the membership in both directions. The write operations (bookmark and delete a saved conversation; create, update, and delete a collection; add and remove collection members) need grafana-agento11y-app.eval:write and are registered only when write tools are enabled (#1035)
  • Agent Observability eval control-plane tools agento11y_manage_evaluators and agento11y_manage_eval_rules, in the opt-in agento11y category. Reads cover evaluators, evaluator templates, template versions, the judge provider and model catalog, eval rules, and guards. The write operations (evaluator upsert, fork, test, and delete; rule and guard create, update, preview, and delete) need grafana-agento11y-app.eval:write and are registered only when write tools are enabled (#1028)
  • CLI flags to include tool arguments in OpenTelemetry spans and to configure the Grafana client request timeout (#1023)

Fixed

  • Declare readOnly/destructive/openWorld hints on every tool (#1051)
  • Proxied-tools memory scaling with session count and unbounded per-session tool-store growth (#1001)
  • Restrict the Prometheus backend to known Prometheus-compatible datasource types (#1006)
  • Respect OTEL_LOGS_EXPORTER=none to disable OTLP log export (#1012)

Changed

  • Enrich telemetry to include more tool dimensions (#1016)
  • query_pyroscope now returns a per-function table (pprof -top style: flat/cum per fully-qualified function name) by default instead of a line-level DOT call graph. The DOT call graph remains available via format="dot" and no longer deletes the other truncation node (#1025)

Removed

  • Support for the undocumented X-Grafana-URL header (#1052)

Added

  • Agent Observability tools: agento11y_manage_conversations and agento11y_manage_generations in a new agento11y category, excluded from the default tool set (#944)
  • Inline panel viewer for get_panel_image on MCP Apps-aware hosts, with a dashboard deeplink fallback for other hosts. The deeplink text content is tagged with _meta.ui.kind = "deeplink" so viewers can locate it structurally instead of by string matching (#882)

Fixed

  • Enable OTLP trace export with the signal-specific OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable, so operators can ship traces without also exporting logs; the generic OTEL_EXPORTER_OTLP_ENDPOINT still enables both signals (#1004)

Changed

  • Tool calls with unknown argument keys are now rejected with an error naming the unknown keys and listing the valid ones, instead of silently ignoring them and answering from default values (#997)

Security

  • Bind environment-configured credentials to the configured Grafana URL. A URL supplied in the X-Grafana-URL request header no longer causes the environment service-account token, deprecated API key, basic auth, or extra headers to be sent to a caller-specified host (#XXX)

Fixed

  • Send the relative path (rather than an absolute URL) to the short-urls API when generating navigation deeplinks (#976)

Security

  • Block DNS rebinding attacks on the HTTP and SSE transports (#957)

Added

  • Datasource management tools for creating and updating datasources via the MCP server, gated behind write tools, with schema-guided configuration that follows each datasource type's JSON schema and excludes sensitive credential fields (#939)

Fixed

  • Recognize the Athena plugin's rawSQL query field when extracting dashboard panel queries (#956)

Added

  • Snapshot tools (list_snapshots, get_snapshot, create_snapshot, delete_snapshot) for managing Grafana dashboard snapshots (#949)
  • Native dashboard schema v2 support in the dashboard tools (#937)
  • Quickwit datasource support (#941)
  • BigQuery datasource support in run_panel_query (#930)
  • Elasticsearch and OpenSearch tools now honor the datasource-configured timeField (#909)
  • Relative time syntax (e.g. now-1h) for time range parameters across tools (#942)
  • GRAFANA_SERVICE_ACCOUNT_TOKEN_FILE environment variable to read the service account token from a file, supporting rotated tokens (#935)
  • Optional startRfc3339/endRfc3339 time range parameters for list_prometheus_metric_names to restrict results to metrics active within a window (#927)
  • query_prometheus now surfaces datasource warnings (e.g. partial responses from Thanos) in its result (#946)

Fixed

  • Elasticsearch client now refuses HTTP redirects that would drop the request body, preventing malformed queries against redirecting endpoints (#951)
  • Propagate forwarded headers to downstream Loki calls by using the configured HTTP transport (#945)

Fixed

  • Docker images are again published to docker.io/grafana/mcp-grafana. v0.15.0 and v0.15.1 Docker images were never published because the shared Docker Hub credential was restricted to read-only. The release workflow now publishes via Grafana's GAR-based Docker Hub mirror pipeline (#925)

Added

  • shorten_url tool for creating Grafana short links from long dashboard or explore URLs (#899)
  • Provisioning workflow tools: list_provisioning_repositories for discovering connected repositories, validate_provisioning_file for dry-run validation of provisioning files, and provisioning preview support in get_panel_image and generate_deeplink for rendering dashboards from PR branches before merge (#900)

Changed

  • Rendering tools now use a shared transport chain with BaseTransport support for consistent HTTP middleware (#918)

Security

  • Redact credentials from debug transport logs to prevent accidental exposure (#920)
  • Update Go to 1.26.3 to fix CVE-2026-33810 and bump litellm dependency (#916)

Added

  • Snowflake datasource tools for querying Snowflake through Grafana's /api/ds/query endpoint with macro substitution and template variables (#845)
  • Amazon Athena datasource support with schema discovery tools and SQL query execution, including macro substitution and result reuse (#799)
  • VictoriaLogs support through existing Loki tools, routing LogsQL queries via the VictoriaLogs HTTP API without adding new tools (#850)
  • Loki label-strategy analyzer tools for evaluating label cardinality and optimization opportunities (#885)
  • Plugin install and search tools for discovering, inspecting, and installing Grafana plugins (#835)

Fixed

  • Scope datasource fallback cache by request path to prevent incorrect cache hits across different API endpoints (#897)
  • Release builds now report the correct version via ldflags injection (#895)
  • Improved Loki and dashboard tool descriptions for better agent accuracy (#880)
  • Add readResponseBody helper to limit and detect oversized responses, preventing excessive memory use (#884)
  • Improved timeout error messages for proxied tools with context-aware logging (#881)
  • Cap error response body reads to 1KB across all HTTP clients to prevent excessive memory allocation from misbehaving servers (#876)

Changed

  • Consolidated duplicated /api/ds/query implementations into a shared helper (#877)

Security

  • Update golang.org/x/net to v0.55.0 to address security vulnerability (#901)

Added

  • Generic API request tool for making arbitrary HTTP requests to the Grafana API (#841)
  • OpenSearch datasource support (#669)
  • Tool to retrieve Grafana plugin information (#826)
  • Export logs via OTLP when OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_LOGS_ENDPOINT is set, consistent with existing OTLP trace export (#839)
  • Configurable slow-request-threshold logging for identifying long-running tool calls (#756)
  • Server instructions now dynamically reflect only the enabled tool categories, preventing agents from attempting to use disabled tools (#829)

Fixed

  • Route OnCall tools through IRM plugin proxy for correct on-behalf-of authentication (#842)
  • Propagate context to jq operations and return clear errors on non-JSON input (#847)
  • Prevent panic in Sift tool when pattern type assertion fails (#834)

Added

  • Support PromQL queries against VictoriaMetrics datasources (#767)

Fixed

  • Include recording rules in datasource ruler listings for complete alerting rule visibility (#819)
  • Propagate request context through OpenAPI convenience calls to ensure proper tracing and cancellation (#822)