The Datadog MCP server allows you to integrate Datadog monitoring capabilities with Model Context Protocol (MCP) interfaces, enabling you to manage incidents, monitors, logs, dashboards, metrics, and more through a standardized protocol.
Before using the Datadog MCP server, you need valid Datadog API credentials:
DATADOG_API_KEY
: Your Datadog API keyDATADOG_APP_KEY
: Your Datadog Application keyDATADOG_SITE
(optional): The Datadog site (e.g. datadoghq.eu
)Export these in your environment before running the server:
export DATADOG_API_KEY="your_api_key"
export DATADOG_APP_KEY="your_app_key"
export DATADOG_SITE="your_datadog_site"
To install Datadog MCP Server automatically via Smithery:
npx -y @smithery/cli install @winor30/mcp-server-datadog --client claude
pnpm install
pnpm build
pnpm watch # for development with auto-rebuild
To use with Claude Desktop, add the server configuration to your claude_desktop_config.json
file:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Using a local installation:
{
"mcpServers": {
"datadog": {
"command": "/path/to/mcp-server-datadog/build/index.js",
"env": {
"DATADOG_API_KEY": "<YOUR_API_KEY>",
"DATADOG_APP_KEY": "<YOUR_APP_KEY>",
"DATADOG_SITE": "<YOUR_SITE>"
}
}
}
}
Or using npx:
{
"mcpServers": {
"mcp-server-datadog": {
"command": "npx",
"args": ["-y", "@winor30/mcp-server-datadog"],
"env": {
"DATADOG_API_KEY": "<YOUR_API_KEY>",
"DATADOG_APP_KEY": "<YOUR_APP_KEY>",
"DATADOG_SITE": "<YOUR_SITE>"
}
}
}
}
list_incidents
Optional parameters:
filter
: Filter string (e.g., status, priority)pagination
: Page size/offset detailsget_incident
Required parameters:
incident_id
: ID of the incident to retrieveget_monitors
Optional parameters:
groupStates
: States to filter (e.g., alert, warn, no data, ok)name
: Filter by nametags
: Filter by tagsget_logs
Required parameters:
query
: Logs query stringfrom
: Start time (epoch seconds)to
: End time (epoch seconds)Optional parameters:
limit
: Maximum logs to return (default: 100)list_dashboards
Optional parameters:
name
: Filter by nametags
: Filter by tagsget_dashboard
Required parameters:
dashboard_id
: ID of the dashboard to fetchquery_metrics
Required parameters:
query
: Metrics query stringfrom
: Start time (epoch seconds)to
: End time (epoch seconds)list_traces
Required parameters:
query
: APM trace query stringfrom
: Start time (epoch seconds)to
: End time (epoch seconds)Optional parameters:
limit
: Maximum traces to return (default: 100)sort
: Sort order (default: '-timestamp')service
: Filter by service nameoperation
: Filter by operation namelist_hosts
Optional parameters:
filter
: Filter stringsort_field
: Field to sort bysort_dir
: Sort direction (asc/desc)get_active_hosts_count
Optional parameters:
from
: Time period in seconds (default: 2h)mute_host
Required parameters:
hostname
: Host to muteOptional parameters:
message
: Explanation messageend
: End time (epoch seconds)override
: Whether to override existing muteunmute_host
Required parameters:
hostname
: Host to unmutelist_downtimes
Optional parameters:
currentOnly
: Only show active downtimesmonitorId
: Filter by monitor IDschedule_downtime
Required parameters:
scope
: Scope to apply downtime to (e.g., 'host:my-host')Optional parameters:
cancel_downtime
Required parameters:
downtimeId
: ID of downtime to cancelget_rum_applications
get_rum_events
Required parameters:
query
: RUM query stringfrom
: Start time (epoch seconds)to
: End time (epoch seconds)Optional parameters:
limit
: Maximum events to returnget_rum_grouped_event_count
: Group and count RUM eventsget_rum_page_performance
: Get page performance metricsget_rum_page_waterfall
: Retrieve page waterfall dataFor debugging issues with the MCP server, use the MCP Inspector:
npm run inspector
This will provide a URL to open in your browser where you can view logs and manually send requests.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.