Skip to main content
Grafana is an open-source platform for monitoring and observability. By connecting Grafana to Nekt, your AI agent can query metrics, search dashboards, analyze logs and traces, and create annotations across your infrastructure in real time.

Adding Grafana as an MCP

Before you start, make sure the MCP Server is set up. See MCPs for how MCPs work.
  1. Go to Activate → MCPs, click New MCP and choose Grafana.
  2. Name your MCP and describe what it is used for. The agent reads the description to choose between MCPs of the same provider.
  3. Setup access. To authenticate, you need a service account token from your Grafana instance.
    1. In Grafana, create a new service account.
    2. Grant it the Viewer role, or the Editor role if you want the agent to use write tools.
    3. Generate a token for the service account.
    Provide the following fields:
    • Grafana URL (Required): Base URL of your Grafana instance — a Grafana Cloud stack (https://<stack>.grafana.net) or a self-hosted deployment.
    • Service account token (Required): Token of a Grafana service account with access to the dashboards, datasources and alerts you want to use.
  4. Select tools. Pick the tools your agents can use. See Available tools below.
  5. Click Save. On Growth and Custom plans, choose who can use it; see Access levels.

Example prompts

  • “Are there any active alerts firing right now?”
  • “Search for the infrastructure overview dashboard and summarize its panels.”
  • “Run a PromQL query to show the error rate over the last 30 minutes.”
  • “Check the Loki logs for any authentication failures in the past hour.”
  • “Create a new annotation marking a production deployment.”

Available tools

Choose which of these tools your agents can use in Select tools.

Read tools

Write tools

Troubleshooting

  • Token expired or revoked: If your service account token is deleted or expires, the MCP shows that it needs to reconnect. Generate a new token in Grafana and update the credentials from the MCP’s page in Nekt.
  • Permission denied on writes: If the agent fails to create annotations or update dashboards, verify that the Grafana service account has the Editor role. The Viewer role is only sufficient for reading data.

Need help?

Contact our support team if you have trouble connecting Grafana.