Datadog MCP Server

Datadog MCP Server

Datadog MCP Server is a lightweight server implementation that exposes Datadog's monitoring, dashboards, metrics, logs, and incident management APIs as standardized MCP tools, enabling LLM-powered applications and agents to securely interact with Datadog resources and perform dynamic operations via Model Context Protocol.

Author: GeLi2001


View Protocol

What is Datadog MCP Server?

Datadog MCP Server is a dedicated Model Context Protocol (MCP) server that acts as a bridge between AI-powered agents or LLM-based applications and the Datadog API. By exposing a suite of MCP tools mapped to Datadog's monitoring, metric, dashboard, event, log, and incident management capabilities, this server enables standardized, secure, and dynamic interaction with Datadog data, supporting streamlined workflows, automated troubleshooting, and enhanced observability tasks from within AI systems.

How to Configure

To configure Datadog MCP Server, you need:

  • Node.js (version 16+)
  • Datadog API & Application keys

1. Set up credentials using environment variables:

Create a .env file:

DD_API_KEY=your_api_key_here
DD_APP_KEY=your_app_key_here
DD_SITE=datadoghq.com
DD_LOGS_SITE=datadoghq.com   # optional
DD_METRICS_SITE=datadoghq.com   # optional

OR

2. Provide credentials as command-line arguments:

datadog-mcp-server --apiKey=your_api_key --appKey=your_app_key --site=datadoghq.com
  • For multi-region or service-specific domains, use --logsSite and --metricsSite as needed.
  • If connecting with Claude Desktop, write the configuration into claude_desktop_config.json (location differs across OS). Use either global site or specify logsSite/metricsSite for more granular setup.

How to Use

  1. Installation

    npm install -g datadog-mcp-server
    

    Or run directly via npx.

  2. Start the Server

    datadog-mcp-server --apiKey=YOUR_API_KEY --appKey=YOUR_APP_KEY --site=YOUR_DD_SITE
    

    Or rely on your environment variables (.env).

  3. Integrate with your AI agent, MCP client, or a tool like Claude Desktop or MCP Inspector.

    • Configure Claude Desktop's config file to launch this server (see above).
    • Or run an inspector for manual exploration:
      npx @modelcontextprotocol/inspector datadog-mcp-server --apiKey=your_api_key --appKey=your_app_key
      
  4. Access tools

    • Use the MCP protocol—such as /tools/list endpoint—to discover available functions.
    • Invoke actions via the /tools/call endpoint, passing arguments (see examples).

Key Features

  • Full coverage of Datadog's monitoring, dashboard, metric, event, log, and incident APIs via MCP tools
  • Secure credential configuration and best-practice data handling
  • Flexible endpoint configuration for global and region-specific Datadog sites
  • Executable MCP tools for fetching monitors, dashboards, events, and logs, as well as advanced log search and aggregation
  • Comprehensive error handling and clear messaging for API or authentication issues
  • Turnkey integration with AI assistants, Claude Desktop, or custom MCP clients
  • Lightweight, easily deployable on local machines or servers

Use Cases

  • AI agents or copilots surface monitoring data and dashboards directly from Datadog
  • Automated incident management assistants retrieve context and surface incidents or related logs on demand
  • Alerts and logs can be fetched, filtered, and aggregated via natural language requests in LLM-powered workflows
  • On-demand metrics exploration and dashboard retrieval for troubleshooting or reporting
  • Immediate querying and visualization of recent application errors, states, or anomalies through MCP-compatible UIs

FAQ

Q1: I get a 403 Forbidden error when running the server.

  • Make sure both the API key and Application key are valid, belong to the correct Datadog account, have the required permissions, and are properly set either as environment variables or command-line arguments. Also, verify that the endpoint (--site) matches your Datadog region.

Q2: How do I connect the server to Claude Desktop or a similar agent?

  • Configure the claude_desktop_config.json with the Datadog MCP server entry, specifying the command and arguments with your Datadog credentials and region. Make sure your keys and endpoints are correct.

Q3: Can I use different endpoints for Datadog logs and metrics?

  • Yes. Specify --logsSite and --metricsSite command-line arguments or environment variables (DD_LOGS_SITE, DD_METRICS_SITE). This is especially useful for organizations with dedicated endpoints per service.

Q4: Is it safe to run this server on my local machine?

  • Yes, Datadog MCP Server is designed for secure, local deployment. Keys are read from environment variables or arguments and are not persisted elsewhere. Always safeguard your credentials.

Q5: What should I do if my queries return no results or seem incorrect?

  • Check the syntax and filters for your queries (e.g., time ranges, statuses, service names). Ensure your keys have access to the relevant data, and the endpoints set match your data's region.