datadog-mcp

datadog-mcp

Enables AI assistants to query and manage Datadog observability data including metrics, logs, traces, and monitors through natural language. Supports read-only operations by default for security.

Category
Visit Server

README

Datadog MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with Datadog's observability platform through natural language.

Features

  • Metrics: Query time-series data, list metrics, get metadata
  • Logs: Search and filter log events
  • APM: Access trace data, service maps, dependencies
  • Infrastructure: Host information, container data, process metrics
  • Dashboards: List and read dashboard configurations
  • Monitors: Alert rules and status information
  • Incidents: Incident tracking and management
  • Service Catalog: Service definitions and relationships
  • SLOs: Service level objectives and compliance data
  • Usage: Account usage statistics

Installation

From Source

git clone https://github.com/brukhabtu/datadog-mcp.git
cd datadog-mcp
pip install -e .

Using Docker

docker pull ghcr.io/brukhabtu/datadog-mcp:latest

Configuration

Required Environment Variables

DATADOG_API_KEY="your-datadog-api-key"
DATADOG_APP_KEY="your-datadog-application-key"

Optional Environment Variables

DATADOG_BASE_URL="https://api.datadoghq.com"  # Default US site
DATADOG_TIMEOUT=30                             # Request timeout in seconds
MCP_TRANSPORT=stdio                            # Transport method (stdio/websocket)
MCP_PORT=8000                                  # Port for WebSocket transport
MCP_LOG_LEVEL=INFO                             # Logging level
MCP_ENABLE_SECURITY_FILTERING=true             # Enable read-only filtering

Regional Endpoints

For different Datadog regions:

  • US: https://api.datadoghq.com (default)
  • EU: https://api.datadoghq.eu
  • US3: https://api.us3.datadoghq.com
  • US5: https://api.us5.datadoghq.com
  • AP1: https://api.ap1.datadoghq.com

Usage

Command Line

# Run with default stdio transport
datadog-mcp

# Run with WebSocket transport
datadog-mcp --transport websocket --port 8000

# Run with debug logging
datadog-mcp --log-level DEBUG

Docker

# Run with environment file
docker run --env-file .env ghcr.io/brukhabtu/datadog-mcp:latest

# Run with individual environment variables
docker run -e DATADOG_API_KEY=your-key \
           -e DATADOG_APP_KEY=your-app-key \
           ghcr.io/brukhabtu/datadog-mcp:latest

Claude Desktop Integration

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "datadog": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env", "DATADOG_API_KEY",
        "--env", "DATADOG_APP_KEY",
        "ghcr.io/brukhabtu/datadog-mcp:latest"
      ],
      "env": {
        "DATADOG_API_KEY": "your-datadog-api-key",
        "DATADOG_APP_KEY": "your-datadog-application-key"
      }
    }
  }
}

Or use the native installation:

{
  "mcpServers": {
    "datadog": {
      "command": "datadog-mcp",
      "args": ["--transport", "stdio"],
      "env": {
        "DATADOG_API_KEY": "your-datadog-api-key",
        "DATADOG_APP_KEY": "your-datadog-application-key"
      }
    }
  }
}

OpenAPI Specification

The server requires the Datadog v2 API OpenAPI specification to be placed at: src/datadog_mcp/specs/datadog-v2.yaml

You can obtain this specification from:

Security

By default, the server runs with security filtering enabled (MCP_ENABLE_SECURITY_FILTERING=true), which restricts operations to read-only access. This includes:

Allowed Operations

  • GET requests to query metrics, logs, traces, etc.
  • Reading dashboards, monitors, and configurations
  • Searching and filtering data
  • Viewing usage statistics

Blocked Operations

  • All POST, PUT, PATCH, DELETE operations
  • User and API key management
  • Organization settings modifications
  • Any destructive actions

To disable security filtering (not recommended for production):

MCP_ENABLE_SECURITY_FILTERING=false

Example Interactions

Once configured, you can interact with Datadog through natural language:

  • "Show me the error rate for my web service over the last hour"
  • "List all active monitors that are alerting"
  • "Get the CPU usage metrics for production hosts"
  • "Show me recent incidents in the platform team"
  • "What's our log volume usage this month?"
  • "Find traces with high latency in the payment service"
  • "Show me the service dependencies for the API gateway"

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/brukhabtu/datadog-mcp.git
cd datadog-mcp

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .

Running Tests

pytest tests/

Building Docker Image

docker build -t datadog-mcp:local .

Architecture

The server follows the same architectural patterns as the Jira MCP implementation:

  • FastMCP 2.0: Leverages automatic tool generation from OpenAPI specifications
  • Security-First: Default read-only access with configurable filtering
  • Environment Configuration: All settings via environment variables
  • Docker-First: Containerized deployment for consistency
  • Transport Flexibility: Supports both stdio and WebSocket transports

Troubleshooting

Authentication Errors

  • Ensure both DATADOG_API_KEY and DATADOG_APP_KEY are set correctly
  • Verify your keys have the necessary permissions in Datadog
  • Check you're using the correct regional endpoint

Connection Issues

  • Verify your network can reach the Datadog API
  • Check if you need to configure proxy settings
  • Ensure the timeout is sufficient for your queries

Missing Tools

  • Verify the OpenAPI specification is present in src/datadog_mcp/specs/
  • Check the server logs for any specification loading errors
  • Ensure the specification version matches your Datadog API version

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

MIT License - see LICENSE file for details

Credits

Based on the Jira MCP implementation pattern.

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