Grafana MCP Server — Hosted Devops, Any AI Agent
MCP Server shield Key RequiredDashboards, alerting, Loki logs, Tempo traces, Prometheus metrics via Grafana's official MCP
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"grafana-cloud-observability": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-grafana",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the list_dashboards tool to list all grafana dashboards with title, folder, tags, and url for quick navigation”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
description Overview
Grafana Cloud Observability MCP
Official proxy MCP — Dashboards, alerting, Loki logs, Tempo traces, Prometheus metrics via Grafana's official MCP
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-grafana
Overview
Grafana Cloud Observability is a proxy MCP server that forwards requests directly to the official Grafana MCP endpoint at https://mcp.grafana.com/mcp. All tools are maintained by Grafana Labs — new tools are available immediately without any Aerostack update.
Type: Proxy (hosted by Grafana Cloud)
Auth: Bearer token via GRAFANA_API_TOKEN
Self-hosted Grafana? Use your instance-specific endpoint:
https://<stack-id>.grafana.net/api/mcp
Available Tools
- list_dashboards — List all dashboards with title, folder, tags, and URL for quick navigation
- get_dashboard — Retrieve a specific dashboard by UID with all panels, variables, and data sources
- query_loki_logs — Query logs from Loki using LogQL with label and line filters
- list_alerts — List all alerting rules with status, labels, and notification channels
- query_prometheus — Execute PromQL queries for metric analysis with time range support
Configuration
| Variable | Required | Description | How to Get |
|---|---|---|---|
GRAFANA_API_TOKEN |
Yes | Grafana Cloud API Token or Service Account Token | grafana.com → My Account → Access Policies → Create token |
Setup
Add to Aerostack Workspace
- Go to app.aerostack.dev/workspaces → Create Workspace
- Inside your workspace → Add Server → search "Grafana Cloud Observability"
- Enter your
GRAFANA_API_TOKENwhen prompted — stored encrypted, injected automatically
Once added, every AI agent in your workspace can query Grafana tools automatically.
Usage
Example Prompts
"Show me all dashboards tagged with 'kubernetes'"
"Query Loki for error logs from the payment service in the last hour"
"List all firing alerts and summarize what's broken"
Direct API Call
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-grafana \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-GRAFANA-API-TOKEN: your-token' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_loki_logs","arguments":{"query":"{app=\"nginx\"} |= \"error\""}}}'
License
MIT
terminal Tools (5)
Available tools on this MCP server. Each tool can be called directly from any AI agent.
list_dashboards #1 List all Grafana dashboards with title, folder, tags, and URL for quick navigation
get_dashboard #2 Retrieve a specific dashboard by UID with all panels, variables, annotations, and data source configuration
query_loki_logs #3 Query logs from Grafana Loki using LogQL with label and line filters, aggregations, and time ranges
list_alerts #4 List all Grafana alerting rules with status, labels, evaluation interval, and notification channels
query_prometheus #5 Execute PromQL queries against Grafana's Prometheus-compatible data sources for metric analysis
Details
Publisher
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
More in Devops
Browse Devops MCPs →Asana Project Management
by @aerostack
Tasks, projects, sections, comments, teams, custom fields via Asana's official MCP
Atlassian Cloud
by @aerostack
Jira issues, sprints, Confluence pages via Atlassian's official MCP
Cloudflare Platform
by @aerostack
Cloudflare Workers, KV, R2, D1, Pages, DNS via Cloudflare's official MCP
Datadog Observability
by @aerostack
Dashboards, monitors, logs, metrics, incidents, SLOs, APM traces via Datadog's official MCP
Figma Design
by @aerostack
Files, frames, components, comments, variables via Figma's official MCP
GitHub API
by @aerostack
GitHub repos, PRs, issues, branches, code search via GitHub's official hosted MCP
Frequently asked questions
What is the Grafana MCP server and what can it do? +
The Grafana MCP server is hosted on Aerostack and exposes these tools to your AI agent: `list_dashboards`, `get_dashboard`, `query_loki_logs`, `list_alerts`, `query_prometheus`. You get one hosted URL — no self-hosting — that works from Claude, Cursor, ChatGPT, Gemini, VS Code, or any MCP-compatible client, and you can share it with your team or combine it with other MCP servers in a workspace.
Is the Grafana MCP server hosted, or do I have to run it myself? +
It's hosted on Aerostack's edge infrastructure — you don't deploy or maintain anything. Add it to a workspace and you get one authenticated URL, with secrets encrypted, that any AI agent or editor can connect to. Use it solo or share the same URL across your whole team.
Which AI agents and editors can use the Grafana MCP server? +
Any MCP client: Claude and Claude Code, Cursor, ChatGPT, Gemini, Windsurf, Cline, VS Code, and custom agents. Because it's one hosted URL, the same Grafana MCP server works everywhere — and you can compose it with other MCP servers, skills, and functions behind a single workspace URL.
How do I install the Grafana MCP server in Claude Desktop? +
Add the following to your Claude Desktop config (`claude_desktop_config.json`): ```json { "mcpServers": { "@aerostack/mcp-grafana": { "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-grafana"] } } } ``` Then restart Claude Desktop and the tools will appear automatically.
How do I use the Grafana MCP server in Cursor? +
In Cursor, open **Settings → MCP** and add: ```json { "name": "@aerostack/mcp-grafana", "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-grafana"] } ``` Save and reload Cursor. The MCP tools will be available in Agent mode.
Does Grafana MCP require authentication? +
Yes. Grafana uses Bearer token authentication. Set your token as a workspace secret in the Aerostack dashboard.