mcpField
M
metricwatch

metricwatch

Local
github.com/CloudCorpRecordsData & Analytics0Updated 2w ago

About metricwatch

metricwatch is a CLI and MCP server that provides read access to Datadog accounts. It covers metrics, dashboards, logs, incidents, monitors, and downtimes using Datadog’s public API.

Key features

  1. 01Query metric timeseries and metadata
  2. 02List and inspect dashboards
  3. 03Search logs
  4. 04List and inspect incidents
  5. 05List monitors and downtimes

Use cases

  1. 01Investigate metric trends
  2. 02Review dashboard widgets
  3. 03Search logs for service errors
  4. 04Check incidents, monitors, and downtimes

MCP support

Exposes read-only Datadog account queries as MCP tools. Calls require `DATADOG_API_KEY` and `DATADOG_APP_KEY`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-metricwatch": {
"command": "npx",
"args": [
"-y",
"@reneturcios/metricwatch"
]
}
}
}
Run commandnpx -y @reneturcios/metricwatch

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/metricwatch0.1.0
ocighcr.io/cloudcorprecords/metricwatch:0.1.0

Tools

11

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
tonumberYesEnd of the time range as a Unix epoch timestamp in seconds.
fromnumberYesStart of the time range as a Unix epoch timestamp in seconds.
querystringYesDatadog metrics query expression, such as an aggregation over a metric with optional tag filters.

Details

From the project 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

npx @reneturcios/metricwatch list_metrics

Or run the container image:

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:

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_monitors
metricwatch 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:

npx -y @reneturcios/metricwatch mcp

MCP client configuration:

{
  "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

npm install
npm 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.