Metricwatch

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 1, 2026

Datadog metrics, dashboards, logs, incidents, and monitors from your MCP client.

已验证STDIO仅桌面安全与监控数据与分析

概览

AI 生成的概览

只读的 MCP 服务器,让助手查询 Datadog 的指标、仪表板、日志、事件、监控器和静默时段。

可以做什么
  • 按时间范围查询指标时序,并列出指标名称及其类型、单位和描述
  • 列出仪表板,并按 id 获取单个仪表板及其组件与布局
  • 用日志查询语句在可选时间范围内搜索日志事件
  • 列出事件,并按 id 获取单个事件
  • 列出监控器(可按名称过滤),并按整数 id 获取单个监控器
  • 列出静默时段(计划中的监控器静默)
适用场景
适合在排查问题或复盘故障时让助手查看 Datadog 遥测数据:查看指标走势、读取仪表板、搜索错误日志,或查询某个监控器与事件。它只读,适合探索与汇报,不适合修改 Datadog 配置。
运行要求
通过 npx 或 Docker 镜像以 stdio 在本地运行。需要 Datadog API key(DATADOG_API_KEY)和 application key(DATADOG_APP_KEY),分别以 DD-API-KEY 和 DD-APPLICATION-KEY 请求头发送。可选设置 DATADOG_SITE 指向其他 Datadog 站点,默认 datadoghq.com。需要访问 Datadog API 的网络。
安装前请注意
需要两个 Datadog 凭据 DATADOG_API_KEY 和 DATADOG_APP_KEY,可读取账户中的指标、日志、仪表板、事件和监控器,请放在客户端的环境配置中。查询与日志搜索会发送到所配置站点的 Datadog API。README 称密钥不会出现在输出中,但分享结果前仍应检查。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Metricwatch,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

metricwatch

metricwatch gives an MCP client or a terminal read access to a Datadog account: metric timeseries queries and metric metadata, dashboards, log search, incidents, monitors, and downtimes. It is a clean-room rebuild of the Datadog MCP tool surface from Datadog's public API documentation, covering the read core listed below.

Two credentials are required, because the Datadog API requires both on every call: an API key in DATADOG_API_KEY and an application key in DATADOG_APP_KEY. They are sent as the DD-API-KEY and DD-APPLICATION-KEY headers and never appear in output. Set DATADOG_SITE (for example datadoghq.eu) to target a different Datadog site; the default is datadoghq.com and calls go to https://api.<site>. When either key is missing, every call fails with an error that names the missing variable.

Install

bash
npx @reneturcios/metricwatch list_metrics

Or run the container image:

bash
docker run -i -e DATADOG_API_KEY -e DATADOG_APP_KEY ghcr.io/cloudcorprecords/metricwatch

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

Every MCP tool is also a CLI subcommand. Tool arguments are passed as one JSON object with --json:

bash
export DATADOG_API_KEY=<redacted>export DATADOG_APP_KEY=<redacted>
metricwatch query_timeseries --json '{"from": 1700000000, "to": 1700003600, "query": "avg:system.cpu.user{*}"}'metricwatch list_metrics --json '{"limit": 20}'metricwatch get_dashboard --json '{"dashboard_id": "abc-123"}'metricwatch search_logs --json '{"query": "service:web status:error", "limit": 25}'metricwatch list_monitorsmetricwatch get_monitor --json '{"monitor_id": 42}'
metricwatch --version

Results print as JSON. Exit codes: 0 on success, 1 when an API call fails (including a missing key), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/metricwatch mcp

MCP client configuration:

json
{  "mcpServers": {    "metricwatch": {      "command": "npx",      "args": ["-y", "@reneturcios/metricwatch", "mcp"],      "env": {        "DATADOG_API_KEY": "your Datadog API key",        "DATADOG_APP_KEY": "your Datadog application key"      }    }  }}

Tools

ToolInput (required in bold)What it does
query_timeseriesfrom, to, queryQueries a metric timeseries (v1 query endpoint).
list_metricsfrom, limitLists metric names in the account.
get_metric_metadatametric_nameReturns one metric's type, unit, and description.
list_dashboardslimitLists dashboards.
get_dashboarddashboard_idReturns one dashboard with its widgets.
search_logsquery, from, to, limitSearches log events (v2 logs search).
list_incidentslimitLists incidents.
get_incidentincident_idReturns one incident.
list_monitorsname, limitLists monitors, optionally name-filtered.
get_monitormonitor_idReturns one monitor by integer id.
list_downtimescurrent_onlyLists downtimes (monitor silences).

Out of scope for this read core: APM trace/span detail, synthetics, RUM, notebooks, SLO administration, event writes, incident creation or mutation, and on-call — see BUILD-REPORT.md.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network (fake fetch fixtures)npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

来源:README.md,提交 fbed34a

工具

11

query_timeseries

Query a Datadog metric timeseries over a time range using the metrics query language.

输入参数to必填from必填query必填

list_metrics

List metric names available in the Datadog account.

输入参数fromlimit

get_metric_metadata

Get metadata for one metric: its type, unit, and description.

输入参数metric_name必填

list_dashboards

List dashboards in the Datadog account.

输入参数limit

get_dashboard

Get one dashboard by id, including its widgets and layout.

输入参数dashboard_id必填

search_logs

Search Datadog log events with a log query over an optional time range.

输入参数tofromlimitquery必填

list_incidents

List Datadog incidents.

输入参数limit

get_incident

Get one incident by id.

输入参数incident_id必填

list_monitors

List monitors, optionally filtered by name.

输入参数namelimit

get_monitor

Get one monitor by its integer id.

输入参数monitor_id必填

list_downtimes

List downtimes (scheduled monitor silences).

输入参数current_only

版本历史

1
  1. v0.1.0最新Nov 1, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分