Datadog Mcp

io.github.TANTIOPE由 GitHub 帳號 TANTIOPE 發布v1.0.9更新於 Oct 24, 2026

Full Datadog API access: monitors, logs, metrics, traces, dashboards, and observability tools

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理完整存取 Datadog 可觀測性資料:監控器、日誌、指標、追蹤、儀表板、事件、SLO 等。

可以做什麼
列出、搜尋、建立、更新、靜音與刪除監控器,支援試跑驗證與範本預覽;管理停機與主機及其標籤;讀取用量與帳單摘要並驗證 API 金鑰。搜尋與彙總日誌,檢視並編輯日誌管線、索引與封存。查詢、搜尋並檢視指標時序與中繼資料。搜尋與彙總 APM 追蹤、列出服務;搜尋、彙總、依時間分桶並去重事件與事件單。列出、取得、建立、更新與刪除儀表板、SLO、合成測試、筆記本與事件單;觸發合成測試執行。讀取 RUM 應用程式、事件、效能與工作階段瀑布;列出安全規則、訊號與發現;列出使用者與團隊。
適用情境
適合讓助理排查正式環境問題、關聯日誌、追蹤與指標、處理告警與事件單,或在聊天用戶端中管理 Datadog 監控器、儀表板、SLO 與合成測試,而不必開啟 Datadog 介面。
執行需求
透過 npm 套件 datadog-mcp 以 stdio 在本機執行(需要 Node.js,通常以 npx 啟動)。需要 Datadog API 金鑰(DD_API_KEY)與應用程式金鑰(DD_APP_KEY);非預設區域可選設 DD_SITE。金鑰的權限範圍決定哪些工具可用。需要能連線至 Datadog API 的網路。
安裝前請注意
伺服器持有 Datadog API 金鑰與應用程式金鑰,其權限範圍決定可存取的內容,建議使用最小權限金鑰。許多工具會寫入、修改或刪除資料(監控器、儀表板、SLO、事件單、合成測試、日誌管線、索引、封存、主機標籤、停機)。可用唯讀旗標或停用工具來限制。本專案由社群維護,與 Datadog 無隸屬關係。另提供 HTTP 傳輸模式,會將伺服器暴露於網路上。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Datadog Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Datadog MCP Server

[Quality gate] [CI/Release] [npm] [License] [Coverage]

DISCLAIMER: This is a community-maintained project and is not officially affiliated with, endorsed by, or supported by Datadog, Inc. This MCP server utilizes the Datadog API but is developed independently.

MCP server providing AI assistants with full Datadog observability access. Features grep-like log search, APM trace filtering with duration/status/error queries, smart sampling modes for token efficiency, and cross-correlation between logs, traces, and metrics. Supports both stdio (local) and http (remote/Kubernetes) transports.

Quick Start

Minimal Claude Desktop / VS Code / Cursor config — just the two required keys:

json
{  "mcpServers": {    "datadog": {      "command": "npx",      "args": ["-y", "datadog-mcp"],      "env": {        "DD_API_KEY": "your-api-key",        "DD_APP_KEY": "your-app-key"      }    }  }}

With optional tuning (EU site, custom default limits, longer log windows):

json
{  "mcpServers": {    "datadog": {      "command": "npx",      "args": ["-y", "datadog-mcp"],      "env": {        "DD_API_KEY": "your-api-key",        "DD_APP_KEY": "your-app-key",        "DD_SITE": "datadoghq.eu",        "MCP_DEFAULT_LIMIT": "50",        "MCP_DEFAULT_LOG_LINES": "200",        "MCP_DEFAULT_METRIC_POINTS": "1000",        "MCP_DEFAULT_TIME_RANGE": "24"      }    }  }}

To run as an HTTP server (e.g. inside a container or Kubernetes pod), add transport variables to the same env block:

json
"env": {  "DD_API_KEY": "your-api-key",  "DD_APP_KEY": "your-app-key",  "MCP_TRANSPORT": "http",  "MCP_PORT": "3000",  "MCP_HOST": "0.0.0.0"}

Configuration

Required environment variables

bash
DD_API_KEY=your-api-keyDD_APP_KEY=your-app-key

Optional environment variables

bash
DD_SITE=datadoghq.com  # Default. Use datadoghq.eu for EU, etc.
# Limit defaults (fallbacks when the AI doesn't specify)MCP_DEFAULT_LIMIT=50              # General tools default limitMCP_DEFAULT_LOG_LINES=200         # Logs tool default limitMCP_DEFAULT_METRIC_POINTS=1000    # Metrics timeseries data pointsMCP_DEFAULT_TIME_RANGE=24         # Default time range in hours
# Transport (alternative to CLI flags — useful in Kubernetes)MCP_TRANSPORT=stdio               # stdio | httpMCP_PORT=3000                     # HTTP portMCP_HOST=0.0.0.0                  # HTTP host

