Grafana MCP Integration
Connect Grafana to your AI agents through Weldable.
Weldable's Grafana MCP integration connects your AI agents to Grafana Cloud for querying dashboards, managing alerts, and retrieving metric data through natural language. Grafana Labs has been pushing AI capabilities with Grafana Assistant, an observability agent built into Grafana Cloud that responds to natural language queries. Weldable extends this by letting your agents pull Grafana data into workflows that span your entire toolchain, connecting monitoring insights to incident response, project management, and team communication.
Your agent takes plain English requests. Ask it to check a dashboard panel, list firing alerts, or query a specific metric, and Weldable routes the request to the correct Grafana API endpoint.
Use cases
Dashboard-driven status reports
Your agent queries specific dashboard panels in Grafana for key metrics like request latency, error rates, and resource utilization. It formats the current values into a status report and posts it to Slack at a scheduled time. Teams get a daily operational snapshot without anyone opening Grafana and manually reading dashboard values. This is especially useful for stakeholders who do not have Grafana access.
Alert-based incident creation
When a Grafana alert fires, your agent pulls the alert details, including the triggering metric, threshold, and current value. It creates a PagerDuty or Opsgenie incident with this context and posts a notification to Slack with a link to the relevant Grafana dashboard. The responder gets both the alert context and a direct path to investigate, reducing the time between alert and diagnosis.
Infrastructure trend analysis
Your agent queries Grafana for historical metric data across your infrastructure on a weekly basis. It identifies trends like steadily increasing memory usage, growing disk consumption, or rising request latency. The trend report highlights services that are approaching capacity limits and posts recommendations to the engineering channel. This shifts infrastructure management from reactive firefighting to planned capacity adjustments.
Cross-datasource correlation
Grafana connects to multiple data sources including Prometheus, Loki, Tempo, and InfluxDB. Your agent can query across these sources to correlate metrics with logs or traces. When an error spike appears in application metrics, the agent pulls related log entries from Loki and posts the correlated data to a Slack thread. This multi-source view gives responders a richer picture than any single data source provides.
SLA dashboard monitoring
Your agent queries Grafana dashboards that track SLA metrics like uptime percentage, response time P95, and error budget remaining. When any metric approaches a breach threshold, the agent alerts the team in Slack with the current value, the threshold, and how much budget remains. Monthly SLA reports get compiled automatically from the same dashboard data and posted to Google Docs for stakeholder review.
How it works
Connect your Grafana Cloud account using a service account token or API key. Weldable stores the credentials securely and handles authentication for every request. Your agent gets access to dashboards, alerts, and data source queries based on the token's permissions.
Describe what you need in natural language. Weldable resolves dashboard UIDs, panel IDs, and data source names automatically. Your agent can chain Grafana queries with other integrations: pull metric data, evaluate it against thresholds, and take action in PagerDuty, Slack, or your project tracker.
Tips
Dashboard UIDs are stable identifiers. Unlike dashboard IDs which can change, UIDs are persistent. When referencing dashboards in your agent workflows, use the UID from the dashboard URL for reliable targeting across Grafana updates.
Panel queries return raw data. When your agent queries a specific panel, it gets the underlying metric data, not a screenshot. This means the agent can process, compare, and format the numbers however you need them, which is more useful than a static image.
Alert rules define what matters. Grafana alert rules specify the conditions that trigger notifications. Your agent can read these rules to understand what thresholds are configured, which is useful for auditing whether alerting coverage matches your current SLA requirements.
Data source queries use the native query language. If your Grafana instance uses Prometheus, your agent writes PromQL. For Loki, it uses LogQL. Weldable translates your natural language request into the appropriate query language for the target data source.
Folder organization helps scope queries. Grafana organizes dashboards into folders. Tell your agent to look in a specific folder, like "production" or "platform," to scope queries and avoid pulling data from development or experimental dashboards.
Works well with
Connect your agent to Grafana
Connect your Grafana account and start automating with AI agents in minutes. Free to use, no credit card required.