logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

datadog-cloud-interface-tool

Facilitates interaction with the Datadog platform's Application Programming Interface (API) for comprehensive system observability. It supports fetching monitoring status, accessing visualization artifacts, querying time-series data, and managing operational incident records. Key features include robust exception management and sophisticated log retrieval mechanisms.

Author

datadog-cloud-interface-tool logo

GeLi2001

MIT License

Quick Info

GitHub GitHub Stars 55
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

datadogcloudgeli2001datadog apidatadog mcpgeli2001 datadog

Datadog MCP Server Facade

This implements a Model Context Protocol (MCP) endpoint tailored for communication with the Datadog Monitoring and Analytics platform via its APIs.

Datadog MCP server

Core Capabilities

  • Observability Checks: Retrieve current monitor states and configuration specifics.
  • Visualization Retrieval: Fetch definitions and layouts for stored dashboards.
  • Metric Analysis: Request time-series data points and associated metric metadata.
  • Telemetry Events: Search and pull platform events within defined temporal boundaries.
  • Log Indexing: Advanced searching across indexed logs utilizing complex filtering syntax.
  • Incident Management: Access records pertaining to ongoing or past service incidents.
  • API Connectivity: Direct interfacing with both Datadog v1 and v2 API specifications.
  • Resilient Error Handling: Provides explicit feedback for communication failures or authentication shortcomings.
  • Specialized Accessors: Dedicated endpoints optimized for metric and log data streams.

Prerequisites for Operation

  1. A functional Node.js runtime environment (version 16 or newer).
  2. A valid Datadog organization account equipped with:
  3. An authorized API Key (Located under Organization Settings -> API Keys).
  4. An authorized Application Key (Located under Organization Settings -> Application Keys).

Deployment Instructions

npm install -g datadog-mcp-server

From Source Code Repository

  1. Obtain the source code via cloning the Git repository.
  2. Resolve required software components: bash npm install
  3. Compile the project assets: bash npm run build

Configuration Parameters

The server instance can be initialized using either persistent environment variables or direct invocation parameters.

Environmental Configuration (Using .env File)

Establish a configuration file named .env containing:

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

Note: DD_LOGS_SITE and DD_METRICS_SITE are optional; they default to the value specified in DD_SITE if omitted.

Command-Line Invocation

Standard initiation utilizing the primary site setting:

ddatadog-mcp-server --apiKey=your_api_key --appKey=your_app_key --site=datadoghq.eu

Advanced invocation enabling service-specific endpoint segregation:

ddatadog-mcp-server --apiKey=your_api_key --appKey=your_app_key --site=datadoghq.com --logsSite=logs.datadoghq.com --metricsSite=metrics.datadoghq.com

Notice: Protocol prefixes like https:// are automatically prepended to site arguments.

Geographical Endpoint Mapping

Different Datadog regulatory regions map to distinct base URLs:

  • United States (Default): datadoghq.com
  • European Union: datadoghq.eu
  • Government Cloud (US3): ddog-gov.com
  • US Region 5: us5.datadoghq.com
  • Asia-Pacific 1: ap1.datadoghq.com

Integration with Claude Desktop

Incorporate the following structure into your claude_desktop_config.json configuration file:

{
  "mcpServers": {
    "datadog": {
      "command": "npx",
      "args": [
        "datadog-mcp-server",
        "--apiKey",
        "<YOUR_API_KEY>",
        "--appKey",
        "<YOUR_APP_KEY>",
        "--site",
        "<YOUR_DD_SITE>(e.g us5.datadoghq.com)"
      ]
    }
  }
}

For scenarios demanding segregated endpoints for logs and metrics transport:

{
  "mcpServers": {
    "datadog": {
      "command": "npx",
      "args": [
        "datadog-mcp-server",
        "--apiKey",
        "<YOUR_API_KEY>",
        "--appKey",
        "<YOUR_APP_KEY>",
        "--site",
        "<YOUR_DD_SITE>",
        "--logsSite",
        "<YOUR_LOGS_SITE>",
        "--metricsSite",
        "<YOUR_METRICS_SITE>"
      ]
    }
  }
}

Location pointers for the Claude Desktop configuration file:

  • macOS Systems: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows Systems: %APPDATA%/Claude/claude_desktop_config.json

Utilization with MCP Inspector Utility

To interface with the utility for debugging or direct command execution:

npx @modelcontextprotocol/inspector datadog-mcp-server --apiKey=your_api_key --appKey=your_app_key

Available MCP Functions (Tools)