Optional flags

bash
--site=datadoghq.com     # Datadog site (overrides DD_SITE)--transport=stdio|http   # Transport mode (default: stdio)--port=3000              # HTTP port when using http transport--host=0.0.0.0           # HTTP host when using http transport--read-only              # Block all write operations--disable-tools=synthetics,rum,security    # Comma-separated list of tools to disable

Transports

TransportWhen to useEndpoints
stdio (default)Local MCP clients — Claude Desktop, Cursor, VS Coden/a (process stdin/stdout)
httpRemote / container / KubernetesPOST /mcp · GET /mcp (SSE) · DELETE /mcp · GET /health

Select with --transport=http or MCP_TRANSPORT=http.

Deployment

Docker

json
{  "mcpServers": {    "datadog": {      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "DD_API_KEY",        "-e", "DD_APP_KEY",        "-e", "DD_SITE",        "ghcr.io/tantiope/datadog-mcp"      ],      "env": {        "DD_API_KEY": "your-api-key",        "DD_APP_KEY": "your-app-key",        "DD_SITE": "datadoghq.com"      }    }  }}

Kubernetes

Use environment variables — not container args — for transport configuration:

yaml
env:  - name: DD_API_KEY    value: "your-api-key"  - name: DD_APP_KEY    value: "your-app-key"  - name: MCP_TRANSPORT    value: "http"  - name: MCP_PORT    value: "3000"  - name: MCP_HOST    value: "0.0.0.0"

Note: Kubernetes args: replaces the entire Dockerfile CMD, causing Node.js to receive the flags instead of your application. Environment variables avoid this issue.

Tools

