Skip to main content
Glama

Datadog MCP 서버

Datadog API와 상호작용하기 위한 MCP(Model Context Protocol) 서버입니다.

특징

  • 모니터링 : 모니터 데이터 및 구성에 액세스

  • 대시보드 : 대시보드 정의 검색 및 보기

  • 메트릭 : 사용 가능한 메트릭 및 해당 메타데이터 쿼리

  • 이벤트 : 기간 내 이벤트 검색 및 검색

  • 로그 : 고급 필터링 및 정렬 옵션을 사용하여 로그 검색

  • 사고 : 사고 관리 데이터 접근

  • API 통합 : Datadog의 v1 및 v2 API와 직접 통합

  • 포괄적인 오류 처리 : API 및 인증 문제에 대한 명확한 오류 메시지

  • 서비스별 엔드포인트 : 로그 및 메트릭에 대한 다양한 엔드포인트 지원

Related MCP server: ClickHouse Trace-Activity MCP Server

필수 조건

  1. Node.js(버전 16 이상)

  2. Datadog 계정에는 다음이 포함됩니다.

    • API 키 - 조직 설정 > API 키에서 찾을 수 있습니다.

    • 애플리케이션 키 - 조직 설정 > 애플리케이션 키에서 찾을 수 있습니다.

설치

npm을 통해 (권장)

지엑스피1

출처에서

  1. 이 저장소를 복제하세요

  2. 종속성 설치:

    npm install
  3. 프로젝트를 빌드하세요:

    npm run build

구성

환경 변수나 명령줄 인수를 사용하여 Datadog MCP 서버를 구성할 수 있습니다.

환경 변수

Datadog 자격 증명으로 .env 파일을 만듭니다.

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

참고 : DD_LOGS_SITE 및 DD_METRICS_SITE 는 선택 사항이며 지정하지 않으면 DD_SITE 값이 기본값으로 사용됩니다.

명령줄 인수

글로벌 사이트 설정을 사용한 기본 사용법:

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

서비스별 엔드포인트를 사용한 고급 사용:

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

참고: 사이트 인수에는 https:// 필요하지 않습니다. 자동으로 추가됩니다.

지역별 엔드포인트

Datadog 지역마다 엔드포인트가 다릅니다.

  • 미국(기본값): datadoghq.com

  • EU: datadoghq.eu

  • US3(GovCloud): ddog-gov.com

  • US5: us5.datadoghq.com

  • AP1: ap1.datadoghq.com

Claude Desktop과 함께 사용

claude_desktop_config.json 에 다음을 추가하세요:

{
  "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)"
      ]
    }
  }
}

로그와 메트릭에 대한 별도의 엔드포인트를 갖춘 고급 구성의 경우:

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

Claude Desktop 구성 파일의 위치:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • 윈도우: %APPDATA%/Claude/claude_desktop_config.json

MCP Inspector와 함께 사용

MCP Inspector 도구와 함께 사용하려면:

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

사용 가능한 도구

서버는 다음과 같은 MCP 도구를 제공합니다.

  • get-monitors : 선택적 필터링을 사용하여 모니터 가져오기

  • get-monitor : ID로 특정 모니터의 세부 정보를 가져옵니다.

  • get-dashboards : 모든 대시보드 나열

  • get-dashboard : ID로 특정 대시보드 가져오기

  • get-metrics : 사용 가능한 메트릭 나열

  • get-metric-metadata : 특정 메트릭에 대한 메타데이터를 가져옵니다.

  • get-events : 시간 범위 내에서 이벤트를 가져옵니다.

  • get-incidents : 선택적 필터링을 사용하여 인시던트 나열

  • 검색 로그 : 고급 쿼리 필터링을 사용한 검색 로그

  • aggregate-logs : 로그 데이터에 대한 분석 및 집계를 수행합니다.

예시

예: 모니터 가져오기

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

예: 대시보드 가져오기

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

예: 집계 로그

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

예: 사고 가져오기

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

문제 해결

403 Forbidden 오류가 발생하면 다음 사항을 확인하세요.

  1. API 키와 애플리케이션 키가 정확합니다.

  2. 키에는 요청된 리소스에 액세스하는 데 필요한 권한이 있습니다.

  3. 귀하의 계정은 요청된 데이터에 액세스할 수 있습니다.

  4. 귀하는 귀하의 지역에 맞는 올바른 엔드포인트를 사용하고 있습니다(예: EU 고객의 경우 datadoghq.eu ).