The server exposes the following callable functions:

  • get-monitors: Retrieve monitor definitions, supporting optional state filtering.
  • get-monitor: Obtain detailed attributes for a monitor specified by its unique identifier.
  • get-dashboards: List all accessible dashboard objects.
  • get-dashboard: Fetch a single dashboard based on its ID.
  • get-metrics: List the catalog of available platform metrics.
  • get-metric-metadata: Retrieve structural information for a particular metric identifier.
  • get-events: Fetch platform events corresponding to a specified time interval.
  • get-incidents: List operational incidents, optionally filtered.
  • search-logs: Execute advanced query language searches against the indexed log store.
  • aggregate-logs: Execute analytical calculations (e.g., counting, averaging) over log datasets.

Usage Demonstrations (JSON RPC Calls)

Sample: Fetching Alerting Monitors

{
  "method": "tools/call",
  "params": {
    "name": "get-monitors",
    "arguments": {
      "groupStates": ["alert", "warn"],
      "limit": 5
    }
  }
}

Sample: Retrieving a Specific Dashboard Definition

{
  "method": "tools/call",
  "params": {
    "name": "get-dashboard",
    "arguments": {
      "dashboardId": "abc-def-123"
    }
  }
}
{
  "method": "tools/call",
  "params": {
    "name": "search-logs",
    "arguments": {
      "filter": {
        "query": "service:web-app status:error",
        "from": "now-15m",
        "to": "now"
      },
      "sort": "-timestamp",
      "limit": 20
    }
  }
}

Sample: Log Data Aggregation

{
  "method": "tools/call",
  "params": {
    "name": "aggregate-logs",
    "arguments": {
      "filter": {
        "query": "service:web-app",
        "from": "now-1h",
        "to": "now"
      },
      "compute": [
        {
          "aggregation": "count"
        }
      ],
      "groupBy": [
        {
          "facet": "status",
          "limit": 10,
          "sort": {
            "aggregation": "count",
            "order": "desc"
          }
        }
      ]
    }
  }
}

Sample: Querying Active Incidents

{
  "method": "tools/call",
  "params": {
    "name": "get-incidents",
    "arguments": {
      "includeArchived": false,
      "query": "state:active",
      "pageSize": 10
    }
  }
}

Troubleshooting Common Failures

If a HTTP 403 Forbidden response is received, systematically check the following:

  1. Correctness of the provided API Key and Application Key credentials.
  2. Authorization scope: Confirm the keys possess the requisite access privileges for the targeted resource type.
  3. Account entitlement status for the data being accessed.
  4. Regional alignment: Ensure the configured endpoint URL matches your organization's Datadog deployment (e.g., datadoghq.eu for EU tenants).

Diagnostic Procedures

If operational anomalies arise, inspect the local MCP log outputs within Claude Desktop:

# For macOS users
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

# For Windows users (using PowerShell)
Get-Content -Path "$env:APPDATA\Claude\Logs\mcp*.log" -Tail 20 -Wait

Frequent error vectors:

  • 403 Forbidden: Indicative of authentication credential failure.
  • Invalid Key Format: Verify that the full, uncut string representations of the API/App keys are utilized.
  • Site Misconfiguration: Confirm the chosen Datadog domain is accurate for your deployment.
  • Endpoint Divergence: If using distinct domains for specific services, ensure they are correctly delineated.

Software Licensing

Distributed under the MIT License.

WIKIPEDIA: Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to ISO. It is commonly referred to as "the cloud".

== Characteristics == In 2011, the National Institute of Standards and Technology (NIST) identified five "essential characteristics" for cloud systems. Below are the exact definitions according to NIST:

On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider." Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)." Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand." Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time." Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service. By 2023, the International Organization for Standardization (ISO) had expanded and refined the list.

== History ==

The history of cloud computing extends to the 1960s, with the initial concepts of time-sharing becoming popularized via remote job entry (RJE). The "data center" model, where users submitted jobs to operators to run on mainframes, was predominantly used during this era. This was a time of exploration and experimentation with ways to make large-scale computing power available to more users through time-sharing, optimizing the infrastructure, platform, and applications, and increasing efficiency for end users. The "cloud" metaphor for virtualized services dates to 1994, when it was used by General Magic for the universe of "places" that mobile agents in the Telescript environment could "go". The metaphor is credited to David Hoffman, a General Magic communications specialist, based on its long-standing use in networking and telecom. The expression cloud computing became more widely known in 1996 when Compaq Computer Corporation drew up a business plan for future computing and the Internet. The company's ambition was to superch

See Also

`