mcp-grafana: An MCP Server for Seamless Grafana Integration
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
mcp-grafana is a Model Context Protocol (MCP) server designed to provide comprehensive access to your Grafana instance and its surrounding ecosystem. It enables powerful programmatic interaction with Grafana dashboards, datasources, alerting, and more, facilitating advanced automation and integration with AI assistants.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
The mcp-grafana repository hosts a Model Context Protocol (MCP) server specifically built for Grafana. This server acts as a bridge, providing extensive programmatic access to your Grafana instance and its entire ecosystem. It empowers developers and AI assistants to interact with Grafana's core functionalities, including dashboards, datasources, alerting, incidents, and more, enabling advanced automation, intelligent querying, and dynamic reporting.
With mcp-grafana, you can seamlessly integrate Grafana's rich observability data and management capabilities into external applications, scripts, or AI-driven workflows, enhancing operational efficiency and data-driven decision-making.
Installation
Getting started with mcp-grafana is straightforward, with several installation options available. The recommended method uses uvx for ease of deployment.
Quick Start with uvx
If you have uv installed, uvx can automatically download and run the server:
{
"mcpServers": {
"grafana": {
"command": "uvx",
"args": ["mcp-grafana"],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
}
}
}
}
For Grafana Cloud, replace GRAFANA_URL with your instance URL, for example, https://myinstance.grafana.net. Ensure your Grafana service account has the necessary permissions.
Other Installation Methods
- Docker Image: Use the pre-built Docker image from Docker Hub. For STDIO mode, which is common for AI assistant integration, explicitly override the default SSE mode:
docker run --rm -i -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> grafana/mcp-grafana -t stdio - Binary Download: Download the latest release from the releases page and add it to your
$PATH. - Helm Chart: Deploy to Kubernetes using the Helm chart from the Grafana helm-charts repository.
Examples
mcp-grafana exposes a rich set of tools to interact with your Grafana instance. Here are some common use cases:
- Dashboard Management: Search for dashboards, retrieve compact summaries, extract specific properties using JSONPath, or even update and create new dashboards. Tools like
get_dashboard_summaryandget_dashboard_propertyare crucial for efficient context window management when working with large dashboards. - Data Source Querying: Execute queries against various data sources like Prometheus, Loki, InfluxDB, ClickHouse, CloudWatch, Athena, Snowflake, and Elasticsearch/OpenSearch. This includes querying metrics, logs, metadata, and even log patterns.
- Alerting and Incidents: List and manage alert rules, view notification policies, and interact with Grafana Incident to search, create, and update incidents.
- OnCall Management: Integrate with Grafana OnCall to list schedules, get shift details, and identify current on-call users.
- Navigation and Rendering: Generate accurate deep links to Grafana dashboards, panels, and Explore views. You can also render dashboard panels or entire dashboards as PNG images, useful for reports or automated alerts. This requires the Grafana Image Renderer service.
- Admin Tasks: List teams, users, roles, and permissions within your Grafana organization.
Many advanced data source and administrative tools are disabled by default and can be enabled via CLI flags like --enabled-tools.
Why use mcp-grafana?
mcp-grafana offers significant advantages for anyone looking to extend Grafana's capabilities programmatically:
- Comprehensive Grafana Access: Provides a unified interface to almost every aspect of Grafana, from data querying to administrative tasks.
- AI/LLM Integration Ready: Designed with the Model Context Protocol, making it ideal for integration with AI assistants and large language models for intelligent observability.
- Flexible Deployment: Supports multiple deployment strategies, including
uvx, Docker, direct binary, and Helm, fitting various operational environments. - Granular Control: Offers extensive configuration options, including tool enablement/disablement and fine-grained RBAC permissions, allowing you to tailor access and functionality to your specific needs.
- Observability Built-in: Includes Prometheus metrics, OpenTelemetry tracing, and structured log export, ensuring that the server itself is observable and easy to monitor.
- Read-Only Mode: A dedicated
--disable-writeflag provides a secure read-only mode, perfect for AI assistants or environments where data modification should be restricted.
Links
- GitHub Repository: grafana/mcp-grafana
- Model Context Protocol: modelcontextprotocol.io
- Grafana Service Accounts: Documentation
- Grafana Image Renderer: Documentation
- Grafana RBAC: Documentation
- uv Installation: Documentation
Related repositories
Similar repositories that may be relevant next.

GoBooks: A Curated List of Essential Golang Books for All Skill Levels
July 20, 2026
GoBooks is a highly popular GitHub repository offering a meticulously curated collection of Golang books, catering to developers from beginners to advanced practitioners. It serves as a comprehensive resource for finding the right learning materials on topics like concurrency, performance, and system design, making it easier to navigate the vast Go ecosystem.

Zero: The AI Coding Agent for Your Local Terminal
July 6, 2026
Zero is an innovative AI coding agent designed for your local terminal, offering powerful capabilities to inspect repositories, edit files, run commands, and utilize browser/terminal helpers. It provides durable local sessions while giving users full control over the AI model and permission levels. This tool empowers developers with a customizable and secure AI assistant directly within their development environment.

no-mistakes: AI-Driven Git Proxy for Flawless Pull Requests
June 30, 2026
no-mistakes is an innovative Git proxy that streamlines the pull request workflow by ensuring code quality before it reaches your remote. It uses an AI-driven validation pipeline in a disposable worktree, automatically applying safe fixes and escalating complex issues for human review. This tool helps developers maintain clean, high-quality codebases and open perfect PRs effortlessly.
Gogcli: Google Workspace Management from Your Terminal
June 24, 2026
Gogcli is a powerful command-line interface for Google Workspace, allowing users to manage Gmail, Calendar, Drive, Docs, Sheets, and many other services directly from their terminal. It is designed for both interactive use and robust automation, providing predictable output, agent safety features, and support for multiple accounts.
Source repository
Open the original repository on GitHub.
14 counted GitHub visits