Integrations
Enables log search, trace span search, and trace span aggregation functionalities through the Datadog API, allowing users to retrieve and analyze logs and distributed trace data with flexible query and aggregation options.
Datadog MCP Server
MCP Server for Datadog API, enabling log search, trace span search, and trace span aggregation functionalities.
Features
- Log Search: Search and retrieve logs from Datadog with flexible query options
- Trace Span Search: Search for distributed trace spans with various filtering options
- Trace Span Aggregation: Aggregate trace spans by different dimensions for analysis
Tools
search_logs
- Search for logs in Datadog
- Inputs:
filterQuery
(optional string): Query string to search logs (default: "*")filterFrom
(optional number): Search start time as UNIX timestamp in seconds (default: 15 minutes ago)filterTo
(optional number): Search end time as UNIX timestamp in seconds (default: current time)pageLimit
(optional number): Maximum number of logs to retrieve (default: 25, max: 1000)pageCursor
(optional string): Pagination cursor for retrieving additional results
- Returns: Formatted text containing:
- Search conditions (query and time range)
- Number of logs found
- Next page cursor (if available)
- Log details including:
- Service name
- Tags
- Timestamp
- Status
- Message (truncated to 300 characters)
- Host
- Important attributes (http.method, http.url, http.status_code, error)
search_spans
- Search for trace spans in Datadog
- Inputs:
filterQuery
(optional string): Query string to search spans (default: "*")filterFrom
(optional number): Search start time as UNIX timestamp in seconds (default: 15 minutes ago)filterTo
(optional number): Search end time as UNIX timestamp in seconds (default: current time)pageLimit
(optional number): Maximum number of spans to retrieve (default: 25, max: 1000)pageCursor
(optional string): Pagination cursor for retrieving additional results
- Returns: Formatted text containing:
- Search conditions (query and time range)
- Number of spans found
- Next page cursor (if available)
- Span details including:
- Service name
- Timestamp
- Resource name
- Duration (in seconds)
- Host
- Environment
- Type
- Important attributes (http.method, http.url, http.status_code, error)
aggregate_spans
- Aggregate trace spans in Datadog by specified dimensions
- Inputs:
filterQuery
(optional string): Query string to filter spans for aggregation (default: "*")filterFrom
(optional number): Start time as UNIX timestamp in seconds (default: 15 minutes ago)filterTo
(optional number): End time as UNIX timestamp in seconds (default: current time)groupBy
(optional string[]): Dimensions to group by (e.g., ["service", "resource_name", "status"])aggregation
(optional string): Aggregation method - "count", "avg", "sum", "min", "max", "pct" (default: "count")interval
(optional string): Time interval for time series data (only when type is "timeseries")type
(optional string): Result type, either "timeseries" or "total" (default: "timeseries")
- Returns: Formatted text containing:
- Aggregation results in buckets, each including:
- Bucket ID
- Group by values (if groupBy is specified)
- Computed values based on the aggregation method
- Additional metadata:
- Processing time (elapsed)
- Request ID
- Status
- Warnings (if any)
- Aggregation results in buckets, each including:
Setup
You need to set up Datadog API and application keys:
- Get your API key and application key from the Datadog API Keys page
- Install dependencies in the datadog-mcp project:Copy
- Build the TypeScript project:Copy
Docker Setup
You can build using Docker with the following command:
Usage with Claude Desktop
To use this with Claude Desktop, add the following to your claude_desktop_config.json
:
If you're using Docker, you can configure it like this:
Usage with VS Code
For quick installation in VS Code, configure your settings:
- Open User Settings (JSON) in VS Code (
Ctrl+Shift+P
→Preferences: Open User Settings (JSON)
) - Add the following configuration:
If you're using Docker, you can configure it like this:
Alternatively, you can add this to a .vscode/mcp.json
file in your workspace (without the mcp
key):
If you're using Docker, you can configure it like this:
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.
Related MCP Servers
- AsecurityFlicenseAqualityInteracts with LogSeq via its API.Last updated -225Python
- -securityFlicense-qualityprovide access to monitor and cluster logs from datadogLast updated -2Python
- -securityFlicense-qualityIntegrates with Sumo Logic's API to enable log search with configurable queries and time ranges, supporting error handling and easy deployment via Docker.Last updated -TypeScript
- AsecurityAlicenseAqualityThe MCP server provides an interface to the Datadog API, enabling seamless management of incidents, monitoring, logs, dashboards, metrics, traces, and hosts. Its extensible design allows easy integration of additional Datadog APIs for future expansions.Last updated -1432236TypeScriptApache 2.0