# datadog-mcp

Connect an AI agent to Datadog to search logs and inspect metrics, traces, and monitors. Useful when investigating observability data from a chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: TANTIOPE
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/TANTIOPE/datadog-mcp-server
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/datadog-mcp

## What it does

datadog-mcp gives an agent MCP access to Datadog data. It can search logs with grep-like queries, filter APM traces by duration, status, or errors, and correlate logs, traces, and metrics. Sampling modes help control how much data is returned to the agent.

Run it over `stdio` for a local client or `http` for remote use, including Kubernetes deployments. The server needs `DD_API_KEY` and `DD_APP_KEY`; set `DD_SITE` to choose a Datadog site. With `--read-only`, write operations are blocked, so this is the setting to use when the agent should inspect data without changing it.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `DD_API_KEY`, `DD_APP_KEY`, `DD_SITE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Datadog

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env DD_API_KEY=<DD_API_KEY> --env DD_APP_KEY=<DD_APP_KEY> --env DD_SITE=<DD_SITE> --transport stdio datadog-mcp -- npx -y datadog-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add datadog-mcp --env DD_API_KEY=<DD_API_KEY> --env DD_APP_KEY=<DD_APP_KEY> --env DD_SITE=<DD_SITE> -- npx -y datadog-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "datadog-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "datadog-mcp"
            ],
            "env": {
                "DD_API_KEY": "<DD_API_KEY>",
                "DD_APP_KEY": "<DD_APP_KEY>",
                "DD_SITE": "<DD_SITE>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "datadog-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "datadog-mcp"
            ],
            "env": {
                "DD_API_KEY": "<DD_API_KEY>",
                "DD_APP_KEY": "<DD_APP_KEY>",
                "DD_SITE": "<DD_SITE>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e DD_API_KEY=<DD_API_KEY> -e DD_APP_KEY=<DD_APP_KEY> -e DD_SITE=<DD_SITE> datadog-mcp npx -y datadog-mcp
```
Replace <…> with your own values

## When to use it
- search Datadog logs for matching entries
- filter APM traces by duration or error status
- correlate logs with traces and metrics
- find monitors that match a query

## Example prompts
- Search Datadog logs for payment errors and show matching entries.
- Filter APM traces for errors and long durations, then compare them with metrics.
- Find Datadog monitors that match this query.

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23654
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17191
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12110

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
