Datadog MCP server

Provides a bridge to the Datadog API, enabling metrics and logs retrieval for monitoring and observability workflows using TypeScript and Bun runtime.
Back to servers
Provider
Ippei Konishi
Release date
Mar 08, 2025
Language
TypeScript

This MCP server enables AI assistants to search and analyze Datadog logs using natural language queries, making troubleshooting and log analysis more efficient. It provides a bridge between AI assistants and your Datadog data through the Model Context Protocol.

Prerequisites

  • A Datadog account with API access
  • Datadog API and Application keys (See Datadog documentation for details)

Installation

To integrate the Datadog MCP server with your AI assistant, add the following configuration to your assistant's MCP settings file:

"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>"
  }
}

Note: This MCP server only supports stdio transport. SSE transport is not supported.

Usage Guide

Searching Logs

The primary tool available is search-logs, which allows you to query Datadog logs with flexible filtering options.

Parameters

  • filterQuery (required): A query string to filter logs following the Datadog Log Search Syntax
  • filterFrom (optional): The minimum timestamp for requested logs in ISO 8601 format
  • filterTo (optional): The maximum timestamp for requested logs in ISO 8601 format
  • cursor (optional): The cursor to use for pagination through large log sets

Example Query

To search for error logs from a specific service in a production environment within a time range:

{
  "filterQuery": "service:awesome-service status:error",
  "filterFrom": "2025-01-01T00:00:00Z",
  "filterTo": "2025-01-02T00:00:00Z"
}

Features

The Datadog MCP server provides several useful capabilities:

  • Flexible Log Searching: Filter logs using Datadog's powerful query language
  • Time-Based Filtering: Narrow down logs to specific time periods
  • Pagination Support: Navigate through large sets of log data using cursor-based pagination

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later