Datadog MCP server

Integrates with Datadog's API to enable incident management, including listing and retrieving incident information for system monitoring and observability workflows.
Back to servers
Provider
winor30
Release date
Feb 24, 2025
Language
TypeScript
Package
Stats
1.3K downloads
40 stars

The Datadog MCP server allows you to integrate Datadog monitoring capabilities with Model Context Protocol (MCP) interfaces, enabling you to manage incidents, monitors, logs, dashboards, metrics, and more through a standardized protocol.

Prerequisites

Before using the Datadog MCP server, you need valid Datadog API credentials:

  • DATADOG_API_KEY: Your Datadog API key
  • DATADOG_APP_KEY: Your Datadog Application key
  • DATADOG_SITE (optional): The Datadog site (e.g. datadoghq.eu)

Export these in your environment before running the server:

export DATADOG_API_KEY="your_api_key"
export DATADOG_APP_KEY="your_app_key"
export DATADOG_SITE="your_datadog_site"

Installation Options

Installing via Smithery

To install Datadog MCP Server automatically via Smithery:

npx -y @smithery/cli install @winor30/mcp-server-datadog --client claude

Manual Installation

pnpm install
pnpm build
pnpm watch   # for development with auto-rebuild

Configuration for Claude Desktop

To use with Claude Desktop, add the server configuration to your claude_desktop_config.json file:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

Using a local installation:

{
  "mcpServers": {
    "datadog": {
      "command": "/path/to/mcp-server-datadog/build/index.js",
      "env": {
        "DATADOG_API_KEY": "<YOUR_API_KEY>",
        "DATADOG_APP_KEY": "<YOUR_APP_KEY>",
        "DATADOG_SITE": "<YOUR_SITE>"
      }
    }
  }
}

Or using npx:

{
  "mcpServers": {
    "mcp-server-datadog": {
      "command": "npx",
      "args": ["-y", "@winor30/mcp-server-datadog"],
      "env": {
        "DATADOG_API_KEY": "<YOUR_API_KEY>",
        "DATADOG_APP_KEY": "<YOUR_APP_KEY>",
        "DATADOG_SITE": "<YOUR_SITE>"
      }
    }
  }
}

Available Tools

Incident Management

List Incidents

list_incidents

Optional parameters:

  • filter: Filter string (e.g., status, priority)
  • pagination: Page size/offset details

Get Incident Details

get_incident

Required parameters:

  • incident_id: ID of the incident to retrieve

Monitoring

Get Monitors

get_monitors

Optional parameters:

  • groupStates: States to filter (e.g., alert, warn, no data, ok)
  • name: Filter by name
  • tags: Filter by tags

Logs

Get Logs

get_logs

Required parameters:

  • query: Logs query string
  • from: Start time (epoch seconds)
  • to: End time (epoch seconds)

Optional parameters:

  • limit: Maximum logs to return (default: 100)

Dashboards

List Dashboards

list_dashboards

Optional parameters:

  • name: Filter by name
  • tags: Filter by tags

Get Dashboard

get_dashboard

Required parameters:

  • dashboard_id: ID of the dashboard to fetch

Metrics

Query Metrics

query_metrics

Required parameters:

  • query: Metrics query string
  • from: Start time (epoch seconds)
  • to: End time (epoch seconds)

APM Traces

List Traces

list_traces

Required parameters:

  • query: APM trace query string
  • from: Start time (epoch seconds)
  • to: End time (epoch seconds)

Optional parameters:

  • limit: Maximum traces to return (default: 100)
  • sort: Sort order (default: '-timestamp')
  • service: Filter by service name
  • operation: Filter by operation name

Host Management

List Hosts

list_hosts

Optional parameters:

  • filter: Filter string
  • sort_field: Field to sort by
  • sort_dir: Sort direction (asc/desc)
  • Various other pagination and filtering options

Get Active Hosts Count

get_active_hosts_count

Optional parameters:

  • from: Time period in seconds (default: 2h)

Mute Host

mute_host

Required parameters:

  • hostname: Host to mute

Optional parameters:

  • message: Explanation message
  • end: End time (epoch seconds)
  • override: Whether to override existing mute

Unmute Host

unmute_host

Required parameters:

  • hostname: Host to unmute

Downtime Management

List Downtimes

list_downtimes

Optional parameters:

  • currentOnly: Only show active downtimes
  • monitorId: Filter by monitor ID

Schedule Downtime

schedule_downtime

Required parameters:

  • scope: Scope to apply downtime to (e.g., 'host:my-host')

Optional parameters:

  • Various scheduling options (start/end times, recurrence, etc.)

Cancel Downtime

cancel_downtime

Required parameters:

  • downtimeId: ID of downtime to cancel

RUM (Real User Monitoring)

Get RUM Applications

get_rum_applications

Get RUM Events

get_rum_events

Required parameters:

  • query: RUM query string
  • from: Start time (epoch seconds)
  • to: End time (epoch seconds)

Optional parameters:

  • limit: Maximum events to return

Other RUM Tools

  • get_rum_grouped_event_count: Group and count RUM events
  • get_rum_page_performance: Get page performance metrics
  • get_rum_page_waterfall: Retrieve page waterfall data

Debugging

For debugging issues with the MCP server, use the MCP Inspector:

npm run inspector

This will provide a URL to open in your browser where you can view logs and manually send requests.

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