Datadog MCP Server
The Datadog MCP Server enables interaction with the Datadog API for log and trace span management:
Log Search: Search and retrieve logs with filters for query, time range, and pagination.
Trace Span Search: Search for distributed trace spans with similar filtering options and pagination support.
Trace Span Aggregation: Aggregate trace spans by dimensions like service, resource_name, or status, with methods including count, avg, sum, min, max, and pct, across specified time intervals.
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.
Click on "Install 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 MCP Serversearch logs from the last hour for errors in the payment service"
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 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
Related MCP server: Datadog MCP Server
Tools
search_logsSearch 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_spansSearch 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_spansAggregate 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)
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:
npm install # or pnpm installBuild the TypeScript project:
npm run build # or pnpm run build
Docker Setup
You can build using Docker with the following command:
docker build -t datadog-mcp .Usage with Claude Desktop
To use this with Claude Desktop, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"datadog": {
"command": "node",
"args": [
"/path/to/datadog-mcp/build/index.js"
],
"env": {
"DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
"DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
}
}
}
}If you're using Docker, you can configure it like this:
{
"mcpServers": {
"datadog": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DD_API_KEY",
"-e",
"DD_APP_KEY",
"datadog-mcp"
],
"env": {
"DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
"DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
}
}
}
}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:
{
"mcp": {
"servers": {
"datadog": {
"command": "node",
"args": [
"/path/to/datadog-mcp/build/index.js"
],
"env": {
"DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
"DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
}
}
}
}
}If you're using Docker, you can configure it like this:
{
"mcp": {
"servers": {
"datadog": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DD_API_KEY",
"-e",
"DD_APP_KEY",
"datadog-mcp"
],
"env": {
"DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
"DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
}
}
}
}
}Alternatively, you can add this to a .vscode/mcp.json file in your workspace (without the mcp key):
{
"servers": {
"datadog": {
"command": "node",
"args": [
"/path/to/datadog-mcp/build/index.js"
],
"env": {
"DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
"DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
}
}
}
}If you're using Docker, you can configure it like this:
{
"servers": {
"datadog": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DD_API_KEY",
"-e",
"DD_APP_KEY",
"datadog-mcp"
],
"env": {
"DD_API_KEY": "<YOUR_DATADOG_API_KEY>",
"DD_APP_KEY": "<YOUR_DATADOG_APP_KEY>"
}
}
}
}Available Tools
3 toolsaggregate_spansC
Tool for aggregating Datadog trace spans
| Name | Required | Description | Default |
|---|---|---|---|
| filterQuery | No | Query string to search for (optional, default is '*') | * |
| filterFrom | No | Search start time (UNIX timestamp in seconds, optional, default is 15 minutes ago) | |
| filterTo | No | Search end time (UNIX timestamp in seconds, optional, default is current time) | |
| groupBy | No | Attributes to group by (example: ['service', 'resource_name']) | |
| interval | No | Time interval to group results by (optional, only used when type is timeseries) | |
| type | No | Result type - timeseries or total (optional, default is 'timeseries') | timeseries |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but provides minimal behavioral insight. It doesn't disclose whether this is a read-only operation, its performance characteristics, rate limits, or what the aggregation output looks like. The description only states the tool's purpose without behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's appropriately sized for a tool with a clear name and detailed schema. However, it could be more front-loaded with key details like aggregation type.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter aggregation tool with no annotations and no output schema, the description is incomplete. It doesn't explain the return format, aggregation metrics, or how results are structured. The schema handles parameters well, but behavioral and output context is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 6 parameters. The description adds no parameter-specific information beyond what's in the schema. Baseline 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate or add value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool aggregates Datadog trace spans, which is a clear purpose. However, it doesn't specify what aggregation means (e.g., counting, averaging, summing) or how it differs from sibling tools like search_spans. The verb 'aggregating' is specific but lacks operational detail.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like search_spans. The description doesn't mention any prerequisites, exclusions, or contextual cues for selection. Usage is implied only by the tool name and basic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_logsC
Tool for searching Datadog logs
| Name | Required | Description | Default |
|---|---|---|---|
| filterQuery | No | Query string to search logs (optional, default is '*') | * |
| filterFrom | No | Search start time (UNIX timestamp in seconds, optional, default is 15 minutes ago) | |
| filterTo | No | Search end time (UNIX timestamp in seconds, optional, default is current time) | |
| pageLimit | No | Maximum number of logs to retrieve (optional, default is 25) | |
| pageCursor | No | Cursor to retrieve the next page (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic function. It doesn't mention authentication needs, rate limits, pagination behavior beyond the cursor parameter, error handling, or what the output looks like (especially critical since there's no output schema). For a search tool with 5 parameters and no annotations, this is inadequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's appropriately sized for a basic tool description, though it could be more informative while remaining concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (5 parameters, no annotations, no output schema, and sibling tools), the description is incomplete. It doesn't help the agent understand what the tool returns, how to interpret results, or how it differs from similar tools. For a search operation with multiple parameters and no output schema, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional meaning about parameters beyond implying a search function. It doesn't explain query syntax, time format nuances, or how pagination works in practice. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Tool for searching Datadog logs' states the basic action (searching) and resource (Datadog logs), but it's vague about scope and doesn't differentiate from sibling tools like 'search_spans'. It doesn't specify what kind of logs or what search capabilities exist beyond the basic verb+resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'search_spans' or 'aggregate_spans'. The description doesn't mention any context, prerequisites, or exclusions for usage, leaving the agent with no comparative information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_spansC
Tool for searching Datadog trace spans
| Name | Required | Description | Default |
|---|---|---|---|
| filterQuery | No | Query string to search for (optional, default is '*') | * |
| filterFrom | No | Search start time (UNIX timestamp in seconds, optional, default is 15 minutes ago) | |
| filterTo | No | Search end time (UNIX timestamp in seconds, optional, default is current time) | |
| pageLimit | No | Maximum number of spans to retrieve (optional, default is 25) | |
| pageCursor | No | Cursor to retrieve the next page (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It only states it's a search tool without mentioning whether it's read-only, what permissions are needed, rate limits, pagination behavior (though schema hints at it), or what the output looks like. For a search tool with 5 parameters, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a search tool, though it could be more informative by adding context about when to use it versus siblings.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns, how results are structured, or behavioral aspects like pagination. For a search tool with moderate complexity, this leaves too much unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 5 parameters with their types, defaults, and descriptions. The description adds no additional parameter information beyond what's in the schema. This meets the baseline of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool searches Datadog trace spans, which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools like 'aggregate_spans' (which likely aggregates rather than searches) or 'search_logs' (which searches logs rather than spans). The purpose is understandable but lacks sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose search_spans over aggregate_spans or search_logs, nor any context about prerequisites or typical use cases. The user must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.0- Changed
aggregate_spans11 fields changed- removed
Input schema / properties / aggregationRemoved value: -{ - "default": "count", - "description": "集計関数(オプション、デフォルトは「count」)", - "enum": [ - "count", - "avg", - "sum", - "min", - "max", - "pct" - ], - "type": "string" -} - changed
Input schema / properties / filterFrom / defaultPrevious value: -1745805204.363New value: +1767414583.907 - changed
Input schema / properties / filterFrom / descriptionPrevious value: -"検索開始時間(UNIXタイムスタンプ、秒単位、オプション、デフォルトは15分前)"New value: +"Search start time (UNIX timestamp in seconds, optional, default is 15 minutes ago)" - changed
Input schema / properties / filterQuery / descriptionPrevious value: -"検索するためのクエリ文字列(オプション、デフォルトは「*」)"New value: +"Query string to search for (optional, default is '*')" - changed
Input schema / properties / filterTo / defaultPrevious value: -1745806104.363New value: +1767415483.907 - changed
Input schema / properties / filterTo / descriptionPrevious value: -"検索終了時間(UNIXタイムスタンプ、秒単位、オプション、デフォルトは現在時刻)"New value: +"Search end time (UNIX timestamp in seconds, optional, default is current time)" - changed
Input schema / properties / groupBy / descriptionPrevious value: -"グループ化するための属性(例: ['service', 'resource_name'])"New value: +"Attributes to group by (example: ['service', 'resource_name'])" - added
Input schema / properties / groupBy / items / enumAdded value: +[ + "service", + "resource_name", + "env", + "status", + "operation_name", + "type", + "@version", + "@http.status_code", + "@http.client_ip", + "@http.url", + "@http.method", + "@http.host", + "@http.user_agent", + "@http.path_group", + "@http.route" +] - removed
Input schema / properties / interval / defaultRemoved value: -"5m" - changed
Input schema / properties / interval / descriptionPrevious value: -"結果をグループ化する時間間隔(オプション、デフォルト '5m')"New value: +"Time interval to group results by (optional, only used when type is timeseries)" - changed
Input schema / properties / type / descriptionPrevious value: -"結果タイプ - timeseries または total(オプション、デフォルトは「timeseries」)"New value: +"Result type - timeseries or total (optional, default is 'timeseries')"
- Changed
search_logs7 fields changed- changed
Input schema / properties / filterFrom / defaultPrevious value: -1745805204.363New value: +1767414583.907 - changed
Input schema / properties / filterFrom / descriptionPrevious value: -"検索開始時間(UNIXタイムスタンプ、秒単位、オプション、デフォルトは15分前)"New value: +"Search start time (UNIX timestamp in seconds, optional, default is 15 minutes ago)" - changed
Input schema / properties / filterQuery / descriptionPrevious value: -"ログを検索するためのクエリ文字列(オプション、デフォルトは「*」)"New value: +"Query string to search logs (optional, default is '*')" - changed
Input schema / properties / filterTo / defaultPrevious value: -1745806104.363New value: +1767415483.907 - changed
Input schema / properties / filterTo / descriptionPrevious value: -"検索終了時間(UNIXタイムスタンプ、秒単位、オプション、デフォルトは現在時刻)"New value: +"Search end time (UNIX timestamp in seconds, optional, default is current time)" - changed
Input schema / properties / pageCursor / descriptionPrevious value: -"次のページを取得するためのカーソル(オプション)"New value: +"Cursor to retrieve the next page (optional)" - changed
Input schema / properties / pageLimit / descriptionPrevious value: -"取得するログの最大数(オプション、デフォルトは25)"New value: +"Maximum number of logs to retrieve (optional, default is 25)"
- Changed
search_spans7 fields changed- changed
Input schema / properties / filterFrom / defaultPrevious value: -1745805204.364New value: +1767414583.907 - changed
Input schema / properties / filterFrom / descriptionPrevious value: -"検索開始時間(UNIXタイムスタンプ、秒単位、オプション、デフォルトは15分前)"New value: +"Search start time (UNIX timestamp in seconds, optional, default is 15 minutes ago)" - changed
Input schema / properties / filterQuery / descriptionPrevious value: -"検索するためのクエリ文字列(オプション、デフォルトは「*」)"New value: +"Query string to search for (optional, default is '*')" - changed
Input schema / properties / filterTo / defaultPrevious value: -1745806104.364New value: +1767415483.907 - changed
Input schema / properties / filterTo / descriptionPrevious value: -"検索終了時間(UNIXタイムスタンプ、秒単位、オプション、デフォルトは現在時刻)"New value: +"Search end time (UNIX timestamp in seconds, optional, default is current time)" - changed
Input schema / properties / pageCursor / descriptionPrevious value: -"次のページを取得するためのカーソル(オプション)"New value: +"Cursor to retrieve the next page (optional)" - changed
Input schema / properties / pageLimit / descriptionPrevious value: -"取得するスパンの最大数(オプション、デフォルトは25)"New value: +"Maximum number of spans to retrieve (optional, default is 25)"
3 tool updates
- First observed
aggregate_spans - First observed
search_logs - First observed
search_spans
TDQS
The three tools are mostly distinct, with 'aggregate_spans' focusing on aggregation of trace data, 'search_logs' targeting log data, and 'search_spans' targeting trace data. However, 'aggregate_spans' and 'search_spans' both operate on spans and could be confused for overlapping purposes, though their descriptions clarify one aggregates and the other searches.
All tool names follow a consistent verb_noun pattern with snake_case, using 'aggregate' and 'search' as verbs paired with specific nouns like 'spans' and 'logs'. There are no deviations in naming style or convention.
With only 3 tools, the server feels thin for a Datadog integration, which typically involves monitoring, metrics, dashboards, and alerts. While the tools cover traces and logs, the scope is limited, making it borderline appropriate for the apparent domain.
The tool surface has significant gaps for a Datadog server, missing core operations like querying metrics, managing dashboards, setting alerts, or accessing APM data beyond spans. Agents will struggle with incomplete coverage for common monitoring workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- SuperlogOAuthsh.superlog
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Investigate errors, track deployments, analyze performance, and manage application monitoring
Query Honeycomb observability data: traces, events, metrics, SLOs, triggers, and boards.
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables monitoring and querying of Datadog metrics for Kubernetes clusters, APM traces, infrastructure hosts, and databases through a unified interface.15-
- AlicenseBqualityDmaintenanceEnables interaction with Datadog's monitoring and observability platform through the MCP protocol. Supports incident management, monitor status checks, log searches, metrics queries, APM traces, dashboard access, RUM analytics, host management, and downtime scheduling.1318Apache 2.0
- FlicenseBqualityDmaintenanceEnables AI assistants to interact with Datadog APIs for querying metrics, logs, events, monitors, and APM traces.164-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Datadog's observability platform via natural language, covering metrics, logs, APM, monitors, dashboards, incidents, and infrastructure.1,1061MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tuno-dev/datadog-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server