Grafana Cloud MCP 远程 MCP 服务器 – 官方端点、工具列表与一键连接指南
Grafana 官方远程 MCP 服务器(Grafana Cloud)。AI 代理可通过 OAuth 搜索仪表板、查询 Prometheus/Loki 数据源并管理事件。
本页收录其官方远程端点、传输协议、认证方式、全部工具 Schema、实时可用性拨测与安全审计结果,并为 Cursor、Claude Code、VS Code、ChatGPT 等 10 大客户端提供一键接入指引。
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"grafana": {
"url": "https://mcp.grafana.com/mcp"
}
}
}claude mcp add --transport http grafana https://mcp.grafana.com/mcp
Or add to .vscode/mcp.json:
{
"servers": {
"grafana": {
"type": "http",
"url": "https://mcp.grafana.com/mcp"
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://mcp.grafana.com/mcp - Complete the browser OAuth 2.1 login flow when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"grafana": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.grafana.com/mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"grafana": {
"serverUrl": "https://mcp.grafana.com/mcp"
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"grafana": {
"url": "https://mcp.grafana.com/mcp"
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.grafana] url = "https://mcp.grafana.com/mcp"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"grafana": {
"type": "streamableHttp",
"url": "https://mcp.grafana.com/mcp"
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"grafana": {
"httpUrl": "https://mcp.grafana.com/mcp"
}
}
}🧰 Grafana Cloud MCP 工具与 Schema(47)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| search_dashboards ~34 tok | 🟢 Read | Search Grafana dashboards by title or tag. | — |
| get_dashboard_by_uid ~33 tok | 🟢 Read | Get a dashboard's full JSON model. | — |
| get_dashboard_summary ~34 tok | 🟢 Read | Get a compact summary of a dashboard. | — |
| get_dashboard_property ~38 tok | 🟢 Read | Extract a specific JSONPath value from a dashboard. | — |
| update_dashboard ~33 tok | 🟠 Write | Create or update a Grafana dashboard. | — |
| get_dashboard_panel_queries ~35 tok | 🟢 Read | Get queries used by dashboard panels. | — |
| list_datasources ~30 tok | 🟢 Read | List configured datasources. | — |
| get_datasource_by_uid ~31 tok | 🟢 Read | Get a datasource by UID. | — |
| get_datasource_by_name ~31 tok | 🟢 Read | Get a datasource by name. | — |
| query_prometheus ~31 tok | 🟢 Read | Query a Prometheus datasource. | — |
| list_prometheus_metric_names ~34 tok | 🟢 Read | List Prometheus metric names. | — |
| list_prometheus_metric_metadata ~35 tok | 🟢 Read | List Prometheus metric metadata. | — |
| list_prometheus_label_names ~33 tok | 🟢 Read | List Prometheus label names. | — |
| list_prometheus_label_values ~35 tok | 🟢 Read | List values of a Prometheus label. | — |
| query_loki_logs ~32 tok | 🟢 Read | Query logs from a Loki datasource. | — |
| list_loki_label_names ~30 tok | 🟢 Read | List Loki label names. | — |
| list_loki_label_values ~32 tok | 🟢 Read | List values of a Loki label. | — |
| query_loki_stats ~30 tok | 🟢 Read | Query Loki index statistics. | — |
| list_incidents ~29 tok | 🟢 Read | List Grafana incidents. | — |
| create_incident ~30 tok | 🟠 Write | Create a Grafana incident. | — |
| add_activity_to_incident ~34 tok | 🟠 Write | Add an activity note to an incident. | — |
| resolve_incident ~30 tok | 🟠 Write | Resolve a Grafana incident. | — |
| list_alert_rules ~30 tok | 🟢 Read | List Grafana alert rules. | — |
| get_alert_rule_by_uid ~31 tok | 🟢 Read | Get an alert rule by UID. | — |
| create_alert_rule ~31 tok | 🟠 Write | Create a Grafana alert rule. | — |
| update_alert_rule ~31 tok | 🟠 Write | Update a Grafana alert rule. | — |
| delete_alert_rule ~31 tok | 🔴 Destructive | Delete a Grafana alert rule. | — |
| list_contact_points ~31 tok | 🟢 Read | List alert contact points. | — |
| create_contact_point ~32 tok | 🟠 Write | Create an alert contact point. | — |
| list_oncall_schedules ~32 tok | 🟢 Read | List Grafana OnCall schedules. | — |
| get_oncall_shift ~28 tok | 🟢 Read | Get an OnCall shift. | — |
| get_current_oncall_users ~33 tok | 🟢 Read | List users currently on call. | — |
| list_teams ~27 tok | 🟢 Read | List Grafana teams. | — |
| list_users_by_org ~31 tok | 🟢 Read | List users in the organization. | — |
| query_tempo_search ~29 tok | 🟢 Read | Search Tempo traces. | — |
| query_tempo_trace ~30 tok | 🟢 Read | Fetch a Tempo trace by ID. | — |
| list_pyroscope_profile_types ~34 tok | 🟢 Read | List Pyroscope profile types. | — |
| list_pyroscope_label_names ~33 tok | 🟢 Read | List Pyroscope label names. | — |
| list_pyroscope_label_values ~33 tok | 🟢 Read | List Pyroscope label values. | — |
| fetch_pyroscope_profile ~34 tok | 🟢 Read | Fetch a Pyroscope flamegraph profile. | — |
| get_current_time ~32 tok | 🟢 Read | Get the current Grafana server time. | — |
| search_folders ~29 tok | 🟢 Read | Search Grafana folders. | — |
| create_folder ~29 tok | 🟠 Write | Create a Grafana folder. | — |
| list_sift_investigations ~32 tok | 🟢 Read | List Sift investigations. | — |
| get_sift_investigation ~33 tok | 🟢 Read | Get a Sift investigation result. | — |
| get_sift_analysis ~31 tok | 🟢 Read | Get a Sift analysis finding. | — |
| get_assertions_summary ~34 tok | 🟢 Read | Get service health assertions summary. | — |
🛡️ 安全评级、质量与上下文 Token 审计
- No prompt-injection or hidden-character anomalies detected in tool descriptions
- Streamable HTTP primary endpoint (current 2025-03-26 transport)
- OAuth 2.1 with PKCE S256 enforced
- Official first-party endpoint operated by the vendor
- Manually verified by RemoteMCP.net
🔐 OAuth 2.1 与安全
- 认证方式
- OAuth 2.1
- 动态客户端注册(DCR)
- ✅ 支持
- PKCE S256
- ✅ 支持
- 受保护资源元数据
- https://mcp.grafana.com/.well-known/oauth-protected-resource
📡 官方远程端点与传输协议
远程端点 https://mcp.grafana.com/mcp 采用 Streamable HTTP(流式 HTTP,2025-03-26 规范)。Streamable HTTP 在单一 POST 端点上完成 JSON-RPC 双向交互,是当前 MCP 规范推荐的传输方式,可直接被 Claude、Cursor、VS Code 等客户端以 URL 形式接入,无需 npx mcp-remote 桥接。
接入前可将端点粘贴至本站 在线 MCP Inspector 实测 initialize / tools/list 握手,确认真实协议行为。
🔐 认证与权限机制
认证方式为 OAuth 2.1。首次连接时客户端会收到 401 挑战并从 WWW-Authenticate 头解析 RFC 9728 受保护资源元数据,随后自动完成授权服务器发现(RFC 8414)、动态客户端注册(DCR)与 PKCE S256 浏览器授权流程——你只需在浏览器中点击一次授权,无需手工粘贴任何密钥。
🛡️ 上下文开销与安全审计
该服务端当前登记 47 个工具,全部定义合计约 1515 tokens,会在每次请求时注入模型系统提示词。安全评级为 A+,官方直营来源。工具名与 Schema 越精简,对上下文窗口的"税"越低;可用 feecalculator.app 估算每次调用的边际成本。
🧩 主流客户端快速接入
本站为 Grafana Cloud MCP 生成了 Cursor / Claude Code / VS Code / ChatGPT / Windsurf / Kiro / Codex / Cline / Gemini 等 10 大客户端的专属配置——包括一键 deeplink、claude mcp add 命令与 JSON/TOML 片段。下方选择你的客户端即可查看 1 分钟接入步骤。代表性工具包括 search_dashboards、get_dashboard_by_uid、get_dashboard_summary、get_dashboard_property、update_dashboard 等。
📖 Grafana Cloud 详解
Grafana Cloud MCP — Remote MCP Server
Grafana's remote MCP is the same toolset as the open-source mcp-grafana server but hosted — agents can search dashboards, run PromQL and LogQL, page on-call schedules and declare incidents, all scoped by Grafana Cloud RBAC.
Official Grafana Cloud MCP Endpoint & Transport Architecture
- Endpoint URL:
https://mcp.grafana.com/mcp - Transport: Streamable HTTP
Streamable HTTP is the current MCP transport (2025-03-26 spec): a single URL accepts JSON-RPC POSTs and may stream responses over SSE, so one endpoint serves both simple and streaming workloads. Grafana Cloud MCP does not publish a separate legacy SSE endpoint, so your client must speak Streamable HTTP.
Authentication, Scopes & Permission Boundaries
Grafana Cloud MCP uses OAuth 2.1 — the first request returns a 401 Unauthorized challenge with a WWW-Authenticate header pointing at the authorization metadata. Compliant clients (Cursor, Claude, VS Code, ChatGPT) handle the whole flow — PKCE and Dynamic Client Registration, so no manual client setup is needed — and simply open a browser consent screen.
All 6 cataloged tools are read-only — Grafana Cloud MCP cannot mutate your account data, which makes it safe to connect broadly.
Common Troubleshooting & Connection Tips
- 401 Unauthorized on connect — that's expected; the server is OAuth-protected. Let your client complete the browser consent flow, or inspect the endpoint in our OAuth debugger to see the exact
WWW-Authenticatechallenge. - "Session expired" / stale
Mcp-Session-Id— just re-sendinitialize; stateless clients can ignore session headers entirely. - Backed by the open-source grafana/mcp-grafana codebase.
- Datasource access depends on your Grafana Cloud stack's permissions.
🚀 如何接入 Grafana Cloud MCP 远程 MCP
- 获取远程端点 — 复制官方端点 https://mcp.grafana.com/mcp。
- 写入客户端配置 — 在 Cursor 的 mcp.json / Claude Code CLI / 其他客户端中添加该 URL(见下方分客户端指南)。
- 授权并验证 — 完成浏览器 OAuth 授权后,在本站 Inspector 中运行 initialize 与 tools/list 验证连通性。
🔌 Grafana Cloud × 各客户端连接指南
❓ 常见问题
Grafana Cloud MCP 远程 MCP 服务器是官方提供的吗?
本条目标记为「官方直营」。端点由 Grafana Labs 官方运营,所有收录端点均经过真实 MCP initialize 握手验证。
如何在 Claude / Cursor 中连接 Grafana Cloud MCP?
复制远程端点 https://mcp.grafana.com/mcp:Claude Code 执行 claude mcp add --transport http grafana https://mcp.grafana.com/mcp;Cursor 可直接使用本页的一键 deeplink 或在 ~/.cursor/mcp.json 中添加 { "mcpServers": { "grafana": { "url": "https://mcp.grafana.com/mcp" } } }。首次调用会自动弹出 OAuth 2.1 授权页面。
连接时返回 401 或需要密钥怎么办?
401 是 OAuth 2.1 的正常挑战响应——客户端会依据 RFC 9728 元数据自动完成授权,无需手工处理。若授权流程中断,可用本站 OAuth 2.1 Debugger 定位 PRM / DCR / CORS 配置问题。
本地 stdio MCP 和这个远程 MCP 有什么区别?
本地 MCP 通过 npx/uvx 在你的机器上启动 stdio 子进程,依赖本地运行时且密钥以明文写入配置文件;远程 MCP 是 Grafana Labs 托管的 HTTPS 端点,免安装、支持 OAuth 2.1 授权流,且同一端点可跨桌面与移动端复用。详见 本地 vs 远程 MCP 对比。