grafana-mcp-observability

grafana-mcp-observability

Enables AI agents to query Grafana dashboards, alerts, and datasources for observability insights and incident investigation.

Category
访问服务器

README

grafana-mcp-observability

MCP server for Grafana — query dashboards, alerts, and datasources via AI agents.

python Grafana MCP License


What is this?

grafana-mcp-observability is an MCP (Model Context Protocol) server that exposes Grafana's observability stack to AI agents. It enables AI-driven incident investigation, alert triage, and dashboard querying — without requiring manual Grafana access.

Built for platform engineers who run Grafana with Prometheus, Loki, or Tempo as their observability backend.


Available Tools

Tool Description
list_dashboards List all Grafana dashboards by folder
get_dashboard Fetch a dashboard's panel definitions and queries
query_datasource Run a PromQL or LogQL query against a datasource
list_alerts List active and pending alert rules
get_alert_details Get labels, annotations, and state for a specific alert
list_datasources List configured datasources (Prometheus, Loki, Tempo, etc.)
get_annotations Fetch deployment or event annotations from dashboards

Quick Start

Prerequisites

  • Python 3.11+
  • Grafana instance with API access
  • Grafana Service Account token with Viewer role

Installation

git clone https://github.com/akkireddy-challa/grafana-mcp-observability
cd grafana-mcp-observability
pip install -r requirements.txt

Configuration

export GRAFANA_URL=https://grafana.example.com
export GRAFANA_TOKEN=<service-account-token>

Run

python server.py

MCP Client Config (Claude Desktop)

{
  "mcpServers": {
    "grafana": {
      "command": "python",
      "args": ["/path/to/grafana-mcp-observability/server.py"],
      "env": {
        "GRAFANA_URL": "https://grafana.example.com",
        "GRAFANA_TOKEN": "<your-token>"
      }
    }
  }
}

Security Model

  • Uses Grafana Service Account tokens — not user credentials
  • Token requires Viewer role only — no write access needed
  • No dashboard modifications or alert rule changes are possible
  • All queries are read-only
  • Token stored in environment variables, never in code

Use Cases at Telia

This pattern is used to allow AI agents to:

  • Investigate active alerts by querying Prometheus metrics in context
  • Correlate Loki log spikes with Grafana annotation events (deployments)
  • Summarize dashboard panel state for on-call briefings
  • Detect anomalous query patterns across multi-tenant Grafana orgs

Roadmap

  • [ ] get_traces — query Tempo distributed traces
  • [ ] create_annotation — mark AI-driven investigation events
  • [ ] silence_alert — create Alertmanager silences via MCP
  • [ ] Multi-org Grafana support
  • [ ] GitHub Actions workflow for CI validation

Related Projects

Repo Purpose
k8s-mcp-server Kubernetes cluster diagnostics via MCP
azure-mcp-platform Azure resource management via MCP
phoenix-mcp-eval LLM tracing and evaluation via MCP

License

MIT License. See LICENSE for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选