Skip to content
VS Code

mcp grafana for VS Code

io.github.dockndevai/mcp-grafana

Search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts.

client:VS Code transport:stdio runtime:npm

Install mcp grafana in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "grafana-url",
      "description": "GRAFANA_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "grafana-token",
      "description": "GRAFANA_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "grafana-mode",
      "description": "GRAFANA_MODE",
      "password": true
    }
  ],
  "servers": {
    "mcp-grafana": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "${input:grafana-url}",
        "GRAFANA_TOKEN": "${input:grafana-token}",
        "GRAFANA_MODE": "${input:grafana-mode}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

mcp grafana in other clients