Data as of
Grafana MCP Server for Claude Code: Setup & Config
Claude Code: Connect MCP assistants to Grafana dashboards, datasources, alerts, and incident workflows.
Grafana MCP Server Claude Code configuration
Choose Claude Code configuration scope
For Grafana MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.
Add Grafana MCP Server to Claude Code
Use the mcp-grafana entry below in mcpServers. Keep Grafana MCP Server's documented stdio connection fields and your other Claude Code entries.
Check Grafana MCP Server in Claude Code
Grafana MCP Server: Inspect claude mcp list and /mcp status.
Config file · Project scope: .mcp.json at the repository root
{
"mcpServers": {
"mcp-grafana": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "<URL of your Grafana instance>",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
}
}
}
}claude mcp add-json --scope project 'mcp-grafana' '{"type":"stdio","command":"uvx","args":["mcp-grafana"],"env":{"GRAFANA_URL":"<URL of your Grafana instance>","GRAFANA_SERVICE_ACCOUNT_TOKEN":"<Grafana service-account token>"}}'Grafana in Claude Code: stdio checks
- If Grafana MCP Server fails to start, check uvx mcp-grafana (from uv, for Python tools), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
- Grafana MCP Server: check GRAFANA_SERVICE_ACCOUNT_TOKEN, GRAFANA_URL; keep credentials out of shared .mcp.json.
- Grafana MCP Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Tools
- add_activity_to_incident, alerting_manage_routing, alerting_routing_write
Grafana MCP Server — details. Claude Code guide
Frequently asked questions
Register Grafana MCP Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.
Claude Code's mcp-grafana example uses stdio.
Grafana MCP Server's Claude Code configuration invokes uvx mcp-grafana (from uv, for Python tools).
Claude Code's Grafana MCP Server example references GRAFANA_SERVICE_ACCOUNT_TOKEN, GRAFANA_URL. Check these names if startup or authentication fails; the example alone does not distinguish required from optional values.
Grafana MCP Server's stored list contains 40 tools, including add_activity_to_incident, alerting_manage_routing, alerting_routing_write. Compare those names with Claude Code's connected tool list; the stored list is not a live check.