Datadog
Connect Claude, ChatGPT or Cursor to Datadog via MCP. Read monitors, events, windowed metrics, and incidents with an API key and application key.
Example questions
Try asking your AI client
-
Which Datadog monitors are alerting right now?
-
Did the API latency monitor fire after last night's deploy?
-
Summarize incidents opened in the last 7 days.
-
Write a short ops brief from last 24 hours of events - do not change monitors.
-
How has checkout error rate looked for the last 6 hours?
Overview
Connect Datadog so AI clients can list monitors, inspect incidents, search events, and run short windowed metric queries - without pasting API keys into prompts.
This integration is read-first. Muting monitors or changing incidents is not exposed.
Prerequisites
- A Datadog account with permission to create API and application keys
- A stackgate.ai account
- The Datadog site for your organization (US1, US3, US5, EU, AP1, AP2, or Gov)
Getting credentials
- Sign in to Datadog on the site that matches your organization (for EU use app.datadoghq.eu).
- Open Organization Settings → API Keys and create or copy an API key. This identifies the organization.
- Open Organization Settings → Application Keys and create an application key. This is user-scoped and required for read/management endpoints.
- Grant the application key at least these scopes (names vary slightly by site):
monitors_readevents_read/ events readtimeseries_query/ metrics readincident_read(needed for Incident Management tools)
- In stackgate.ai, open My Integrations → Datadog.
- Click Activate, paste the API key and application key, and select the site that matches your Datadog org. The wrong site returns 403 even with valid keys.
- Save. stackgate.ai tests the API key (
/api/v1/validate) and a read call with the application key before storing credentials.
See the Datadog API authentication docs and API and Application Keys.
Credentials reference
| Field | Required | Where to find it | Notes |
|---|---|---|---|
| API key | Yes | Organization Settings → API Keys | Identifies the org. Stored encrypted. |
| Application key | Yes | Organization Settings → Application Keys | Required for monitor, event, metric, and incident reads. |
| Site | Yes | Your Datadog login host | Maps to api.datadoghq.com, api.datadoghq.eu, and other regional API hosts. |
Using with AI clients
- Dedicated endpoint:
POST /mcp/datadogwith a Sanctum bearer token - Private gateway: one config for all integrations - use
datadog__*namespaced tools - Business gateway: same namespaced tools when Datadog is enabled for the company
Key tools:
- list_monitors, get_monitor - find alerting monitors and inspect queries
- search_events - events in a required POSIX start/end window
- query_metrics - timeseries for a required from/to window (keep it to a few hours)
- list_incidents, get_incident - Incident Management status and commander context
After connecting, use Edit tool access to restrict tools (for example monitors only).
See Documentation for HTTP authentication and private gateway setup.
Test the integration
List Datadog monitors that are currently in Alert.
Show the last two hours of events tagged env:prod.
Query avg:system.cpu.user{*} for the last hour.
List open Datadog incidents.
Typical tools: list_monitors, search_events, query_metrics, list_incidents.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| 422 integration not configured | Credential form not completed | Add API key, application key, and site |
| 401 / 403 on connect | Wrong key or wrong site | Confirm keys and pick the site that matches the org URL |
| 403 on incidents | Application key missing incident read | Add incident_read and update the key in My Integrations |
| 429 Too many requests | Datadog rate limits the org/app key | Wait and use short metric/event windows instead of polling |
| Empty metric series | Query or window mismatch | Confirm metric name, tags, and that from/to are POSIX seconds |
Datadog rate limits vary by endpoint and org plan (often hundreds to thousands of requests per hour). Prefer paginated list tools and short query windows.
Security and revocation
- Disconnect in My Integrations → Datadog to delete the stored keys from stackgate.ai.
- Revoke or rotate keys in Datadog Organization Settings → API Keys / Application Keys.
- Keys are stored encrypted. Tool calls are audit logged. Keys are never accepted as tool arguments.
Limitations
- Read-only MVP: no mute, downtime, or incident update tools.
- Metric and event tools require an explicit time window.
- Application keys are user-scoped; access follows that user's Datadog permissions.
- Gov and regional sites must be selected explicitly. There is no custom base URL field.
Available tools
-
list_monitors
List Datadog monitors with optional name, tag, and pagination filters.
-
get_monitor
Get a Datadog monitor by ID, including query, thresholds, and notification settings.
-
search_events
Search Datadog events in a required POSIX time window. Keep windows short (hours).
-
query_metrics
Query a Datadog metric timeseries for a required POSIX window. Prefer windows of a few hours.
-
list_incidents
List Datadog Incident Management incidents with optional pagination.
-
get_incident
Get a Datadog incident by ID, including status, commander, and timeline metadata.
MCP endpoint:
https://stackgate.ai/mcp/datadog
(HTTP) or via the
private gateway.