Menu
Enterprise
Open source
Install with uvx
uv is Astral’s Python package manager and toolchain. uvx runs a command from a published package in an isolated environment, without installing that package globally. It is similar to npx for Node.js.
Use uvx to run the Grafana MCP server without installing a release binary yourself.
What you’ll achieve
You add the server to your MCP client configuration (for example, Claude Desktop or Cursor) and connect to Grafana using a URL and a service account token.
Before you begin
- Install
uvand ensureuvxis in your$PATH. - Have a Grafana instance (Grafana 9.0 or later) and a service account token.
Add the server to your MCP client
Add the following to your MCP client configuration file. Replace http://localhost:3000 with your Grafana URL if it is different, and YOUR_SERVICE_ACCOUNT_TOKEN with your service account token.
JSON
{
"mcpServers": {
"grafana": {
"command": "uvx",
"args": ["mcp-grafana"],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<YOUR_SERVICE_ACCOUNT_TOKEN>"
}
}
}
}For Grafana Cloud, set GRAFANA_URL to your instance URL, for example https://myinstance.grafana.net.
Next steps
- Install with Docker if you prefer to run the server in a container.
- Configure authentication for service accounts and RBAC.
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video

Getting started with managing your metrics, logs, and traces using Grafana
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
Video

Getting started with Grafana dashboard design
In this webinar, you'll learn how to design stylish and easily accessible Grafana dashboards that tell a story.
Video

Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.
Choose a product
Viewing: v13.0 (latest)
Find another version
Scroll for more