datadog mcp
Datadog MCP サーバー
Datadog API と対話するためのモデル コンテキスト プロトコル (MCP) サーバー。
特徴
監視: 監視データと構成にアクセスします
ダッシュボード: ダッシュボードの定義を取得して表示する
メトリクス: 利用可能なメトリクスとそのメタデータを照会する
イベント: 時間枠内でイベントを検索して取得する
ログ: 高度なフィルタリングと並べ替えオプションを使用してログを検索します
インシデント: インシデント管理データにアクセスする
API統合: Datadogのv1およびv2 APIとの直接統合
包括的なエラー処理: APIおよび認証の問題に関する明確なエラーメッセージ
サービス固有のエンドポイント: ログとメトリックのさまざまなエンドポイントのサポート
Related MCP server: ClickHouse Trace-Activity MCP Server
前提条件
Node.js (バージョン 16 以上)
Datadog アカウント:
APIキー - 組織設定 > APIキーにあります
アプリケーションキー - 組織設定 > アプリケーションキーにあります
インストール
npm経由(推奨)
npm install -g datadog-mcp-serverソースから
このリポジトリをクローンする
依存関係をインストールします:
npm installプロジェクトをビルドします。
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.comEU:
datadoghq.euUS3(GovCloud):
ddog-gov.comUS5:
us5.datadoghq.comAP1:
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.jsonWindows:
%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 : オプションのフィルタリングを使用してインシデントを一覧表示する
search-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 エラーが発生した場合は、次の点を確認してください。
APIキーとアプリケーションキーは正しいです
キーには要求されたリソースにアクセスするために必要な権限があります
あなたのアカウントは要求されたデータにアクセスできます
地域に適したエンドポイントを使用していること(例: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 Forbidden: Datadog API キーの認証問題
APIキーまたはアプリキーの形式が無効です: 完全なキー文字列を使用していることを確認してください
サイト構成エラー: 正しい Datadog ドメインを使用していることを確認してください
エンドポイントの不一致: ログとメトリックに別々のドメインを使用している場合は、サービス固有のエンドポイントが正しく設定されていることを確認します。
ライセンス
マサチューセッツ工科大学
Available Tools
10 toolsaggregate-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
Scored across 10 tools
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.
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.
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.
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
Related MCP Connectors
Blockchain intelligence for tracing funds, screening addresses, and investigating on-chain activity.
Gain visibility into the performance, availability, and health of your apps and infrastructure.
Track errors, manage performance alerts, and configure dashboards and monitors
Monitor, troubleshoot, and optimize your technology stack with Intelligent Observability.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for tracing, logging, and debugging multi-agent systems by capturing sessions, spans, and events in a queryable trace tree.1MIT
- AlicenseNot gradedqualityDmaintenanceTracks a user's activity by trace ID from application logs stored in ClickHouse. Provides tools for log timeline, trace summaries, and search across services.MIT
- AlicenseNot gradedqualityDmaintenanceProvides unified AI agent observability including tracing, cost tracking, performance monitoring, anomaly detection, and audit trails via MCP.84 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for writing structured traces, spans, and decisions, enabling observability and EU AI Act traceability compliance for AI agent tasks.43 npmMIT