
Datadog
STDIODatadog监控事件和仪表板管理服务
Datadog监控事件和仪表板管理服务
MCP server for the Datadog API, enabling incident management and more. Forked from https://github.com/winor30/mcp-server-datadog
list_incidents
pageSize
(optional number): Maximum number of incidents to return per page.pageOffset
(optional number): Offset for pagination.get_incident
incidentId
(string): Incident ID to fetch details for.get_monitors
groupStates
(optional array): States to filter (e.g., alert, warn, no data, ok).name
(optional string): Filter by name.tags
(optional array): Filter by tags.get_logs
query
(optional string): Datadog logs query string.from
(number): Start time in epoch seconds.to
(number): End time in epoch seconds.limit
(optional number): Maximum number of logs to return (defaults to 100).list_dashboards
name
(optional string): Filter dashboards by name.tags
(optional array): Filter dashboards by tags.get_dashboard
dashboardId
(string): ID of the dashboard to fetch.create_dashboard
title
(string): The title of the dashboard.description
(optional string): The description of the dashboard.layoutType
(optional string): The layout type ('ordered' or 'free', defaults to 'ordered').widgets
(optional array): The widgets to add to the dashboard.tags
(optional array): A list of tags to associate with the dashboard.query_metrics
query
(string): Metrics query string (e.g., "avg:system.cpu.user{*}").from
(number): Start time in epoch seconds.to
(number): End time in epoch seconds.get_metric_metadata
metricName
(string): Name of the metric to get metadata for.get_active_metrics
query
(string): Search query string to find metrics.from
(optional number): Unix timestamp from which to start the query (default: 24 hours ago).host
(optional string): Filter metrics by host.tagFilter
(optional string): Filter metrics by tags (e.g. "env:prod,region:us-east").analyze_tag_relationships
from
(optional number): Unix timestamp from which to start analyzing tags (default: now - 1 day).limit
(optional number): Maximum number of tag relationships to analyze (default: 50).metricPrefix
(optional string): Optional prefix to filter metrics by (e.g., "system." or "aws.").analyze_tag_cardinality
from
(optional number): Unix timestamp from which to start analyzing tags (default: now - 1 day).limit
(optional number): Maximum number of tags to analyze (default: 50).metricPrefix
(optional string): Optional prefix to filter metrics by (e.g., "system." or "aws.").minCardinality
(optional number): Minimum cardinality threshold to report (default: 10).visualize_tag_co_occurrence
metricName
(string): Name of the metric to analyze tags for.from
(optional number): Unix timestamp from which to start analyzing tags (default: now - 1 day).limit
(optional number): Maximum number of tag pairs to analyze (default: 20).search_events
query
(string): Datadog events query string.from
(optional string): Start time as string - either epoch seconds or relative time (e.g., "now-40m") (default: "now-24h").to
(optional string): End time as string - either epoch seconds or relative time (e.g., "now") (default: "now").limit
(optional number): Maximum number of events to return (default: 100).sort
(optional string): Sort order for events (default: "-timestamp").list_traces
query
(string): Datadog APM trace query string.from
(number): Start time in epoch seconds.to
(number): End time in epoch seconds.limit
(optional number): Maximum number of traces to return (defaults to 100).sort
(optional string): Sort order for traces (defaults to '-timestamp').service
(optional string): Filter by service name.operation
(optional string): Filter by operation name.list_apm_services
limit
(optional number): Maximum number of services to return (defaults to 100).list_apm_resources
service
(string): Service name to filter resources by.entry_spans_only
(optional boolean): Filter to only show service entry spans.limit
(optional number): Maximum number of resources to return (defaults to 100).search_query
(optional string): Search query to filter resource names by.list_apm_operations
service
(string): Service name to filter operations by.entry_spans_only
(optional boolean): Filter to only show service entry spans.limit
(optional number): Maximum number of operations to return (defaults to 100).get_resource_hash
service
(string): Service name the resource belongs to.resource_name
(string): Resource name to get the hash for.get_all_services
from
(optional number): Start time in epoch seconds (defaults to 24 hours ago).to
(optional number): End time in epoch seconds (defaults to current time).limit
(optional number): Maximum number of logs to search through (defaults to 1000).query
(optional string): Optional query filter for log search.list_hosts
filter
(optional string): Filter string for search results.sort_field
(optional string): Field to sort hosts by.sort_dir
(optional string): Sort direction (asc/desc).start
(optional number): Starting offset for pagination.count
(optional number): Max number of hosts to return (max: 1000).from
(optional number): Search hosts from this UNIX timestamp.include_muted_hosts_data
(optional boolean): Include muted hosts status and expiry.include_hosts_metadata
(optional boolean): Include host metadata (version, platform, etc).get_active_hosts_count
from
(optional number): Number of seconds from which you want to get total number of active hosts (defaults to 2h).mute_host
hostname
(string): The name of the host to mute.message
(optional string): Message to associate with the muting of this host.end
(optional number): POSIX timestamp for when the mute should end.override
(optional boolean): If true and the host is already muted, replaces existing end time.unmute_host
hostname
(string): The name of the host to unmute.list_notebooks
query
(optional string): Return only notebooks with this query string in notebook name or author handle.authorHandle
(optional string): Return notebooks created by the given author handle.excludeAuthorHandle
(optional string): Return notebooks not created by the given author handle.start
(optional number): The index of the first notebook to return.count
(optional number): The number of notebooks to be returned.sortField
(optional string): Sort by field (modified, name, created).sortDir
(optional string): Sort direction (asc, desc).type
(optional string): Return only notebooks with that metadata type.isTemplate
(optional boolean): True value returns only template notebooks.includeCells
(optional boolean): Value of false excludes the cells and global time for each notebook.get_notebook
notebookId
(number): Unique ID of the notebook to retrieve.create_notebook
name
(string): The name of the notebook.cells
(optional array): Cells to include in the notebook.time
(optional string): Time settings for the notebook (defaults to '1h').metadata
(optional object): Additional metadata for the notebook.add_cell_to_notebook
notebookId
(number): The ID of the notebook to add the cell to.cell
(object): The cell definition to add.list_downtimes
currentOnly
(optional boolean): Return only currently active downtimes when true.schedule_downtime
scope
(string): Scope to apply downtime to (e.g. 'host:my-host').start
(optional number): UNIX timestamp for the start of the downtime.end
(optional number): UNIX timestamp for the end of the downtime.message
(optional string): A message to include with the downtime.timezone
(optional string): The timezone for the downtime.monitorId
(optional number): The ID of the monitor to mute.monitorTags
(optional array): A list of monitor tags for filtering.recurrence
(optional object): Recurrence settings for the downtime.cancel_downtime
downtimeId
(number): The ID of the downtime to cancel.You need valid Datadog API credentials to use this MCP server:
DATADOG_API_KEY
: Your Datadog API keyDATADOG_APP_KEY
: Your Datadog Application keyDATADOG_SITE
(optional): The Datadog site (e.g. datadoghq.eu
)Export them 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 for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ndevvy/mcp-server-datadog --client claude
pnpm install pnpm build pnpm watch # for development with auto-rebuild
Add to your claude_desktop_config.json
or .cursor/mcp.json
:
{ "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>" // Optional } } } }
Because MCP servers communicate over standard input/output, debugging can sometimes be tricky. We recommend using the MCP Inspector. You can run the inspector with:
npm run inspector
The inspector will provide a URL you can open in your browser to see logs and send requests manually.
This project is licensed under the Apache License, Version 2.0.