KosmoKrator

analytics

Grafana MCP, CLI, and Lua Integration for AI Agents

Grafana integration docs for AI agents: MCP gateway setup, Grafana CLI commands, Lua API reference, credentials, and function schemas.

7 functions 6 read 1 write API token auth

Grafana for agents

Credentials can be configured manually in web or CLI hosts.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
grafana
route_slug
grafana
package
grafana
auth_strategy
api_token API token
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
true

Quick Links

Grafana MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Grafana.

Grafana CLI Matrix

Use these pages for direct Grafana CLI workflows in scripts, CI, cron, and agent wrappers.

Function Catalog

FunctionTypeParametersDescription
grafana.grafana_list_dashboards Read read 3 Search and list Grafana dashboards. Returns dashboard UIDs, titles, and folder info. Use query to filter by title.
grafana.grafana_get_dashboard Read read 1 Get a Grafana dashboard by its UID. Returns the full dashboard definition including panels, queries, and settings.
grafana.grafana_create_dashboard Write write 3 Create or update a Grafana dashboard. Provide the full dashboard JSON with panels, queries, and settings. Set overwrite to true to update an existing dashboard.
grafana.grafana_list_datasources Read read 0 List all configured datasources in Grafana. Returns datasource IDs, names, types (e.g., Prometheus, InfluxDB), and access info.
grafana.grafana_list_alerts Read read 2 List Grafana alerts. Optionally filter by dashboard ID or panel ID. Returns alert states, thresholds, and conditions.
grafana.grafana_list_teams Read read 2 List all Grafana teams. Returns team IDs, names, emails, and member counts with pagination support.
grafana.grafana_get_current_user Read read 0 Get the currently authenticated Grafana user. Useful for verifying credentials and identifying the connected account.