让AI助手直接分析你的Grafana监控数据 - A Model Context Protocol server for Grafana data analysis
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"grafana": {
"env": {
"CONFIG_PATH": "https://raw.githubusercontent.com/SailingCoder/grafana-mcp-analyzer/main/config/grafana-config-play.js",
"MAX_CHUNK_SIZE": "100"
},
"command": "grafana-mcp-analyzer"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
English | 中文文档
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'grafana-mcp-analyzer' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked grafana-mcp-analyzer against OSV.dev.
Click any tool to inspect its schema.
devops_analysisAnalyze monitoring data and provide professional DevOps insights and optimization recommendations
candlestick_analysisAnalyze candlestick chart data including price trends, support/resistance levels, trading opportunities and risk assessment
cpu_utilization_analysisAnalyze CPU utilization metrics and provide performance optimization suggestions
Be 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 analytics
MCP Server for GCP environment for interacting with various Observability APIs.
⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
MCP server for InsightSentry financial data API - market data, options, screeners, and more
MCP server for Google Lighthouse performance metrics
MCP Security Weekly
Get CVE alerts and security updates for Grafana Mcp Analyzer and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
让 AI 直接读懂你的监控数据,成为你的专属智能运维助手!
想象一下这样的场景:
繁杂的监控图表,AI 辅助你一键解读。你无需再逐图筛查,真正实现从 图表到洞察 的闭环分析体验!
Grafana MCP Analyzer 基于 MCP (Model Context Protocol) 协议,赋能Claude、ChatGPT等AI助手具备以下超能力:
💡 架构新模式:会话缓存 → 逐步获取数据 → 渐进式深入分析 → 缓存复用,让AI分析更准确、更高效。
npm install -g grafana-mcp-analyzer
环境要求:Node.js 18+ | 安装指南
Cursor设置 → “MCP” → 服务配置(以Cursor为例):
{
"mcpServers": {
"grafana": {
"command": "grafana-mcp-analyzer",
"env": {
"CONFIG_PATH": "https://raw.githubusercontent.com/SailingCoder/grafana-mcp-analyzer/main/config/grafana-config-play.js",
"MAX_CHUNK_SIZE": "100"
}
}
}
}
注:CONFIG_PATH支持绝对路径、远程路径,推荐使用远程路径快速体验。
如需连接自有数据,可在 CONFIG_PATH 路径下创建配置文件:(grafana-config-play.js 示例 👉 点此查看 )
如果你只想快速体验示例,可跳过此步骤,直接执行第四步。
/**
* 基于Grafana Play演示实例的配置文件
* 以下配置文件内容来源:https://raw.githubusercontent.com/SailingCoder/grafana-mcp-analyzer/main/config/grafana-config-play.js
* Request 配置方式:支持 http api 和 curl
*/
const config = {
// Grafana服务器地址
baseUrl: 'https://play.grafana.org',
// 默认请求头
defaultHeaders: {
'Content-Type': 'application/json',
'Accept': 'application/json, text/plain, */*'
},
// 健康检查配置
healthCheck: {
url: 'api/health'
},
// 查询定义
queries: {
// Price Only, Hollow Candles
// 使用HTTP API格式
// 数据源:https://play.grafana.org/d/candlestick/candlestick?orgId=1&from=2021-07-13T22:13:30.740Z&to=2021-07-13T22:46:18.921Z&timezone=utc&viewPanel=panel-7
candlestick_priceOnly_hollowCandles: {
url: 'api/ds/query',
method: 'POST',
params: {
ds_type: 'grafana-testdata-datasource',
requestId: 'SQR279'
},
headers: {
'accept': 'application/json, text/plain, */*',
'accept-language': 'zh-CN,zh;q=0.9',
'cache-control': 'no-cache',
'content-type': 'application/json',
'origin': 'https://play.grafana.org',
'pragma': 'no-cache',
'priority': 'u=1, i',
'referer': 'https://play.grafana.org/d/candlestick/candlestick?orgId=1&from=2021-07-13T22:13:30.740Z&to=2021-07-13T22:46:18.921Z&timezone=utc&viewPanel=panel-7',
'sec-ch-ua': '"Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'traceparent': '00-f0f1243b82acf0e362fd1f836565154a-fc3a173d3190c9df-01',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36',
'x-dashboard-title': 'Candlestick',
'x-dashboard-uid': 'candlestick',
'x-datasource-uid': 'PD8C576611E62080A',
'x-grafana-device-id': '49c7d4ecdeee88ab5dde64deffa8ea2e',
'x-grafana-org-id': '1',
'x-panel-id': '7',
'x-panel-plugin-id': 'candlestick',
'x-panel-title': 'Price Only, Hollow Candles',
'x-plugin-id': 'grafana-test
... [View full README on GitHub](https://github.com/SailingCoder/grafana-mcp-analyzer#readme)