Datadog MCP Server
Provides tools for querying and managing Datadog observability data, including logs, metrics, traces, monitors, dashboards, and alerts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Datadog MCP Servershow me the latest error logs in production"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Datadog MCP Server
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:
{
"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):
{
"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:
"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"
}Related MCP server: datadog-mcp
Configuration
Required environment variables
DD_API_KEY=your-api-key
DD_APP_KEY=your-app-keyOptional environment variables
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 limit
MCP_DEFAULT_LOG_LINES=200 # Logs tool default limit
MCP_DEFAULT_METRIC_POINTS=1000 # Metrics timeseries data points
MCP_DEFAULT_TIME_RANGE=24 # Default time range in hours
# Transport (alternative to CLI flags — useful in Kubernetes)
MCP_TRANSPORT=stdio # stdio | http
MCP_PORT=3000 # HTTP port
MCP_HOST=0.0.0.0 # HTTP hostOptional flags
--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 disableTransports
Transport | When to use | Endpoints |
| Local MCP clients — Claude Desktop, Cursor, VS Code | n/a (process stdin/stdout) |
| Remote / container / Kubernetes |
|
Select with --transport=http or MCP_TRANSPORT=http.
Deployment
Docker
{
"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:
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
Tool | Action | Category | Description | Required Scopes |
| list | Alerting | List monitors with optional filters |
|
| get | Alerting | Get monitor by ID |
|
| search | Alerting | Search monitors by query |
|
| create | Alerting | Create a new monitor; |
|
| update | Alerting | Update an existing monitor; same validated schema as |
|
| preview | Alerting | Render a monitor template (inline |
|
| test_notification | Alerting | Known limitation: returns | n/a |
| delete | Alerting | Delete a monitor |
|
| mute | Alerting | Mute a monitor |
|
| unmute | Alerting | Unmute a monitor |
|
| top | Alerting | Top N monitors by alert frequency with real monitor names and context breakdown. WARNING: |
|
| history | Alerting | Count and list real state transitions for one monitor over a time window. Filters by |
|
| list | Visualization | List all dashboards |
|
| get | Visualization | Get dashboard by ID |
|
| create | Visualization | Create a new dashboard |
|
| update | Visualization | Update a dashboard |
|
| delete | Visualization | Delete a dashboard |
|
| search | Logs | Search logs with query syntax and filters |
|
| aggregate | Logs | Aggregate log data with groupBy |
|
| list, get | Logs Config | Inspect log processing pipelines and their processors |
|
| create, update, delete, reorder | Logs Config | Author pipelines and processor chains |
|
| get_order | Logs Config | Read pipeline evaluation order |
|
| list, get | Logs Config | Inspect indexes (filter, retention, Flex tier, exclusion filters); |
|
| update, reorder | Logs Config | Update index filter/retention/quota and reorder evaluation |
|
| get_order | Logs Config | Read index evaluation order |
|
| list, get | Logs Config | Inspect log archives (S3 / GCS / Azure destinations); per-provider credential fields are forwarded unchanged |
|
| create, update, delete, reorder | Logs Config | Manage archive destinations; | gcs |
| get_order | Logs Config | Read archive evaluation order |
|
| query | Metrics | Query timeseries data. Response |
|
| search | Metrics | Search for metrics by name |
|
| list | Metrics | List active metrics |
|
| metadata | Metrics | Get metric metadata |
|
| search | APM | Search spans with filters |
|
| aggregate | APM | Aggregate trace data |
|
| services | APM | List APM services |
|
| list | Events | List events |
|
| get | Events | Get event by ID |
|
| create | Events | Create an event |
|
| search | Events | Search events with v2 API and cursor pagination. Optional |
|
| histogram | Events | Server-side bucketing of events by |
|
| aggregate | Events | Client-side aggregation by monitor_name, source, etc. |
|
| top | Events | Top N event groups by count with generic groupBy support (deployments, configs, alerts, etc.). Groups without context tags are included as "no_context" |
|
| timeseries | Events | Time-bucketed alert trends (hourly/daily counts) |
|
| incidents | Events | Deduplicate alerts into incidents with Trigger/Recover pairing |
|
| list | Incidents | List incidents |
|
| get | Incidents | Get incident by ID |
|
| search | Incidents | Search incidents |
|
| create | Incidents | Create an incident |
|
| update | Incidents | Update an incident |
|
| delete | Incidents | Delete an incident |
|
| list | SLOs | List SLOs. Each item exposes |
|
| get | SLOs | Get SLO by ID (same projection as |
|
| create | SLOs | Create an SLO |
|
| update | SLOs | Update an SLO |
|
| delete | SLOs | Delete an SLO |
|
| history | SLOs | Get SLO history |
|
| list | Synthetics | List synthetic tests |
|
| get | Synthetics | Get test by public ID |
|
| create | Synthetics | Create a test |
|
| update | Synthetics | Update a test |
|
| delete | Synthetics | Delete a test |
|
| trigger | Synthetics | Trigger a test run |
|
| results | Synthetics | Get test results |
|
| list | Downtimes | List downtimes |
|
| get | Downtimes | Get downtime by ID |
|
| create | Downtimes | Create a downtime |
|
| update | Downtimes | Update a downtime |
|
| cancel | Downtimes | Cancel a downtime |
|
| listByMonitor | Downtimes | List downtimes for a monitor |
|
| list | Infrastructure | List hosts |
|
| totals | Infrastructure | Get host totals |
|
| mute | Infrastructure | Mute a host |
|
| unmute | Infrastructure | Unmute a host |
|
| applications | RUM | List RUM applications |
|
| events | RUM | Search RUM events |
|
| aggregate | RUM | Aggregate RUM data |
|
| performance | RUM | Get Core Web Vitals (LCP, FCP, CLS, FID, INP) |
|
| waterfall | RUM | Get session timeline with resources/actions/errors |
|
| rules | Security | List security rules |
|
| signals | Security | Search security signals |
|
| findings | Security | List security findings |
|
| list | Notebooks | List notebooks |
|
| get | Notebooks | Get notebook by ID |
|
| create | Notebooks | Create a notebook |
|
| update | Notebooks | Update a notebook |
|
| delete | Notebooks | Delete a notebook |
|
| list | Admin | List users |
|
| get | Admin | Get user by ID |
|
| list | Admin | List teams |
|
| get | Admin | Get team by ID |
|
| members | Admin | List team members |
|
| list | Infrastructure | List all tags |
|
| get | Infrastructure | Get tags for a host |
|
| add | Infrastructure | Add tags to a host |
|
| update | Infrastructure | Update host tags |
|
| delete | Infrastructure | Delete host tags |
|
| summary | Billing | Usage summary |
|
| hosts | Billing | Host usage |
|
| logs | Billing | Log usage |
|
| custom_metrics | Billing | Custom metrics usage |
|
| indexed_spans | Billing | Indexed spans usage |
|
| ingested_spans | Billing | Ingested spans usage |
|
| validate | Auth | Test 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.
Tool | Default | Parameter | Description |
Logs | 200 |
| Log lines to return |
Metrics (timeseries) | 1000 |
| Data points per series (controls resolution) |
General tools | 50 |
| Results 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 topandevents searchwithsource:alertcount every renotify Datadog emits (one everyrenotify_intervalwhile a monitor is Alert). To get actual state transitions, usemonitors history(defaults totransitionType: ["alert","alert recovery"]) or passtransitionTypetoevents search.DST-safe time buckets.
events histogrambuckets byhour_of_day/day_of_week/day_of_monthin any IANAtimezoneviaIntl.DateTimeFormat. Cursor-paginates the underlying search; cap controlled byMCP_MAX_EVENTS_HISTOGRAM(default 5000) withbucketCountIncomplete+nextCursoron overflow.Validate before create.
monitors createwithdry_run: truecalls/api/v1/monitor/validateinstead of persisting. Allowed in--read-onlymode.Monitor template preview.
monitors previewrenders a notification against acontextpayload — variable substitution + Datadog's six documented conditionals (is_alert,is_warning,is_no_data,is_recovery,is_alert_to_warning,is_warning_to_alert).{{#each}}and partials throwEUNSUPPORTED_TEMPLATE_SYNTAX.SLO round-trip.
slos getprojectsquery,monitorIds,monitorTags,groups, and a UIurlso you can edit and feed back intoslos updatewithout dropping definition fields.Cross-correlation.
logs(sample:"diverse")→ pulldd.trace_id→traces(query:"trace_id:<id>")→metrics(query:"p95:trace.express.request{service:...}")(root metric without.durationfor 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.
Maintenance
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/TANTIOPE/datadog-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server