디버깅

문제가 발생하면 Claude Desktop의 MCP 로그를 확인하세요.

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

# On Windows
Get-Content -Path "$env:APPDATA\Claude\Logs\mcp*.log" -Tail 20 -Wait

일반적인 문제:

  • 403 금지됨: Datadog API 키 인증 문제

  • API 키 또는 앱 키 형식이 잘못되었습니다. 전체 키 문자열을 사용하고 있는지 확인하세요.

  • 사이트 구성 오류: 올바른 Datadog 도메인을 사용하고 있는지 확인하세요.

  • 엔드포인트 불일치: 로그 및 메트릭에 대해 별도의 도메인을 사용하는 경우 서비스별 엔드포인트가 올바르게 설정되었는지 확인하세요.

특허

MIT

Available Tools

10 tools
aggregate-logsB

Perform analytical queries and aggregations on log data. Essential for calculating metrics (count, avg, sum, etc.), grouping data by fields, and creating statistical summaries from logs. Use this when you need to analyze patterns or extract metrics from log data.

Inputs: filter, compute, groupBy, options.

get-dashboardA

Get the complete definition of a specific Datadog dashboard by its ID. Returns all widgets, layout, and configuration details.

Inputs: dashboardId (required).

get-dashboardsC

Retrieve a list of all dashboards from Datadog. Useful for discovering available dashboards and their IDs for further exploration.

Inputs: filterConfigured, limit.

get-eventsC

Search for events in Datadog within a specified time range. Events include deployments, alerts, comments, and other activities. Useful for correlating system behaviors with specific events.

Inputs: start (required), end (required), priority, sources, +4 more.

get-incidentsC

List incidents from Datadog's incident management system. Can filter by active/archived status and use query strings to find specific incidents. Helpful for reviewing current or past incidents.

Inputs: includeArchived, pageSize, pageOffset, query, +1 more.

get-metric-metadataB

Retrieve detailed metadata about a specific metric, including its type, description, unit, and other attributes. Use this to understand a metric's meaning and proper usage.

Inputs: metricName (required).

get-metricsB

List available metrics from Datadog. Optionally use the q parameter to search for specific metrics matching a pattern. Helpful for discovering metrics to use in monitors or dashboards.

Inputs: q.

get-monitorB

Get detailed information about a specific Datadog monitor by its ID. Use this to retrieve the complete configuration, status, and other details of a single monitor.

Inputs: monitorId (required).

get-monitorsB

Fetch monitors from Datadog with optional filtering. Use groupStates to filter by monitor status (e.g., 'alert', 'warn', 'no data'), tags or monitorTags to filter by tag criteria, and limit to control result size.

Inputs: groupStates, tags, monitorTags, limit.

search-logsB

Search logs in Datadog with advanced filtering options. Use filter.query for search terms (e.g., 'service:web-app status:error'), from/to for time ranges (e.g., 'now-15m', 'now'), and sort to order results. Essential for investigating application issues.

Inputs: filter, sort, page, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Datadog resources: logs (aggregate-logs, search-logs), dashboards (get-dashboard, get-dashboards), events (get-events), incidents (get-incidents), metrics (get-metric-metadata, get-metrics), and monitors (get-monitor, get-monitors). There is no overlap in functionality, and the descriptions clearly differentiate between analytical queries, retrieval operations, and search capabilities.

    Naming Consistency5/5

    All tool names follow a consistent verb-noun pattern with hyphens, using 'get-' for retrieval operations (e.g., get-dashboard, get-metrics) and descriptive prefixes for other actions (e.g., aggregate-logs, search-logs). This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.

    Tool Count5/5

    With 10 tools, the server is well-scoped for a Datadog integration, covering key areas like logs, dashboards, events, incidents, metrics, and monitors. Each tool serves a distinct and necessary function, avoiding redundancy while providing comprehensive access to core Datadog features without being overwhelming.

    Completeness4/5

    The tool set offers strong read-only coverage for Datadog's core resources, including retrieval and search operations. However, it lacks write operations (e.g., create, update, delete) for dashboards, monitors, or incidents, which could limit agents in full lifecycle management. Minor gaps exist, but agents can still perform essential monitoring and analysis tasks effectively.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers