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 分