Grafana Analyzer
让AI助手直接分析你的Grafana监控数据 - A Model Context Protocol server for Grafana data analysis
What is Grafana Analyzer?
Grafana Analyzer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 让ai助手直接分析你的grafana监控数据 - a model context protocol server for grafana data analysis
让AI助手直接分析你的Grafana监控数据 - A Model Context Protocol server for Grafana data analysis
This server falls under the Monitoring & Observability category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 让AI助手直接分析你的Grafana监控数据 - A Model Context Protocol server for
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx grafana-mcp-analyzerConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Grafana Analyzer
The Grafana MCP Analyzer server lets AI assistants directly query and analyze Grafana monitoring data, connecting to Grafana HTTP APIs, MySQL, or custom data sources defined in a configuration file. It exposes eight MCP tools covering data retrieval, deep analysis, large dataset chunking, cache management, and health checks, allowing you to ask natural language questions about your infrastructure metrics without leaving your AI chat interface. The server is configuration-driven, so you define named queries in a JSON/YAML config file and the AI picks the right one based on your question.
Prerequisites
- Node.js 18+ installed
- A running Grafana instance or compatible data source (MySQL, HTTP API) with accessible endpoints
- A configuration file defining your data source queries (local file path or HTTPS URL)
- An MCP-compatible client such as Claude Desktop, Cursor, or VS Code with MCP support
Install the grafana-mcp-analyzer package
Install the package globally via npm so it can be run via npx or directly.
npm install -g grafana-mcp-analyzerCreate a configuration file
Create a JSON configuration file that defines your Grafana data sources and named queries. Each query entry should include the endpoint, authentication, and an optional systemPrompt to guide AI analysis.
{
"queries": [
{
"name": "cpu_usage",
"description": "CPU usage metrics from Grafana",
"type": "http",
"url": "https://your-grafana.example.com/api/datasources/proxy/1/query",
"headers": {
"Authorization": "Bearer YOUR_GRAFANA_API_KEY"
},
"systemPrompt": "Analyze CPU usage trends and identify anomalies."
}
]
}Add the server to your MCP client configuration
Edit your MCP client configuration file to add the grafana-mcp-analyzer server, pointing CONFIG_PATH to your configuration file.
{
"mcpServers": {
"grafana-analyzer": {
"command": "npx",
"args": ["grafana-mcp-analyzer"],
"env": {
"CONFIG_PATH": "/absolute/path/to/your/grafana-config.json",
"MAX_CHUNK_SIZE": "100",
"DATA_EXPIRY_HOURS": "24"
}
}
}
}Restart your MCP client
Save the configuration and restart Claude Desktop or your IDE. The analyzer server will be available as a set of tools for your AI assistant.
Verify connectivity
Ask your AI assistant to check the server health and list available queries to confirm the configuration file was loaded correctly.
Grafana Analyzer Examples
Client configuration
Example claude_desktop_config.json for the Grafana MCP Analyzer pointing to a local config file.
{
"mcpServers": {
"grafana-analyzer": {
"command": "npx",
"args": ["grafana-mcp-analyzer"],
"env": {
"CONFIG_PATH": "/Users/you/grafana-mcp-config.json",
"MAX_CHUNK_SIZE": "100",
"DATA_EXPIRY_HOURS": "24",
"SESSION_TIMEOUT_HOURS": "24"
}
}
}
}Prompts to try
Example prompts for analyzing Grafana monitoring data.
- "Analyze CPU performance for the past 24 hours and identify any spikes."
- "Provide deeper insights based on the CPU data you just retrieved."
- "List all available monitoring queries I can ask about."
- "Check the health of the Grafana analyzer and confirm all data sources are reachable."
- "Show cache statistics and clear any expired data."Troubleshooting Grafana Analyzer
CONFIG_PATH error on startup — server fails to load configuration
Ensure CONFIG_PATH is set to an absolute file path (not relative) or a valid HTTPS URL. The file must be valid JSON. Run 'node -e "JSON.parse(require('fs').readFileSync(process.env.CONFIG_PATH))"' to validate it before starting the server.
Grafana API requests return 401 or 403 errors
Verify your Grafana API key or Bearer token is correct and has read access to the target data sources. In Grafana, go to Administration > API Keys to create or verify key permissions.
Large datasets cause the AI to time out or truncate responses
Reduce MAX_CHUNK_SIZE to break data into smaller pieces (e.g. 50 KB). Use the chunk_workflow tool explicitly in your prompt for very large datasets, or increase DATA_EXPIRY_HOURS and use analyze_existing_data on cached results.
Frequently Asked Questions about Grafana Analyzer
What is Grafana Analyzer?
Grafana Analyzer is a Model Context Protocol (MCP) server that 让ai助手直接分析你的grafana监控数据 - a model context protocol server for grafana data analysis It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Grafana Analyzer?
Follow the installation instructions on the Grafana Analyzer GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Grafana Analyzer?
Grafana Analyzer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Grafana Analyzer free to use?
Yes, Grafana Analyzer is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Grafana Analyzer Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to Grafana Analyzer? Here are other popular monitoring & observability servers you can use with Claude, Cursor, and VS Code.
Netdata
★ 78.9kReal-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Kubeshark
★ 11.9keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
Mission Control
★ 4.9kSelf-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
Grafana
★ 3.0kThis MCP server enables natural-language querying of Grafana logs by automatically detecting log sources and service labels. It provides read-only access to log data with intelligent caching for efficient repeat queries.
Sentrux
★ 2.4kReal-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improvement of code quality. Pure Rust.
OpenInference
★ 986OpenTelemetry Instrumentation for AI Observability
Browse More Monitoring & Observability MCP Servers
Explore all monitoring & observability servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Grafana Analyzer in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Grafana Analyzer?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.