home / mcp / datadog mcp server

Datadog MCP Server

Queries Datadog logs via MCP, supporting flexible filtering, time ranges, and pagination for AI-assisted analysis.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "i524-datadog-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@i524/datadog-mcp-server"
      ],
      "env": {
        "DD_API_KEY": "<your-datadog-api-key>",
        "DD_APP_KEY": "<your-datadog-app-key>"
      }
    }
  }
}

You can run a Datadog MCP Server to empower AI assistants to search and analyze your Datadog logs directly through the MCP interface. This enables natural-language log queries, time-based filtering, and efficient navigation of large results sets.

How to use

To use the Datadog MCP Server, you configure it in your MCP client and then issue the search-logs tool to query Datadog logs. You can filter by a Datadog query, limit results to a time range, and paginate through large results with a cursor. Use this to quickly identify error patterns, service issues, or unusual activity across your Datadog logs.

How to install

Prerequisites: ensure you have Node.js installed on your machine. You only need Node to run the MCP server through npx.

Step 1: Install and run the MCP server using npx with the provided configuration snippet.

Step 2: Set your Datadog API keys in the environment when starting the MCP server.

Step 3: Verify the server is ready to accept MCP requests from your client.

"datadog-mcp-server": {
  "command": "npx",
  "args": ["-y", "@i524/datadog-mcp-server"],
  "env": {
    "DD_API_KEY": "<your-datadog-api-key>",
    "DD_APP_KEY": "<your-datadog-app-key>"
  }
}

Additional setup notes

This MCP server uses stdio transport. SSE transport is not supported. Provide your Datadog API and application keys as environment variables when starting the server.

Configuration and usage details

The server exposes a single tool for querying logs, named search-logs. You provide a Datadog query string, an optional time window, and an optional cursor for pagination.

Security and keys

Keep your Datadog API key and App key secure. Do not expose these keys in client configurations or logs. Use environment variables to inject keys at startup.

Available tools

search-logs

Query Datadog logs with a flexible filter, optional time range, and optional pagination cursor. Supports a query string, and time-bounded filtering for precise results.