Grafana MCP Server
by itzhouqio.github.itzhouq/grafana-mcpv0.1.3
Read-only project-level Grafana MCP: Loki logs, metrics, traces, alerts, test/prod switching
context tax
queued
security
queued
cold start
queued
freshness
Active3d ago
Install Grafana MCP server
Install in Claude Code
claude mcp add grafana-itzhouq -e GRAFANA_TEST_PASSWORD='<grafana-test-password>' -e GRAFANA_PROD_PASSWORD='<grafana-prod-password>' -- npx -y grafana-mcpInstall in Cursor
{
"mcpServers": {
"grafana-itzhouq": {
"command": "npx",
"args": [
"-y",
"grafana-mcp"
],
"env": {
"GRAFANA_TEST_PASSWORD": "<grafana-test-password>",
"GRAFANA_PROD_PASSWORD": "<grafana-prod-password>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"grafana-itzhouq": {
"command": "npx",
"args": [
"-y",
"grafana-mcp"
],
"env": {
"GRAFANA_TEST_PASSWORD": "<grafana-test-password>",
"GRAFANA_PROD_PASSWORD": "<grafana-prod-password>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"grafana-itzhouq": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"grafana-mcp"
],
"env": {
"GRAFANA_TEST_PASSWORD": "<grafana-test-password>",
"GRAFANA_PROD_PASSWORD": "<grafana-prod-password>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"grafana-itzhouq": {
"command": "npx",
"args": [
"-y",
"grafana-mcp"
],
"env": {
"GRAFANA_TEST_PASSWORD": "<grafana-test-password>",
"GRAFANA_PROD_PASSWORD": "<grafana-prod-password>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GRAFANA_TEST_URL | — | — | Grafana base URL of the test environment, e.g. https://grafana.example.com |
| GRAFANA_TEST_USER | — | — | Grafana username for the test environment (prefer a dedicated Viewer-role account) |
| GRAFANA_TEST_PASSWORD | — | yes | Grafana password for the test environment |
| GRAFANA_PROD_URL | — | — | Grafana base URL of the production environment |
| GRAFANA_PROD_USER | — | — | Grafana username for the production environment |
| GRAFANA_PROD_PASSWORD | — | yes | Grafana password for the production environment |
| GRAFANA_ENV | — | — | Default environment for this project (test by default) |
| GRAFANA_APP | — | — | App label value used to scope Loki queries for this project |
Freshness
Active — last maintenance signal 3d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-07 · 3d ago · GitHub
Latest release
2026-10-07 · 3d ago · GitHub · v0.1.3
Package published
no data · npm/PyPI
Registry entry updated
2026-10-07 · 3d ago · official registry · v0.1.3
FAQ
›How do I install the Grafana MCP server in Claude Code?
Run: claude mcp add grafana-itzhouq -e GRAFANA_TEST_PASSWORD='<grafana-test-password>' -e GRAFANA_PROD_PASSWORD='<grafana-prod-password>' -- npx -y grafana-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Grafana require an API key?
Yes. It expects GRAFANA_TEST_PASSWORD, GRAFANA_PROD_PASSWORD, of which 2 are secrets.
›Can I use Grafana as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Grafana in the official MCP registry?
Yes, as io.github.itzhouq/grafana-mcp.
Alternatives to Grafana
Other monitoring & observability MCP servers.