Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v13.0/developer-resources/mcp/set-up/install-with-uvx.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v13.0/developer-resources/mcp/set-up/install-with-uvx/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
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.
{
"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


