Grafana Analyzer

v1.0.0Monitoring & Observabilitystable

让AI助手直接分析你的Grafana监控数据 - A Model Context Protocol server for Grafana data analysis

aianalyzerchatgptclaudecursor
Share:
43
Stars
0
Downloads
0
Weekly
0/5

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

Monitoring data analysis
Grafana integration
Metrics insights from AI
SailingCoder

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedApr 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx grafana-mcp-analyzer

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-analyzer
2

Create 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."
    }
  ]
}
3

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"
      }
    }
  }
}
4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "grafana-mcp-analyzer": { "command": "npx", "args": ["-y", "grafana-mcp-analyzer"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides