mcp-grafana
Grafana MCP server - interact with Grafana via the Model Context Protocol
What it is and what it does
mcp-grafana is a Model Context Protocol server that bridges Grafana and AI clients (Claude Desktop, Cursor, etc.), exposing Grafana's dashboards, datasources, and query capabilities through a standardized protocol. It lets AI assistants search and retrieve dashboards, extract specific dashboard properties via JSONPath, run queries against Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch, OpenSearch, Snowflake, Athena, InfluxDB, and Graphite datasources, and execute panel queries with custom time ranges and variable overrides.
The package is designed for integration with MCP-compatible clients rather than direct Python library use. It runs as a standalone server process (typically via uv) and communicates with a Grafana instance using environment variables for authentication (GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN). Several tool groups are disabled by default and must be explicitly enabled via command-line flags. The documentation emphasizes context-window management strategies for large dashboards, recommending summary and property-extraction tools over full dashboard retrieval.
Use it for:
- Enable Claude or Cursor to search and retrieve Grafana dashboards and extract specific properties without loading full JSON into context.
- Allow AI assistants to execute PromQL and LogQL queries against Prometheus and Loki datasources for real-time monitoring insights.
- Query ClickHouse, Snowflake, or Athena tables and execute SQL with Grafana macro substitution for data exploration.
- Run CloudWatch metric queries and Graphite render API calls from an AI chat interface.
- Execute dashboard panel queries with custom time ranges and variable overrides for dynamic analysis.
- Retrieve datasource metadata and query examples to help AI assistants learn and construct correct queries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An MCP server that exposes Grafana dashboards, datasources, and query execution (Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch, OpenSearch, Snowflake, Athena, InfluxDB, Graphite) to AI clients like Claude Desktop or Cursor.
Yes, if you use Grafana with Claude Desktop, Cursor, or another MCP-compatible AI client and want to query dashboards and datasources conversationally. The package is actively maintained, has no known vulnerabilities, and supports modern Python. Install friction is medium due to platform-specific wheels and the requirement to run as a server process rather than a library, but the setup is straightforward via uv. Not suitable if you need Grafana integration as a Python library for non-MCP applications.
Install
mcp-grafana on PyPI
pip
pip install mcp-grafanauv
uv add mcp-grafanapoetry
poetry add mcp-grafanaInstalling mcp-grafana
Before you install
Medium install friction due to platform-specific wheels, but active maintenance (last commit 2026-08-14, 3356 stars). Requires Python 3.10+. Designed for integration with uv and MCP clients rather than direct Python use.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
# Install via uv (recommended)
uvx mcp-grafana
# Or add to MCP client config (Claude Desktop, Cursor):
# {
# "mcpServers": {
# "grafana": {
# "command": "uvx",
# "args": ["mcp-grafana"],
# "env": {
# "GRAFANA_URL": "http://localhost:3000",
# "GRAFANA_SERVICE_ACCOUNT_TOKEN": "your-token"
# }
# }
# }
# }
Requires Grafana 9.0 or later for full functionality. Designed to run as an MCP server process, not as a Python library import.
Verify before relying
- Whether datasource-related operations work correctly with Grafana versions earlier than 9.0
- Performance characteristics when querying large dashboards or high-cardinality datasources
- Whether all optional tool groups (runpanelquery, examples, influxdb, etc.) are stable or experimental
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 678,538/month — #5,375 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mcp_grafana-1.1.0-py3-none-macosx_10_9_x86_64.whl; mcp_grafana-1.1.0-py3-none-macosx_11_0_arm64.whl; mcp_grafana-1.1.0-py3-none-manylinux_2_17_aarch64.whl; mcp_grafana-1.1.0-py3-none-manylinux_2_17_x86_64.whl; mcp_grafana-1.1.0-py3-none-musllinux_1_2_aarch64.whl; mcp_grafana-1.1.0-py3-none-musllinux_1_2_x86_64.whl; mcp_grafana-1.1.0-py3-none-win_amd64.whl; mcp_grafana-1.1.0-py3-none-win_arm64.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
awslabs.cloudwatch-mcp-serverExposes CloudWatch metrics, logs, alarms, and…
permissive · top 15,000 on PyPI
grafana-clientA Python client library for the Grafana HTTP…
permissive · top 15,000 on PyPI
grafana-foundation-sdkProvides Python types, builders, and tools for…
permissive · top 15,000 on PyPI
grafanalibGenerates Grafana dashboards from Python code,…
permissive · top 15,000 on PyPI
snowflake-labs-mcpA deprecated MCP server that previously…
unclear · top 15,000 on PyPI
blender-mcpBlenderMCP is a Model Context Protocol server…
permissive · top 15,000 on PyPI
mcp-proxy-for-awsBridges MCP clients to AWS-hosted MCP servers…
permissive · top 5,000 on PyPI
mcp-clickhouseAn MCP server that exposes ClickHouse database…
permissive · top 15,000 on PyPI
loki-logger-handlerA logging handler that sends Python log…
permissive · top 15,000 on PyPI
locust-pluginsExtends Locust with plugins for load testing…
permissive · top 5,000 on PyPI