ToolActionCategoryDescriptionRequired Scopes
monitorslistAlertingList monitors with optional filtersmonitors_read
monitorsgetAlertingGet monitor by IDmonitors_read
monitorssearchAlertingSearch monitors by querymonitors_read
monitorscreateAlertingCreate a new monitor; config is validated against a typed schema covering documented options (notifyNoData, renotifyInterval, thresholds, …) — unknown keys surface in warnings. Pass dry_run: true to validate without creating (uses /api/v1/monitor/validate, allowed in read-only mode).monitors_write
monitorsupdateAlertingUpdate an existing monitor; same validated schema as create; partial configs accepted; validation errors short-circuit before any HTTP call as EINVALID_MONITOR_CONFIG:monitors_write
monitorspreviewAlertingRender a monitor template (inline message or by monitor_id/id) with optional context of variables and conditionals. Returns {rendered, variablesUsed, variablesMissing, conditionalsResolved, tagConditionalsResolved}. Supports Datadog Mustache subset: variable substitution + six documented conditionals (is_alert, is_warning, is_no_data, is_recovery, is_alert_to_warning, is_warning_to_alert) + tag conditionals {{#is_match "tag" "val"}}/{{#is_exact_match "tag" "val"}} (and ^ negations); {{#each}}/partials throw EUNSUPPORTED_TEMPLATE_SYNTAX. Read-only.monitors_read
monitorstest_notificationAlertingKnown limitation: returns ENOT_SUPPORTED — Datadog has no public REST endpoint for triggering a test notification. Documentation pointer in response.n/a
monitorsdeleteAlertingDelete a monitormonitors_write
monitorsmuteAlertingMute a monitormonitors_write
monitorsunmuteAlertingUnmute a monitormonitors_write
monitorstopAlertingTop N monitors by alert frequency with real monitor names and context breakdown. WARNING: total_count includes renotifies/re-evaluations (Datadog emits a renotify event every renotify_interval minutes while Alert). For real fires use action=history.monitors_read
monitorshistoryAlertingCount and list real state transitions for one monitor over a time window. Filters by transitionType (default ["alert","alert recovery"] — fires+recoveries, excludes renotifies) and optional group. Returns {transitions: [...], count, meta} where count is the number of real transitions (e.g. for one always-Alert burn-rate monitor over 7d: 98 raw events vs 38 real transitions).monitors_read, events_read
dashboardslistVisualizationList all dashboardsdashboards_read
dashboardsgetVisualizationGet dashboard by IDdashboards_read
dashboardscreateVisualizationCreate a new dashboarddashboards_write
dashboardsupdateVisualizationUpdate a dashboarddashboards_write
dashboardsdeleteVisualizationDelete a dashboarddashboards_write
logssearchLogsSearch logs with query syntax and filterslogs_read_data, logs_read_index_data
logsaggregateLogsAggregate log data with groupBylogs_read_data
logs_pipelineslist, getLogs ConfigInspect log processing pipelines and their processorslogs_read_config
logs_pipelinescreate, update, delete, reorderLogs ConfigAuthor pipelines and processor chainslogs_write_config
logs_pipelinesget_orderLogs ConfigRead pipeline evaluation orderlogs_read_config
logs_indexeslist, getLogs ConfigInspect indexes (filter, retention, Flex tier, exclusion filters); create/delete are UI-only per Datadog and not exposedlogs_read_config
logs_indexesupdate, reorderLogs ConfigUpdate index filter/retention/quota and reorder evaluationlogs_write_config
logs_indexesget_orderLogs ConfigRead index evaluation orderlogs_read_config
logs_archiveslist, getLogs ConfigInspect log archives (S3 / GCS / Azure destinations); per-provider credential fields are forwarded unchangedlogs_read_archives
logs_archivescreate, update, delete, reorderLogs ConfigManage archive destinations; destination.type validated against `s3gcs
logs_archivesget_orderLogs ConfigRead archive evaluation orderlogs_read_archives
metricsqueryMetricsQuery timeseries data. Response meta includes rollupRequested (parsed from rollup(method, seconds), with methodInferred flag), rollupEffective (interval derived from returned pointlist intervals + deduped intervalsObserved for multi-series), and rollupOverridden: boolean so callers can detect when Datadog silently downsampled.metrics_read, timeseries_query
metricssearchMetricsSearch for metrics by namemetrics_read
metricslistMetricsList active metricsmetrics_read
metricsmetadataMetricsGet metric metadatametrics_read
tracessearchAPMSearch spans with filtersapm_read
tracesaggregateAPMAggregate trace dataapm_read
tracesservicesAPMList APM servicesapm_service_catalog_read
eventslistEventsList eventsevents_read
eventsgetEventsGet event by IDevents_read
eventscreateEventsCreate an eventevents_read
eventssearchEventsSearch events with v2 API and cursor pagination. Optional transitionType filter (e.g. ["alert","alert recovery"]) restricts to monitor state-transition events — without it, source:alert includes renotifies. For monitor-specific fires use monitors action=history. Optional timezone adds *Local ISO 8601 siblings to every timestamp. Zero-result responses include a diagnostics array hinting at the cause (UNINDEXED_TAG_PREFIX, NARROW_TIME_RANGE, RESTRICTIVE_SOURCE_FILTER).events_read
eventshistogramEventsServer-side bucketing of events by hour_of_day, day_of_week, or day_of_month in an IANA timezone (DST-safe via Intl.DateTimeFormat). Accepts the same transitionType filter as search so monitor histograms can exclude renotifies. Cursor-paginates the underlying search; cap at limits.maxEventsForHistogram (default 5000, MCP_MAX_EVENTS_HISTOGRAM env var). When the cap is hit, returns bucketCountIncomplete: true and nextCursor for continuation.events_read
eventsaggregateEventsClient-side aggregation by monitor_name, source, etc.events_read
eventstopEventsTop N event groups by count with generic groupBy support (deployments, configs, alerts, etc.). Groups without context tags are included as "no_context"events_read
eventstimeseriesEventsTime-bucketed alert trends (hourly/daily counts)events_read
eventsincidentsEventsDeduplicate alerts into incidents with Trigger/Recover pairingevents_read
incidentslistIncidentsList incidentsincident_read
incidentsgetIncidentsGet incident by IDincident_read
incidentssearchIncidentsSearch incidentsincident_read
incidentscreateIncidentsCreate an incidentincident_write
incidentsupdateIncidentsUpdate an incidentincident_write
incidentsdeleteIncidentsDelete an incidentincident_write
sloslistSLOsList SLOs. Each item exposes query, monitorIds, monitorTags, groups, and a UI url so round-trips (get → edit → update) preserve definition fields.slos_read
slosgetSLOsGet SLO by ID (same projection as list).slos_read
sloscreateSLOsCreate an SLOslos_write
slosupdateSLOsUpdate an SLOslos_write
slosdeleteSLOsDelete an SLOslos_write
sloshistorySLOsGet SLO historyslos_read
syntheticslistSyntheticsList synthetic testssynthetics_read
syntheticsgetSyntheticsGet test by public IDsynthetics_read
syntheticscreateSyntheticsCreate a testsynthetics_write
syntheticsupdateSyntheticsUpdate a testsynthetics_write
syntheticsdeleteSyntheticsDelete a testsynthetics_write
syntheticstriggerSyntheticsTrigger a test runsynthetics_write
syntheticsresultsSyntheticsGet test resultssynthetics_read
downtimeslistDowntimesList downtimesmonitors_downtime
downtimesgetDowntimesGet downtime by IDmonitors_downtime
downtimescreateDowntimesCreate a downtimemonitors_downtime
downtimesupdateDowntimesUpdate a downtimemonitors_downtime
downtimescancelDowntimesCancel a downtimemonitors_downtime
downtimeslistByMonitorDowntimesList downtimes for a monitormonitors_downtime
hostslistInfrastructureList hostshosts_read
hoststotalsInfrastructureGet host totalshosts_read
hostsmuteInfrastructureMute a hosthosts_read
hostsunmuteInfrastructureUnmute a hosthosts_read
rumapplicationsRUMList RUM applicationsrum_read
rumeventsRUMSearch RUM eventsrum_read
rumaggregateRUMAggregate RUM datarum_read
rumperformanceRUMGet Core Web Vitals (LCP, FCP, CLS, FID, INP)rum_read
rumwaterfallRUMGet session timeline with resources/actions/errorsrum_read
securityrulesSecurityList security rulessecurity_monitoring_rules_read
securitysignalsSecuritySearch security signalssecurity_monitoring_signals_read
securityfindingsSecurityList security findingssecurity_monitoring_findings_read
notebookslistNotebooksList notebooksnotebooks_read
notebooksgetNotebooksGet notebook by IDnotebooks_read
notebookscreateNotebooksCreate a notebooknotebooks_write
notebooksupdateNotebooksUpdate a notebooknotebooks_write
notebooksdeleteNotebooksDelete a notebooknotebooks_write
userslistAdminList usersuser_access_read
usersgetAdminGet user by IDuser_access_read
teamslistAdminList teamsteams_read
teamsgetAdminGet team by IDteams_read
teamsmembersAdminList team membersteams_read
tagslistInfrastructureList all tagshosts_read
tagsgetInfrastructureGet tags for a hosthosts_read
tagsaddInfrastructureAdd tags to a hosthosts_read
tagsupdateInfrastructureUpdate host tagshosts_read
tagsdeleteInfrastructureDelete host tagshosts_read
usagesummaryBillingUsage summaryusage_read
usagehostsBillingHost usageusage_read
usagelogsBillingLog usageusage_read
usagecustom_metricsBillingCustom metrics usageusage_read
usageindexed_spansBillingIndexed spans usageusage_read
usageingested_spansBillingIngested spans usageusage_read
authvalidateAuthTest API and App key validity—

Limit Control

AI assistants have full control over query limits. The MCP_DEFAULT_* environment variables only set the fallback used when the AI doesn't specify a limit — they do NOT cap what the AI can request.

ToolDefaultParameterDescription
Logs200limitLog lines to return
Metrics (timeseries)1000pointLimitData points per series (controls resolution)
General tools50limitResults to return

Tool-level token reduction features (compact: true on logs, sample: "diverse" | "spread" | "first", field projections, diagnostics) are surfaced in each tool's MCP description and chosen by the AI at call time.

Notable behaviors

A handful of patterns worth knowing about — the AI can discover the rest from tool descriptions.

  • Renotifies vs real fires. monitors top and events search with source:alert count every renotify Datadog emits (one every renotify_interval while a monitor is Alert). To get actual state transitions, use monitors history (defaults to transitionType: ["alert","alert recovery"]) or pass transitionType to events search.
  • DST-safe time buckets. events histogram buckets by hour_of_day / day_of_week / day_of_month in any IANA timezone via Intl.DateTimeFormat. Cursor-paginates the underlying search; cap controlled by MCP_MAX_EVENTS_HISTOGRAM (default 5000) with bucketCountIncomplete + nextCursor on overflow.
  • Validate before create. monitors create with dry_run: true calls /api/v1/monitor/validate instead of persisting. Allowed in --read-only mode.
  • Monitor template preview. monitors preview renders a notification against a context payload — variable substitution + Datadog's six documented conditionals (is_alert, is_warning, is_no_data, is_recovery, is_alert_to_warning, is_warning_to_alert) + the tag conditionals {{#is_match "tag" "val"}} (substring) and {{#is_exact_match "tag" "val"}} (exact), with ^ negations and OR'd multiple comparison values (resolved against context.variables; case-sensitive). {{#each}} and partials throw EUNSUPPORTED_TEMPLATE_SYNTAX.
  • SLO round-trip. slos get projects query, monitorIds, monitorTags, groups, and a UI url so you can edit and feed back into slos update without dropping definition fields.
  • Cross-correlation. logs(sample:"diverse") → pull dd.trace_id → traces(query:"trace_id:<id>") → metrics(query:"p95:trace.express.request{service:...}") (root metric without .duration for percentiles).

Deep links

Every query response includes a datadog_url field built for your configured DD_SITE — datadoghq.com (default), .eu, us3 / us5 / ap1.datadoghq.com, or ddog-gov.com. Supported on logs, metrics, traces, events, monitors, rum, slos.

Contributing

Contributions are welcome! Feel free to open an issue or a pull request if you have any suggestions, bug reports, or improvements to propose.

License

This project is licensed under the Apache License, Version 2.0.

來源:README.md,提交 29f2696

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.9最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分