Datadog MCP Server

Datadog MCP Server

Enables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.

Category
Visit Server

Tools

search_spans

Datadogのトレースspanを検索するツール

aggregate_spans

Datadogのトレースspanを集計するツール

search_logs

Datadogのログを検索するツール

README

Datadog MCP Server

English (This Document) | 日本語

MCP Server for Datadog API, enabling log search, trace span search, and trace span aggregation functionalities.

<a href="https://glama.ai/mcp/servers/@Nozomuts/datadog-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Nozomuts/datadog-mcp/badge" alt="Datadog Server MCP server" /> </a>

Features

  • Log Search: Search and retrieve logs from Datadog with flexible query options
  • Trace Span Search: Search for distributed trace spans with various filtering options
  • Trace Span Aggregation: Aggregate trace spans by different dimensions for analysis

Tools

  1. search_logs

    • Search for logs in Datadog
    • Inputs:
      • filterQuery (optional string): Query string to search logs (default: "*")
      • filterFrom (optional number): Search start time as UNIX timestamp in seconds (default: 15 minutes ago)
      • filterTo (optional number): Search end time as UNIX timestamp in seconds (default: current time)
      • pageLimit (optional number): Maximum number of logs to retrieve (default: 25, max: 1000)
      • pageCursor (optional string): Pagination cursor for retrieving additional results
    • Returns: Formatted text containing:
      • Search conditions (query and time range)
      • Number of logs found
      • Next page cursor (if available)
      • Log details including:
        • Service name
        • Tags
        • Timestamp
        • Status
        • Message (truncated to 300 characters)
        • Host
        • Important attributes (http.method, http.url, http.status_code, error)
  2. search_spans

    • Search for trace spans in Datadog
    • Inputs:
      • filterQuery (optional string): Query string to search spans (default: "*")
      • filterFrom (optional number): Search start time as UNIX timestamp in seconds (default: 15 minutes ago)
      • filterTo (optional number): Search end time as UNIX timestamp in seconds (default: current time)
      • pageLimit (optional number): Maximum number of spans to retrieve (default: 25, max: 1000)
      • pageCursor (optional string): Pagination cursor for retrieving additional results
    • Returns: Formatted text containing:
      • Search conditions (query and time range)
      • Number of spans found
      • Next page cursor (if available)
      • Span details including:
        • Service name
        • Timestamp
        • Resource name
        • Duration (in seconds)
        • Host
        • Environment
        • Type
        • Important attributes (http.method, http.url, http.status_code, error)
  3. aggregate_spans

    • Aggregate trace spans in Datadog by specified dimensions
    • Inputs:
      • filterQuery (optional string): Query string to filter spans for aggregation (default: "*")
      • filterFrom (optional number): Start time as UNIX timestamp in seconds (default: 15 minutes ago)
      • filterTo (optional number): End time as UNIX timestamp in seconds (default: current time)
      • groupBy (optional string[]): Dimensions to group by (e.g., ["service", "resource_name", "status"])
      • aggregation (optional string): Aggregation method - "count", "avg", "sum", "min", "max", "pct" (default: "count")
      • interval (optional string): Time interval for time series data (only when type is "timeseries")
      • type (optional string): Result type, either "timeseries" or "total" (default: "timeseries")
    • Returns: Formatted text containing:
      • Aggregation results in buckets, each including:
        • Bucket ID
        • Group by values (if groupBy is specified)
        • Computed values based on the aggregation method
      • Additional metadata:
        • Processing time (elapsed)
        • Request ID
        • Status
        • Warnings (if any)

Setup

You need to set up Datadog API and application keys:

  1. Get your API key and application key from the Datadog API Keys page
  2. Install dependencies in the datadog-mcp project:
    npm install
    # or
    pnpm install
    
  3. Build the TypeScript project:
    npm run build
    # or
    pnpm run build
    

Docker Setup

You can build using Docker with the following command:

docker build -t datadog-mcp .

Usage with Claude Desktop

To use this with Claude Desktop, add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "datadog": {
      "command": "node",
      "args": [
        "/path/to/datadog-mcp/build/index.js"
      ],
      "env": {
        "DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
        "DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
      }
    }
  }
}

If you're using Docker, you can configure it like this:

{
  "mcpServers": {
    "datadog": {
      "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "DD_API_KEY",
          "-e",
          "DD_APP_KEY",
          "datadog-mcp"
        ],
      "env": {
        "DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
        "DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
      }
    }
  }
}

Usage with VS Code

For quick installation in VS Code, configure your settings:

  1. Open User Settings (JSON) in VS Code (Ctrl+Shift+PPreferences: Open User Settings (JSON))
  2. Add the following configuration:
{
  "mcp": {
    "servers": {
      "datadog": {
        "command": "node",
        "args": [
          "/path/to/datadog-mcp/build/index.js"
        ],
        "env": {
          "DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
          "DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
        }
      }
    }
  }
}

If you're using Docker, you can configure it like this:

{
  "mcp": {
    "servers": {
      "datadog": {
        "command": "docker",
          "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "DD_API_KEY",
          "-e",
          "DD_APP_KEY",
          "datadog-mcp"
        ],
        "env": {
          "DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
          "DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
        }
      }
    }
  }
}

Alternatively, you can add this to a .vscode/mcp.json file in your workspace (without the mcp key):

{
  "servers": {
    "datadog": {
      "command": "node",
      "args": [
        "/path/to/datadog-mcp/build/index.js"
      ],
      "env": {
        "DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
        "DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
      }
    }
  }
}

If you're using Docker, you can configure it like this:

{
  "servers": {
    "datadog": {
      "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "DD_API_KEY",
          "-e",
          "DD_APP_KEY",
          "datadog-mcp"
        ],
      "env": {
        "DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
        "DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
      }
    }
  }
}

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured