v2.3.02026-11-10
Added
- runpanelquery runs Elasticsearch panels, through /api/ds/query with Lucene variable formatting (${var:lucene} works for every datasource) and the panel interval sent so auto date histograms stay under Elasticsearch's bucket limit. ES|QL panels are rejected (#1468)
- query_elasticsearch accepts format: "compact", which returns only the timestamp, message and level fields, and fields to pick source fields, so log responses are much smaller. The default output is unchanged (#1513)
- An opt-in selector scope check for the Prometheus guardrail: --prometheus-guardrail-require-selective-labels requires every selector to carry a positive label matcher beyond the metric name, so unscoped queries like up or up{instance=~".*"} are flagged or rejected (#1470)
- Active, non-drill IRM incidents from the last 30 days are exposed as MCP resources at grafana://irm/incidents/{id}, alongside datasources. Any incident can be read by URI, and a resource kind that fails or times out is left out of the list without hiding the others (#1472)
- rendergrafanaapp can add up to five short notes after its text line, such as a failed query, so the model sees them in the same turn (#1492)
- With port 0, the SSE and streamable HTTP transports bind a free port and write the bound address to mcp-grafana-address in the working directory (#1480)
Fixed
- runpanelquery and dashboard inspection match Grafana more closely:
- $interval and $auto are rounded like Grafana (30s for 1h, not 36s) and honour the panel's max data points and min interval and the datasource's interval, and the Loki step keeps sub-second values (#1524, #1527)
- Single-value variables are escaped like Grafana, so a value with a quote no longer breaks a SQL or PromQL string (#1478)
- Variable values that look like macros, such as $interval, stay literal, and macros only match complete names, so $interval_env isn't partially replaced (#1522, #1451)
- Datasource variables saved without a value resolve to the first matching datasource, as Grafana does, fixing panels on popular grafana.com dashboards such as Node Exporter Full (#1456)
- Other variables saved without a value return a warning instead of sending $job to the datasource (#1525)
- Panels on Amazon Managed Prometheus and Azure Monitor Prometheus datasources run (#1537)
- Dashboard reads on Grafana 12 and later:
- getdashboardbyuid keeps the version in the body, so updatedashboard with overwrite: false saves instead of failing with an empty 409, and a real conflict says to read the dashboard again (#1516)
- getdashboardbyuid and getdashboard_summary fill created, updated, version and provisioned in meta (#1504)
- The list fields of a v2 dashboard body are filled before saving, and the minimal v2 example is complete (#1482)
- alertingruleswrite keeps snakecase notificationsettings keys as alertingrulesread returns them, instead of silently dropping grouping, timings and time intervals on update, and rejects unknown keys (#1517)
- Loki:
- listlokilabelnames, listlokilabelvalues and analyzelokilabels default to the last hour, as documented, instead of sending no range (#1554)
- Instant queries on VictoriaLogs return logs (#1530)
- querylokilogs works again on Grafana before 11.0 (#1488)
- The /resources fallback goes to a real Loki route, so stats, patterns and label tools no longer fail with Loki's HTML UI page until restart (#1380)
- listtempoattributenames and listtempoattributevalues accept start and end (default the past hour), so they find attributes from older traces (#1536)
- listpyroscopelabelnames and listpyroscopelabelvalues accept bare matchers like service_name="x" (#1538)
- querycloudwatchlogs no longer times out when query caching is enabled on the datasource (#1515)
- query_sql caps only top-level LIMITs, so a LIMIT in a comment, string or CTE no longer skips the cap and subquery limits are left alone (#1503)
- Incident tools work with basic auth when no service account token is set (#1548)
- OnCall list tools return one page when page is omitted in proxy mode, as they do otherwise (#1547)
- Time handling:
- A date-only end time resolves to the end of that day (#1491)
- generatedeeplink and getpanel_image convert RFC3339, date-only and naive times to epoch milliseconds, so links and renders no longer open at 1970 (#1501, #1546)
- query_elasticsearch and the Quickwit tool say numeric timestamps are Unix milliseconds (#1539)
- listprometheusmetric_metadata applies limitPerMetric (#1496)
- The Prometheus guardrail treats duration-expression ranges like x[30d + 30d] as unparseable instead of letting them past the range cap (#1507)
- listdashboardversions describes start as an offset (#1467)
Changed
- Tool descriptions and annotations match what the tools do. Breaking: alertingruleswrite and alertingsilenceswrite accept only create, update and delete; list and get are on the read tools registered alongside them. createdatasource no longer requires name, and createdatasource, updatedatasource and createsnapshot set openWorldHint (#1511)
- Template variables in dashboard tools go through one interpolator (#1465)
Security
- --loki-enforced-matchers applies to every /api/ds/query request that reaches a Loki datasource, whichever tool builds it, and queryprometheus rejects Loki and VictoriaLogs datasources. In v2.2.0, a LogQL metric query through queryprometheus could return streams outside the enforced matchers (#1182)
- Update the Alpine and Go base image digests in the Docker images (#1505)
v2.2.02026-11-02
Added
- CloudWatch Logs Insights tools in the opt-in cloudwatch category: listcloudwatchloggroups, listcloudwatchloggroupfields and querycloudwatch_logs. Queries run through /api/ds/query with a server-side row limit (default 100, max 1000), support cross-account log groups by ARN, and are stopped if the tool gives up waiting (#1404)
- Datasources are exposed as MCP resources at grafana://datasources/{uid}, listed per caller with their own credentials, so clients with a resource picker (such as @ in Claude Code) can attach a datasource to a conversation directly. They are registered with the datasource tools and turned off with them (#1459)
- rendergrafanaapp displays the result of an enabled query tool (queryprometheus or gettempotrace) in the interactive Grafana App in MCP hosts that support MCP Apps. Breaking: queryprometheus and gettempotrace no longer open an App themselves, so intermediate queries don't render charts while the agent is still gathering data. Their text and structured output is unchanged (#1401)
- search_dashboards hits carry a folderPath (for example Ops/Production/Services), and a new optional folderPath input restricts results to a folder and all of its subfolders (#1450)
- An opt-in Prometheus query guardrail for queryprometheus, queryprometheushistogram and Prometheus panels in runpanel_query. --prometheus-guardrail-mode=shadow|enforce checks each query's effective time range (--prometheus-guardrail-max-range, default 192h) and points per series (--prometheus-guardrail-max-points, default 11000) before it reaches the datasource, and in enforce mode rejects it with rewrite guidance (#1453)
- The Loki cost guardrail is built on the new standalone github.com/grafana/mcp-grafana/lokiguard module, so other callers can share one implementation. It now also guards querylokipatterns, adds --loki-guardrail-on-estimate-failure=allow|block to reject queries whose cost can't be assessed, and records an mcp.lokiguardrail.estimatedbytes histogram (#1355, #1374)
- BigQuery support in querysql, listsqldatabases, listsqltables and describesqltable, without querying INFORMATIONSCHEMA, so metadata lookups don't incur billable usage (#1417)
- runpanelquery runs Infinity panels that use a backend parser (#1345) and Neo4j panels on the kniepdennis-neo4j-datasource plugin (#1391)
- gettempotrace accepts optional start and end bounds, so Tempo doesn't have to scan every block for the trace (#1437)
- --sse-keepalive pings SSE clients at the given interval, so an idle reverse proxy or load balancer doesn't close the event stream and end the session. Off by default (#1389)
Fixed
- runpanelquery and dashboard inspection handle many more real-world dashboards:
- Panels using the default datasource, legacy string datasource references ("Prometheus", "$ds") or no reference at all are resolved (#1406, #1442)
- Interval variables set to auto are computed like Grafana, instead of sending an invalid placeholder (#1457)
- Multi-value variables are formatted with the datasource's default, for example (api|web) for Prometheus and 'east','west' for SQL, instead of sending only the first value (#1441)
- $auto is substituted, and Loki range queries send it as the step, so countovertime(...[$auto]) windows no longer overlap (#1406, #1432)
- $range and $interval keep their seconds (1m30s, not 1m), and $rateinterval_ms is substituted (#1419, #1433)
- Inspection shares execution's variable and macro handling, so processedQuery matches the query that runs; it accepts optional start/end and warns when a referenced variable is set to All. In query_sql, ${x:sqlstring} now quotes and escapes the value (#1373, #1375)
- A target pointing at a different datasource UID no longer inherits the panel's datasource type (#1440)
- searchtempotraces no longer returns every span twice, accepts limit (default 20) and spss, and notes when a search returned partial results (#1407)
- The row limit appended to SQL queries is no longer swallowed by a trailing line comment, and ClickHouse queries get it before a top-level SETTINGS clause (#1424, #1418)
- --enable-write-tools keeps individual alerting write tools (alertingruleswrite, alertingroutingwrite, alertingsilenceswrite) registered under --disable-write (#1421)
- Datasource-managed alert rules from alertingrulesread include their namespace and last_error, and omit the empty uid (#1425). When Grafana reports an authentication failure against the ruler, the error suggests checking the datasource credentials and ruler configuration (#1448)
- querylokipatterns includes the detected level of each pattern (#1422)
- listprometheuslabelnames and listprometheuslabelvalues accept PromQL selector strings such as {job="api"} in matches (#1340)
- getqueryexamples accepts datasource plugin IDs such as grafana-clickhouse-datasource (#1388)
- update_incident is annotated as destructive, so clients that ask before destructive tools ask before it changes an incident (#1427)
- With --tls-* flags or a SOCKS5 proxy, connections to Grafana are reused across tool calls instead of doing a new TLS handshake every call. Rotated certificate files are still picked up without a restart (#1455)
- OnCall requests use the configured TLS settings, extra headers, SOCKS5 proxy and redirect guard (#1393), and Prometheus requests use a configured BaseTransport (#1370)
- Over the HTTP transports, initialize and tools/list no longer call Grafana, so they work and stay quiet when Grafana is unreachable (#1392)
Changed
- Datasource queries go through Grafana's /api/ds/query endpoint instead of the datasource proxy, so they get the same query service handling as dashboard and Explore queries. This covers Prometheus (#1409), Loki ([#1410](https://github.com/grafana/mc
v2.1.12026-10-20
Fixed
- Classic (v1) dashboards are read and patched as v1 again on Grafana versions whose v1→v2 conversion adds a default grid layout preference, such as Grafana Cloud 13.3. Since v2.1.0, getdashboardbyuid reported every such dashboard as v2, so updatedashboard patches with $.panels[...] paths failed, and retrying with v2 paths migrated the dashboard to v2 (#1369)
v2.1.02026-10-20
Added
- alertingruleswrite and alertingroutingwrite can create Mimir/Cortex or Loki ruler alert rules and Mimir/Cortex Alertmanager receivers with managedby: "datasource". Grafana-managed creation stays the default. The target datasource comes from datasourceuid or, when exactly one compatible datasource exists, is selected automatically; existing rules in the group and the rest of the Alertmanager configuration are preserved (#1342)
- query_prometheus renders its results as an interactive chart (time series, heatmap, bars, stat or table, chosen from the response shape) in MCP hosts that support MCP Apps. The text output is unchanged (#1309)
- Every tool declares the Grafana RBAC actions it needs in its _meta (grafana.com/requiredPermissions), and the README's permissions column is generated from those declarations, adding 20 missing tools and correcting stale entries (#1306)
Fixed
- update_dashboard detects v2 dashboards that Grafana still reports as stored at v1, instead of saving them as v1 and silently dropping auto grid, tabs and conditional rendering (#1357)
- querysql and runpanelquery replace $from, $to and $interval only as whole tokens, so plugin macros such as ClickHouse's $fromTime, $toTime and $intervals (and tokens like $todate in other dialects) are no longer corrupted (#1346)
- query_prometheus returns endTime is required or startTime must be provided when queryType is 'range' instead of a PromQL parser error when those times are missing (#1347)
- --enable-write-tools=generate_deeplink now works with --disable-write, so shorten=true returns a short link (#1337)
- getpanelimage uses separate default sizes for panels (1000x750), dashboards (1200x900) and Explore (1000x1000) at scale 1, clamps scale to 1-3, and caps each rendered dimension at 3000 pixels (#1323)
- Listing datasource-managed (Prometheus, Mimir, Loki) alert rules pages through results and stops once enough matches are found, with a 10 MiB per-page and 30s overall bound, instead of decoding every rule at once (#1335)
- Several tool bugs (#1313):
- create_annotation converts Graphite when from milliseconds to seconds
- update_dashboard returns the saved title instead of null
- Pyroscope label tools return [] instead of null
- gettempotrace returns a not-found error for unknown trace IDs instead of {}
- Incident results no longer include empty placeholder assignments
- install_plugin only suggests creating a datasource for datasource plugins
- Generic empty-result hints for Prometheus and Loki are shorter, using fewer tokens per empty response (#1336)
- The MCP apps no longer ship duplicate woff fonts, shrinking the trace viewer by about 19% (#1312)
- Docker images report their real version from --version (#1315)
Changed
- Breaking: listusersby_org is paginated, with new query, limit (default 100, max 1000) and page inputs, and returns {totalCount, page, perPage, orgUsers} instead of an array of users. Agents pick up the new shape from the tool description and need no changes; only code that parses the tool output directly must read orgUsers (#1313)
- generate_deeplink with shorten: true returns an error containing the full link when a short URL cannot be created, instead of silently returning the long URL (#1313)
- grafanaapirequest times out after the Grafana client timeout (10s by default; raise it with --grafana-timeout). getpanelimage render timeouts default to 60s and are capped at 120s. The client cache is bounded to 1000 entries per client type (#1315)
- Prometheus query and metadata responses larger than 10 MiB fail with an error asking you to narrow the query, instead of being read without limit (#1331)
Security
- Bump the Go toolchain to 1.26.9, golang.org/x/net to v0.60.0 and the builder images to Go 1.27.2 for CVEs (#1333)
- Bump vite in the bundled UI apps to remediate a source-map-js CVE (#1332)
- Releases are signed with keyless cosign: the binaries checksums file, the .mcpb bundle and the Docker images, each with SPDX SBOMs (#1314)
v2.0.22026-10-07
Added
- getpanelimage can render an ad-hoc Explore view as a PNG via a new explore input (datasource UID and queries), without saving a dashboard first; requires Grafana 10.2+ (#1298)
- update_dashboard returns an absolute dashboard deeplink in its url field, using Grafana's public URL when available (#1300)
Fixed
- query_cloudwatch accepts percentile statistics such as p95 and p99.9; statistic was previously restricted to an enum of basic statistics (#1299)
- Tool and parameter descriptions no longer contain model directives or references to other tools, to meet connector directory requirements (#1304)
v2.0.12026-10-06
Added
- update_dashboard now steers models towards schema v2 for new dashboards, keeps existing dashboards in their stored schema, and includes minimal v2 examples (grid and tabs layouts) in its description (#1294)
Fixed
- update_dashboard no longer silently overwrites a v2 dashboard with a v1 panels[] body, which dropped its v2 structure such as tabs; it now returns an error suggesting patches or a v2 body. New v2 dashboards are created at the most stable v2 API version Grafana serves instead of a hardcoded v2beta1 (#1275)
- runpanelquery works on schema v2 dashboards instead of failing with dashboard has no panels (#1287)
- Datasource requests no longer treat an HTML page returned by the fallback /resources route (such as Loki's web UI) as success, which caused invalid character '<' errors that persisted until restart (#1295)
- Tool descriptions no longer show a literal \, in place of every comma (#1296)
- The trace and panel viewer MCP apps declare data: resources in their CSP, so hosts like MCP Inspector no longer block their embedded fonts and images (#1284)
v2.0.02026-10-01
2.0 moves the server from mark3labs/mcp-go to the official MCP Go SDK. The major version bump is for the Go library: the SDK's types are part of this module's exported API.
For most people running the server there is nothing to change. You are only affected if you:
- import mcp-grafana as a Go library (new module path and SDK types)
- use the Sift tools, which have been removed
- call alertingmanagerules or alertingmanagesilences directly, rather than letting your client discover tools
- use the SSE transport with per-request headers (Grafana URL, credentials, org ID or forwarded headers); switch to streamable HTTP
Changed
- Breaking: The server now uses the official MCP Go SDK instead of mark3labs/mcp-go (#1180). Over SSE, per-request headers no longer reach tool calls, so per-call Grafana URL overrides, credentials, org ID and forwarded headers only work over streamable HTTP. --session-idle-timeout-minutes is still accepted but ignored
- Breaking: The Go module path is now github.com/grafana/mcp-grafana/v2; importers must update their import paths (#1232)
- Breaking: The alerting tools are split into read and write tools, so read-only credentials and --disable-write keep read access: alertingmanagerules becomes alertingrulesread and alertingruleswrite, and alertingmanagesilences becomes alertingsilencesread and alertingsilenceswrite (#1233)
- Anonymous usage statistics reporting is now enabled by default. Opt out with --usage-stats=disabled, GRAFANAUSAGESTATS=disabled or DONOTTRACK=1 (#1197)
Added
- alertingroutingwrite creates Grafana-managed contact points (#1245)
Removed
- Breaking: The deprecated Sift tools and the sift tool category (#1191)
Fixed
- Browser clients on an allowed CORS origin can send the X-Grafana-URL, X-Grafana-Service-Account-Token, X-Grafana-API-Key and X-Grafana-Org-Id headers, and CORS responses now set Vary: Origin
- Tool parameters that accept any value now declare an explicit type list in their JSON schema, so MCP clients no longer warn that the schema has no validation keywords (#1231)
- Observability providers shut down in parallel, so one slow exporter no longer makes the others time out on shutdown (#1230)
v1.6.32026-09-30
Fixed
- Prometheus errors other than 400/422 (for example 500s or proxy errors) now include the response body, so failures explain what went wrong instead of only showing the status code (#1270)
- Docker images now report the correct release version instead of a build-info fallback (#1269)
Security
- Outbound Grafana clients now refuse redirects to a different scheme, host, or port, so Grafana credentials are never forwarded to a redirect target. Use --allow-cross-origin-redirects (or GRAFANAALLOWCROSSORIGINREDIRECTS=true) to restore the previous behaviour (#1268)
v1.6.22026-09-29
This is the last 1.x release; the next release will be 2.0.
Fixed
- Loki log queries now return lines in time order across streams and no longer drop a line at the limit boundary when results span multiple streams (#1259)
- Loki and VictoriaLogs query time bounds keep sub-second (up to nanosecond) precision, so narrow windows return results and callers can page by exact log timestamps (#1260)
- A configured Grafana URL with a trailing slash no longer produces double-slashed request paths when fetching frontend settings (#1258)
- PyPI wheels now compress the bundled binary, shrinking each wheel from about 55MB to about 17MB (#1257)
v1.6.12026-09-28
Fixed
- The stdio server no longer stops answering requests once a client opens a subscriptions/listen stream on protocol 2026-07-28, which made tools/list time out in clients such as Claude Code and GitHub Copilot CLI (#1236)
- Blank optional fields in the Claude Desktop extension (MCPB) no longer pass literal ${userconfig.} placeholders as credentials, so username/password auth works when the service account token field is left empty (#1249)