analytics
Grafana MCP Gateway for AI Agents
Expose Grafana tools to Claude Code, Cursor, Codex, and other MCP clients through the local KosmoKrator MCP gateway.
7 functions 6 read 1 write API token auth
Grafana MCP Gateway
Expose Grafana to MCP clients with `kosmokrator mcp:serve --integration=grafana`.
If the client has never used KosmoKrator before, install it first, then register this integration as a stdio MCP server. The gateway exposes only the selected integration in the example below.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash kosmokrator mcp:gateway:install --integration=grafana --write=deny --json {
"mcpServers": {
"kosmokrator-grafana": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=grafana",
"--write=deny"
]
}
}
} Serve Manually
kosmokrator mcp:serve --integration=grafana --write=deny MCP Tool Names
KosmoKrator exposes integration tools through the gateway with stable names:
| MCP tool | Source function | Type |
|---|---|---|
integration__grafana__grafana_list_dashboards | grafana.grafana_list_dashboards | Read read |
integration__grafana__grafana_get_dashboard | grafana.grafana_get_dashboard | Read read |
integration__grafana__grafana_create_dashboard | grafana.grafana_create_dashboard | Write write |
integration__grafana__grafana_list_datasources | grafana.grafana_list_datasources | Read read |
integration__grafana__grafana_list_alerts | grafana.grafana_list_alerts | Read read |
integration__grafana__grafana_list_teams | grafana.grafana_list_teams | Read read |
integration__grafana__grafana_get_current_user | grafana.grafana_get_current_user | Read read |
Write Access
Start with --write=deny for read-only MCP clients. Use --write=ask or
--write=allow only when the client and workspace are trusted.