Skip to main content
Glama
xwamt

At-grafana

by xwamt

AT Grafana

中文

AT Grafana 是 AT 系列(与 at-terminal-seriesat-jumpserver-series 并列)中的一款 VS Code / Cursor 扩展。它将 Grafana 仪表盘和 Unified Alerting 引入 IDE,并通过共享的 @at-series/mcp-hub Protocol v1 向 Agents 暴露只读的 Grafana 元数据以及数据源查询(Prometheus、Loki 等)。

当前版本:0.1.0 — V1 功能完整。自动化测试套件:类型检查 + 292 项测试。针对真实 Grafana / 真实 MCP 客户端的冒烟检查仍列为待办,详见 docs/releases/0.1.0.md

功能特性

  • 多实例配置 — 标签、URL、Grafana Service Account Token(9.1+);令牌存储在 VS Code SecretStorage 中,绝不以明文形式出现在设置里

  • TLS 首次信任(Trust-On-First-Use) — 首次连接时提示确认证书指纹;指纹变化时安全失败(fail closed)

  • 仪表盘侧边栏 — Grafana 文件夹树、标题筛选、刷新;在嵌入式 Webview 中打开仪表盘

  • 告警侧边栏 — Unified Alerting 规则,实时状态、按文件夹分组、Firing 规则优先排序

  • 原生嵌入式页面 — 通过本地 127.0.0.1 反向代理在扩展侧注入 Authorization(令牌对 Webview 不可见),提供完全可交互的 Grafana 仪表盘 / 告警详情界面

  • 按实例的 Agent 访问开关 — “允许后台 Agent 访问”(默认关闭);只有已启用的实例才会出现在 MCP 工具中

  • 9 个 MCP 工具risk: read,安装 AT Series MCP 后自动批准):

    • 发现:grafana_list_instances

    • 管理:grafana_list_dashboardsgrafana_get_dashboardgrafana_list_foldersgrafana_list_alert_rulesgrafana_get_alert_rulegrafana_get_alert_history

    • 监控:grafana_list_datasourcesgrafana_query_datasource(仅支持 GET/POSTpath 限定在 /api/datasources/proxy/uid/<uid>/ 内,因此无法访问 Grafana 自身的 API;可配置时间范围 / 响应大小上限)

  • 共享 AT Series Hub — 为 Cursor / Kiro / Continue 提供统一的 AT Series MCP 入口;无需插件专属的 MCP 服务器

Related MCP server: Grafana MCP Server

本版本不包含

  • 单面板下钻(仅支持完整仪表盘)

  • 旧版 Alerting(仅支持 Unified Alerting)

  • 对 Grafana 或数据源的任何写入 / 静音 / 暂停操作

  • 多组织支持

  • 通过嵌入代理推送 Grafana Live / WebSocket

安装

  1. 构建 VSIX(或发布后使用发布资产):

    npm install
    npm run package   # produces at-grafana-0.1.0.vsix
  2. 在 VS Code / Cursor 中:扩展 → ⋯ → 从 VSIX 安装… 并选择该文件。

  3. 打开 AT Grafana 活动栏视图,然后运行 AT Grafana: Add Instance

快速开始

  1. 创建一个具有 Viewer 角色的 Grafana Service Account 并复制令牌。

  2. AT Grafana: Add Instance → 标签、基础 URL、令牌 → Test connection → 确认 TLS 指纹 → 保存。

  3. 浏览 Dashboards / Alerts;点击节点在 Webview 中打开原生页面。

  4. (可选,供 Agents 使用)编辑实例并启用 Allow background Agent access

  5. (可选)AT Grafana: Install/Repair AT Series MCP Config,然后重新连接 MCP 客户端。

完整操作指南:docs/usage.md · 中文

Agent 技能

技能

用途

at-grafana-mcp

通过 AT Grafana MCP 检查仪表盘 / 告警规则并查询 Prometheus/Loki 风格的数据

使用 skills CLI 安装:

npx skills add xwamt/At-grafana --skill at-grafana-mcp

开发

npm install
npm run typecheck
npm test
npm run build      # bundles dist/extension.js (+ webview + hub copy via package scripts)
npm run package    # produces at-grafana-<version>.vsix

F5 并打开此文件夹以启动扩展开发主机。

需要 Node.js 20+ 以及匹配 engines.vscode^1.85.0)的 VS Code / Cursor 主机。

文档

文档

说明

docs/features.md (中文)

功能概览

docs/usage.md (中文)

设置、Agent 访问、MCP 客户端

docs/releases/0.1.0.md

发布说明与完成定义(Definition-of-Done)记录

docs/requirements.md

完整需求(中文)

skills/at-grafana-mcp/SKILL.md

面向 Agent 的 MCP 目录指南

docs/decisions/

ADR-001 … ADR-005

docs/plans/2026-07-29-at-grafana-v1-implementation-plan.md

分阶段实施历史

at-terminal-series 脚手架生成(独立的 git 历史;已移除 SSH/SFTP/终端领域)— 参见 ADR-001

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
1wRelease cycle
4Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    Enables AI-powered integration with Grafana instances through 52 MCP tools for dashboard management, Prometheus/Loki queries, alerting, and administrative functions. Supports complete Grafana functionality including metrics exploration, log analysis, and incident response through natural language.
    80
    1
  • A
    license
    B
    quality
    B
    maintenance
    Enables AI assistants to interact with Grafana dashboards, datasources, alerts, incidents, and monitoring data through 43 comprehensive tools. Supports querying Prometheus metrics, Loki logs, managing incidents, and dashboard operations with full authentication support.
    43
    762
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables MCP-compatible agents to interact with Grafana instances for searching, creating, and updating dashboards, exploring logs via Loki, querying datasources, managing alerts, incidents, and on-call shifts, and accessing observability data.
    8
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Query Grafana logs, metrics, and dashboards from Cursor. Enables the AI to call your Grafana instance via tools without leaving the editor.
    8
    4
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • An MCP server giving access to Grafana dashboards, data and more.

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

  • Package intelligence MCP for AI agents — 22 tools, 19 ecosystems, AGPL SDK, free.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xwamt/At-grafana'

If you have feedback or need assistance with the MCP directory API, please join our Discord server