datadog-logs-mcp
Provides tools for querying Datadog logs, including searching logs with time range, sorting, and pagination; retrieving individual log entries; performing aggregations (count, avg, sum, min, max, percentiles) with group-by breakdowns; and listing configured log indexes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datadog-logs-mcp search logs for error status:500 in the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
datadog-logs-mcp
MCP server for querying Datadog logs. Use with Claude Code, Claude Desktop, or any MCP-compatible client.
Setup
{
"mcpServers": {
"datadog-logs": {
"command": "npx",
"args": ["-y", "datadog-logs-mcp"],
"env": {
"DD_API_KEY": "your-api-key",
"DD_APP_KEY": "your-app-key",
"DD_SITE": "datadoghq.com"
}
}
}
}Environment Variables
Variable | Required | Description |
| Yes | Datadog API key |
| Yes | Datadog Application key |
| No | Datadog site (default: |
Related MCP server: Datadog Logs MCP Server
Tools
search_logs
Search logs using Datadog log search syntax with time range, sorting, and pagination.
get_log
Get a specific log entry by ID.
aggregate_logs
Aggregate logs with computations (count, avg, sum, min, max, percentiles) and group-by breakdowns.
list_indexes
List all configured log indexes.
License
MIT
Available Tools
3 toolsaggregate_logsA
Aggregate Datadog logs to compute metrics like count, avg, sum, min, max, percentiles. Supports group-by for breakdowns.
Inputs: query (required), compute (required), to, from, +1 more.
get_logA
Retrieve a specific Datadog log entry by its unique ID. Requires the approximate timestamp of the log to narrow the search.
Inputs: log_id (required), timestamp (required).
search_logsA
Search Datadog logs using the log search syntax. Returns matching log entries with their attributes, timestamps, and metadata.
Inputs: query (required), to, from, sort, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct operation: search_logs filters and returns multiple entries, get_log fetches a single entry by ID, and aggregate_logs computes metrics. There is no meaningful overlap, making tool selection unambiguous.
All tool names follow the same verb_noun snake_case pattern (search_logs, get_log, aggregate_logs), which is predictable and consistent across the set.
Three tools is a well-scoped count for a log-focused server. It covers the core operations (search, retrieve, aggregate) without unnecessary bloat or thinness.
The set covers the primary log reading and analysis workflow: searching, fetching by ID, and aggregating metrics. Minor gaps like log index listing or log ingestion are absent but not essential for the apparent purpose.
Related MCP Connectors
Query your app's logs, metrics and incidents from your AI assistant.
Ingest and search LogsLoom logs from coding agents.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Search log events, investigate anomalies, and manage cases in your Knowledge Grid tenant.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.3MIT
- AlicenseBqualityDmaintenanceEnables searching and retrieving Datadog logs through the Model Context Protocol with customizable queries, time ranges, and result limits.3MIT
- FlicenseAqualityDmaintenanceEnables querying OpenTelemetry logs stored in OpenSearch across development and production environments. Provides tools for searching logs by various criteria including free-text Lucene queries, trace IDs, service names, error levels, and specific fields.8-
- AlicenseAqualityDmaintenanceEnables AI assistants to search logs, query metrics, manage dashboards, analyze APM traces, and control monitors via Datadog APIs.30MIT