Grafana
Open and composable observability platform for metrics, logs, and traces
Verdict
Common use cases
- Check Grafana health before deploying changes
- Query Loki logs during incident response
- Verify HA tracker leader election status
- Inspect Mimir ruler ring topology in chat
- Push OTLP logs from CI pipeline summaries
Integration
- Vendor
- Grafana
- Category
- developer-tools
- Auth
- OAUTH2
- Tools
- 11
- Composio slug
grafana
Tools
- Create OTLP v1 Logs
Tool to create OTLP v1 logs in Grafana Loki. Use when you need to send OpenTelemetry Protocol logs to Grafana for ingestion and storage.
- Get Distributor HA Tracker
Tool to retrieve distributor HA tracker status. Use when you need to check which replica has been elected as leader for each Prometheus HA cluster.
- Get Grafana Health Status
Check Grafana server health and database connectivity. Returns 'ok' if Grafana's web server is running and can access the database. Use when you need to verify Grafana instance availability before performing operations.
- Get Index Gateway Ring Status
Tool to retrieve the index gateway hash ring status from Grafana Loki. Returns information about the state, health, and last heartbeat time of each index gateway in the ring.
- Get License Status
Tool to check if a valid Grafana Enterprise license is available. Use when you need to verify license status or availability.
- Get overrides exporter ring
Tool to retrieve the overrides-exporter hash ring status as an HTML page. Use when you need to check the state, health, and heartbeat information of overrides-exporter instances. Only accessible when -overrides-exporter.ring.enabled flag is
- Get Ruler Ring Status
Tool to retrieve the ruler ring status from Grafana Mimir. Use when you need to check the distributed hash ring topology and operational status of ruler instances.
- Get Store Gateway Tenants
Retrieves store gateway tenants. Returns a list of tenants that have blocks stored in the store-gateway's configured storage. Use when you need to view which tenants have data stored on a store-gateway node.
- Post ACS
Tool to perform SAML Assertion Consumer Service (ACS) operation. Use when processing SAML authentication responses from an identity provider. This endpoint typically handles the SAML assertion and returns a redirect response (HTTP 302).
- Query Public Dashboard Panel
Query a panel on a public Grafana dashboard to retrieve time-series data and metrics. Use when you need to fetch visualization data from a publicly shared dashboard without authentication. Returns data frames with query results for the spec
- Retrieve JWKS
Tool to retrieve JSON Web Key Set (JWKS) with all public keys for token verification. Use when you need to get the keys that can verify JWT tokens.
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to the Integrations tab. 2. Click 'Add Integration', search for Grafana, and select it from the developer tools category. 3. Click 'Connect' to start the OAuth flow — you'll be redirected to your Grafana instance login. 4. Authenticate with your Grafana credentials and grant the requested scopes (logs:read, logs:write, metrics:read, admin:read for health checks). 5. After authorization, Switchy redirects you back and confirms the connection is active. 6. Open any Space, type '@Grafana get health status' and send — if the MCP replies with server health data, the integration is working. 7. To invoke other tools, @mention Grafana followed by a task like 'check ruler ring status' or 'retrieve store gateway tenants for prod cluster'.
What teammates see: by default, memories from Grafana are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Health Check Before Deploy
@Grafana get the current health status of the Grafana server and database. Let me know if everything is operational before I proceed with the deployment.Open in a Space →
HA Tracker Leader Status
@Grafana retrieve the distributor HA tracker status. I need to see which replica is currently the leader for our production Prometheus clusters.Open in a Space →
Ruler Ring Topology
@Grafana get the ruler ring status from Mimir. Show me the current topology and health of all ruler instances.Open in a Space →
Store Gateway Tenants
@Grafana retrieve the list of tenants that have blocks stored in the store-gateway. I want to verify which teams are actively writing data.Open in a Space →
Push OTLP Logs
@Grafana create OTLP v1 logs in Loki with the following entry: service=ci-pipeline, level=info, message='Build 1234 completed successfully'. Timestamp should be now.Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@grafana check the health status of our production instance and show me which tenants have data in the store gateway
I checked your Grafana production instance. The server health is 'ok' — the web server is running and database connectivity is confirmed. For the store gateway, I found 4 active tenants with blocks in storage: 'team-frontend' (last updated 2 minutes ago), 'team-backend' (last updated 5 minutes ago), 'team-data' (last updated 1 minute ago), and 'team-infra' (last updated 3 minutes ago). All tenants appear to be actively writing metrics.
This example shows the MCP's monitoring capabilities — checking instance health and querying storage metadata. Requires OAuth2 with read access to Grafana's admin APIs. Health checks are lightweight, but store gateway queries may be slower if you have hundreds of tenants.
@grafana send OTLP logs for our new microservice deployment — service name 'checkout-v2', log level INFO, message 'deployment completed successfully'
I've sent the OTLP v1 log entry to Grafana Loki. The log was ingested with service name 'checkout-v2', severity INFO, timestamp 2025-06-15T14:32:01Z, and body 'deployment completed successfully'. You can query this log in Loki using the label filter {service_name="checkout-v2"}. The log is now available for dashboards and alerting rules.
This demonstrates the MCP's write capability for OpenTelemetry logs. Requires OAuth2 with write permissions to Loki. Be mindful of rate limits if you're sending high-volume logs — this is best for manual events or low-frequency operational signals, not application-level logging at scale.
@grafana check the ruler ring status and summarize which instances are healthy versus having issues
I retrieved the ruler ring status from Grafana Mimir. Out of 6 ruler instances in the hash ring, 5 are healthy and actively processing rules. Instance 'ruler-03' shows a stale heartbeat (last seen 4 minutes ago, threshold is 2 minutes) and is marked as UNHEALTHY. The ring is still operational because the remaining 5 instances cover the token ranges, but you should investigate 'ruler-03' for potential network or process issues.
This example pairs the MCP's ring-status tool with AI reasoning to triage distributed system health. Useful for on-call engineers who want a plain-English summary instead of raw ring topology. Requires read access to Mimir's internal APIs. The MCP returns structured data; the AI interprets it for actionability.
Use-case deep-dives
When Grafana MCP speeds up multi-cluster incident response
A 6-person SRE team running three Prometheus HA clusters uses this MCP during incident triage to check which replica is elected leader without opening the Grafana UI. The Get Distributor HA Tracker tool surfaces the answer in Switchy's chat, letting the on-call engineer confirm failover state while simultaneously querying logs and checking ring health. This works best when your team already uses Grafana Enterprise and needs to correlate infrastructure state across multiple tools in one workspace. If you're on Grafana Cloud or OSS without HA setups, most of these tools return empty or irrelevant data. The OAuth2 flow is straightforward, but you'll need admin-level API keys to access ring status endpoints. Use this MCP when your incident runbooks reference Grafana ring topology or OTLP ingestion health.
Grafana MCP for quarterly enterprise license checks
A 3-person platform engineering team at a mid-sized SaaS company runs quarterly audits to confirm Grafana Enterprise licenses are active across staging and production. The Get License Status tool lets them script these checks in Switchy without logging into each Grafana instance. They pair it with the Get Grafana Health Status tool to verify connectivity before pulling license data. This scenario only makes sense if you manage multiple Grafana Enterprise deployments and need a programmatic way to track license expiry dates. If you're on Grafana Cloud, license management happens in the vendor portal, not the API, so this MCP adds no value. The OAuth2 setup takes about 10 minutes per instance. Use this when compliance reporting is a recurring task and you want audit trails in your shared workspace.
When to use Grafana MCP for OTLP log ingestion troubleshooting
A 4-person data engineering team building a centralized observability pipeline uses the Create OTLP v1 Logs tool to test Loki ingestion from Switchy during pipeline development. They send sample OTLP payloads to staging Loki, then check the Get Index Gateway Ring Status tool to confirm the index gateway processed the writes. This shortens the feedback loop from 5 minutes (deploy, wait, check UI) to 30 seconds (send, verify, iterate). The MCP works well when your team is actively developing or debugging OTLP integrations and needs to inject test data without writing throwaway scripts. If you're just consuming logs from existing sources, the UI is faster. The 11-tool footprint is overkill for most teams; you'll realistically use 3-4 tools. Use this when you're building observability infrastructure, not just using it.
Frequently asked
What does the Grafana MCP let me do in Switchy?
It connects Switchy to your Grafana instance so AI can query observability data, check system health, and push OpenTelemetry logs. You can ask questions about your infrastructure's status, retrieve ring topology for distributed components like Mimir rulers or Loki index gateways, and verify license state — all without leaving the chat. It's for teams that want AI to read dashboards and telemetry, not just create them.
Do I need admin access to connect Grafana via OAuth?
You need a Grafana account with API access and the ability to create OAuth apps in your Grafana org. The MCP uses OAuth2, so you'll authorise Switchy to read health endpoints, ring status, and write OTLP logs on your behalf. If your Grafana instance enforces role-based access, the MCP inherits your permissions — it won't see data you can't see.
Can the Grafana MCP query my dashboards or run PromQL?
No. The MCP focuses on operational health checks and telemetry ingestion — things like distributor HA tracker status, store gateway tenants, and pushing OTLP logs to Loki. It doesn't read dashboard JSON or execute Prometheus queries. If you need AI to analyse time-series data, export the query results to a file and attach them to the chat.
How is this different from just using Grafana's API directly?
The MCP wraps Grafana's API so AI can call it in natural language. Instead of writing curl commands or Python scripts to check ring health or post logs, you ask Switchy and it picks the right tool. It's faster for ad-hoc questions during incidents, but if you're building automation pipelines, use the API directly.
Who on the team should connect the Grafana MCP?
Whoever owns your Grafana org and understands which data the team needs AI to access. Once connected, anyone in the Switchy workspace can invoke the tools, so the connector should be comfortable with that visibility. The MCP doesn't count against Grafana user seats, but it does make API calls under the connected account's rate limits.