gcx — Grafana CLI

gcx is Grafana in your terminal and your agentic coding environment.
With gcx you don't guess, but check the actual data. You can query production, investigate alerts, let the Assistant root-cause issues, or ship fixes with Observability built in, without ever leaving your editor.
What is gcx?
gcx is a CLI for Grafana Cloud, Enterprise, and OSS alike. It gives you and your AI coding agent structured access to your Grafana deployment's dashboards, alerts, SLOs, metrics, logs, traces, and more. Core features (resources, alerting, signal queries) work on Grafana 12 or higher, while Grafana Cloud adds product-specific commands on top. Refer to the compatibility matrix for details on supported features.
gcx works with any agentic coding tool. It ships with a suite of agent skills for common workflows like alert investigation, dashboard creation and GitOps, SLO management, and observability setup. Refer to Use with your AI agent for further details.
AI tools: Choose between gcx, Grafana MCP, and Grafana Assistant
Grafana offers you a few AI tools to work with.
gcx gives you and your coding agents access to Grafana through shell commands. Grafana MCP gives AI clients access through Model Context Protocol tools. Grafana Assistant is the Grafana AI agent, built into Grafana. Use gcx for terminal work, scripts, GitOps, and CI/CD pipelines. It supports Grafana OSS, Enterprise, and Cloud and has dedicated commands for Grafana Cloud products.
The Grafana MCP is a Model Context Protocol server that gives AI assistants and LLM clients access to your Grafana instance, including clients without shell access. Choose between the Grafana Cloud MCP(Grafana hosts the server) or the Grafana OSS MCP(You run and configure the server).
Finally, Grafana Assistant brings a purpose-built LLM into Grafana. Use it to troubleshoot issues, manage dashboards, and answer product questions in plain language. Some advanced features require the full Grafana Cloud feature set. In self-managed Grafana the Assistant app runs in your own deployment but connects to a Grafana Cloud Assistant backend, with a reduced feature set. Refer to the Grafana Assistant documentation for an overview.
If your coding agent supports both shell commands and MCP, start with gcx for these workflows. Choose MCP when a specific tool or its connection model better meets your needs.
Compatibility and availability
Grafana version support
gcx supports the current Grafana major version (currently 13.x), plus the previous major version for 3 months after the new one ships.
| Grafana | Support level |
|---|
| Grafana Cloud | Full support. Everything in this README, including Cloud-only products (SLO, Synthetic Monitoring, IRM, k6, Fleet, Adaptive Telemetry, Assistant). |
| Grafana 13+ (OSS / Enterprise) | Full support of self-hosted features. All app-platform API groups gcx relies on are enabled by default. |
| Grafana 12.x (OSS / Enterprise) | Not actively supported. Most features will still work, but there'll only be patches with security updates. Features built on app-platform API groups that are not yet enabled by default need an explicit feature toggle. |
| Grafana < 12 | Not supported. gcx detects the server version and exits with code 6 (version incompatible). |
Feature availability by deployment
Feature availability depends on your Grafana deployment: