CP Server for SRE - Query Prometheus/Grafana/Loki with Claude using natural language
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"sre-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
CP Server for SRE - Query Prometheus/Grafana/Loki with Claude using natural language
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationBe the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml / analytics
Persistent memory using a knowledge graph
Dynamic problem-solving through sequential thought chains
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
MCP Server for GCP environment for interacting with various Observability APIs.
MCP Security Weekly
Get CVE alerts and security updates for Sre Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
让 Claude 直接查询 Prometheus / Grafana / Loki,用自然语言做 SRE 监控与故障诊断。
基于 Model Context Protocol (MCP) 构建,Go 语言实现。
一个 MCP Server,把 SRE 日常用的监控系统暴露给大语言模型(Claude),实现:
┌─────────────────────────────────────────────────┐
│ Claude Desktop / Claude Code │
│ (MCP Host) │
└────────────────────┬────────────────────────────┘
│ JSON-RPC 2.0 (stdio)
▼
┌─────────────────────────────────────────────────┐
│ SRE-MCP-Server (Go) │
│ │
│ ┌────────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ Prometheus │ │ Grafana │ │ Loki │ │
│ │ Tools │ │ Tools │ │ Tools │ │
│ │ (6 个) │ │ (4 个) │ │ (4 个) │ │
│ └─────┬──────┘ └────┬─────┘ └──────┬────────┘ │
│ │ │ │ │
│ ┌─────┴─────────────┴──────────────┴─────────┐ │
│ │ AI Analyzer (4 个) │ │
│ │ 异常检测 · 信号关联 · 根因分析 · 容量预测 │ │
│ └────────────────────────────────────────────┘ │
└────────────────────────────────────────────────┘
│ │ │
Prometheus Grafana Loki
:9090 :3000 :3100
| Tool | 功能 |
|---|---|
promql_instant | 即时查询 — 获取指标当前值 |
promql_range | 范围查询 — 获取时间序列数据 |
prom_targets | 查看所有监控目标及健康状态 |
prom_alerts | 获取当前触发的告警 |
prom_metadata | 查询指标元数据(类型/含义) |
prom_label_values | 枚举标签值(发现服务/实例) |
| Tool | 功能 |
|---|---|
grafana_dashboards | 列出所有 Dashboard |
grafana_dashboard_detail | 获取 Dashboard 面板与查询详情 |
grafana_annotations | 查询事件标注(部署/变更/事故) |
grafana_alerts | Grafana 告警规则与状态 |
| Tool | 功能 |
|---|---|
loki_query | LogQL 日志查询 |
loki_labels | 日志标签枚举 |
loki_series | 日志流发现 |
loki_stats | 日志量统计 |
| Tool | 功能 |
|---|---|
analyze_anomaly | 时序异常检测(Z-score / 3-sigma / IQR) |
correlate_signals | Metrics-Logs 跨信号关联分析 |
rca_suggest | 智能根因推荐(自动多维诊断) |
capacity_forecast | 容量趋势预测(线性回归) |
git clone https://github.com/3490165738/sre-mcp-server.git
cd sre-mcp-server
docker compose -f configs/docker-compose.yml up -d
验证服务:
go mod tidy
go build -o sre-mcp-server.exe ./cmd/ # Windows
go build -o sre-mcp-server ./cmd/ # macOS / Linux
编辑 Claude Desktop 配置(Settings → Developer → Edit Config):
{
"mcpServers": {
"sre-monitor": {
"command": "C:\\path\\to\\sre-mcp-server.exe",
"args": [
"--prometheus-url", "http://localhost:9090",
"--grafana-url", "http://localhost:3000",
"--grafana-api-key", "",
"--loki-url", "http://localhost:3100"
]
}
}
}
重启 Claude Desktop,开始对话:
💬 "当
... [View full README on GitHub](https://github.com/yuan7-bao/sre-mcp-server#readme)