By grafana
Use gcx CLI to debug Grafana observability stacks: investigate alerts, SLO breaches, synthetic check failures via Prometheus metrics and Loki logs; manage dashboards, SLOs, resources with GitOps; scaffold Go projects; automate setups and code generation for resources-as-code.
Structured diagnostic workflow for debugging application issues using Grafana observability data. Use when the user reports errors, latency spikes, service degradation, HTTP 500s, or wants to investigate why a service is behaving unexpectedly. Triggers for: "my API is returning 500 errors", "latency is spiking", "service seems down", "help me debug using Grafana", "investigate why requests are failing", "something is wrong with my service".
Discover what datasources, metrics, labels, and log streams are available in a Grafana instance. Use when the user asks what data exists, what metrics are available, what services are being monitored, or needs to find a datasource UID.
(Experimental) End-to-end observability setup for Grafana Cloud. Covers instrumentation, SLOs, alerting, synthetic monitoring, k6 load testing, IRM on-call, dashboards, cost optimization, and GitOps export.
Use gcx CLI to manage Grafana Cloud resources. Trigger when the user wants to inspect, create, update, delete, query, or automate any Grafana resource — dashboards, datasources, alerts, SLOs, synthetic checks, oncall, incidents, fleet, k6, knowledge graph, or adaptive telemetry.
Use when the user wants to create new Grafana dashboard or alert rule Go files from scratch, generate typed stubs, add a new dashboard to a project, or write grafana-foundation-sdk builder code. Triggers on "new dashboard", "generate dashboard", "add dashboard", "create alert rule", "generate stub", "foundation-sdk builder", "dashboard as code from scratch".
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Grafana Cloud and the Grafana Assistant — in your terminal and your agentic coding environment.
Query production. Investigate alerts. Let the Assistant root-cause issues. Ship fixes with observability built in. Without leaving your editor.
"Don't guess. Check the actual production data."
Agentic coding tools like Claude Code and Cursor have changed how developers build software.
But we face a critical architectural gap: Our development environments are operating in a Context Vacuum.
gcx closes that gap. It connects your editor to your entire Grafana Cloud production stack — including the Grafana Assistant — making observability a development signal, not an afterthought. When something breaks, the Assistant's investigation is already waiting: mitigations planned, context assembled, so you can act immediately.
[!NOTE] gcx requires Grafana 12 or above. Older Grafana versions are not supported.
[!WARNING] This project is currently in public preview, which means that it is still under active development. Bugs and issues are handled solely by Engineering teams. On-call support or SLAs are not available.
See Release life cycle for Grafana Labs.
Here's what it looks like when your coding agent has access to production:
1. An alert fires — P95 latency on the checkout service crosses the SLO threshold.
2. The Assistant investigates — Your coding agent calls the Grafana Assistant through gcx. The Assistant has already started its investigation — it traces the issue to a missing index on customer_id causing full table scans under load.
3. It fixes the issue — Drafts the migration, adds the index.
4. It prevents recurrence — Instruments the service with OpenTelemetry spans, sets up a Synthetic Monitoring check on the checkout flow, and creates an alert rule on query duration.
5. It ships — Opens a PR, tests pass, deploys to production. The alert resolves.
Investigation, fix, instrumentation, monitoring — without the developer ever leaving their editor. The Grafana Assistant provides the intelligence; gcx provides the interface. And because it all builds on everything you've already configured in Grafana Cloud — your dashboards, your alerts, your datasources — no other tool can give you this depth out of the box.
Pre-built binary (Linux/macOS/Windows):
Download the latest archive for your OS and architecture from the releases page, extract it, and move the binary to your PATH:
tar xzf gcx_*.tar.gz
chmod +x gcx && sudo mv gcx /usr/local/bin/
Go install:
go install github.com/grafana/gcx/cmd/gcx@latest
Shell completion:
gcx completion zsh > "${fpath[1]}/_gcx" # zsh
gcx completion bash > /etc/bash_completion.d/gcx # bash
Verify: gcx --version
A Claude Code plugin is included with skills for managing dashboards, exploring datasources, investigating alerts with the Grafana Assistant, and debugging with live observability data. Install it alongside gcx to give your agent deep Grafana knowledge.
Grafana API access (service account token, recommended):
gcx config set contexts.my-grafana.grafana.server https://your-instance.grafana.net
gcx config set contexts.my-grafana.grafana.token your-service-account-token
gcx config use-context my-grafana
npx claudepluginhub grafana/gcx --plugin gcxA Model Context Protocol (MCP) server for Grafana providing access to dashboards, datasources, and querying capabilities
Auto-instrument any web app with Grafana Faro Web SDK. Detects your framework, generates init code, wires it into your entry point, and opens a PR.
Skills for building apps on the Grafana App Platform using grafana-app-sdk — CUE schemas, reconcilers, and admission control
Send Claude Code session telemetry to Grafana Sigil
Skills and rules for developing and using the Grafana Assistant app and CLI.
Skills for building apps on the Grafana App Platform using grafana-app-sdk — CUE schemas, reconcilers, and admission control
Create Application Performance Monitoring dashboards
Monitoring and alerting configuration with dashboard generation
Skills and rules for developing and using the Grafana Assistant app and CLI.
Grafana plugin development and billing metrics analysis for Prometheus and Loki
A Model Context Protocol (MCP) server for Grafana providing access to dashboards, datasources, and querying capabilities