home / mcp / datadog mcp server
mcp-collection
Configuration
View docs{
"mcpServers": {
"didlawowo-mcp-collection": {
"command": "uv",
"args": [
"run",
"--with",
"datadog-api-client",
"--with",
"fastmcp",
"--with",
"icecream",
"--with",
"loguru",
"--with",
"python-dotenv",
"fastmcp",
"run",
"/your-path/mcp-collection/datadog/main.py"
],
"env": {
"DD_API_KEY": "xxxx",
"DD_APP_KEY": "xxx"
}
}
}
}You can use this MCP server to access Datadog monitoring data and Kubernetes logs through a standardized, tool-driven interface. It provides quick commands to fetch monitor states and to retrieve recent logs from your Kubernetes clusters, enabling automated workflows and conversational data insights.
You interact with the Datadog MCP Server by invoking the two core functions it exposes: get_monitor_states and get_k8s_logs.
Prerequisites you need before installing and using this MCP server are Python 3.11 or newer and Datadog API and Application keys with the correct permissions.
Create a dedicated environment file containing your credentials.
Next, configure Claude Desktop to run the MCP server using the provided runtime command and arguments.
# 1) Prerequisites
# - Python 3.11+
# - Datadog DD_API_KEY and DD_APP_KEY
# 2) Environment setup (example)
# Create a .env file with your credentials
DD_API_KEY=your_api_key
DD_APP_KEY=your_app_key
# 3) MCP runtime configuration for Claude Desktop
# This JSON config configures the MCP server to run under Claude Desktop
```json
{
"Datadog-MCP-Server": {
"command": "uv",
"args": [
"run",
"--with",
"datadog-api-client",
"--with",
"fastmcp",
"--with",
"icecream",
"--with",
"loguru",
"--with",
"python-dotenv",
"fastmcp",
"run",
"/your-path/mcp-collection/datadog/main.py"
],
"env": {
"DD_API_KEY": "xxxx",
"DD_APP_KEY": "xxx"
}
}
}
```
# 4) Start the Claude Desktop application and load this MCP configuration, then ensure your environment variables are set in the running environment.Environment variables store sensitive credentials, so keep the .env file outside version control and restrict access to the machine running Claude Desktop.
The MCP server runs within an isolated environment to minimize security risks, and each tool has defined permissions to prevent excessive access.
If you encounter issues, verify that your Datadog API keys are correct and present in the environment, confirm the MCP runtime command matches the configured setup, and check that Claude Desktop can access the path to your MCP script.
Common issues and quick checks:
- API authentication errors indicate invalid or missing keys in the environment file.
- Connection issues may point to an incorrect Claude Desktop config path or mismatched runtime command.
API calls target the Datadog EU site by default in this setup.
The default monitor lookback is one hour for monitor state queries.
Fetch monitor state information by name with an optional timeframe in hours to look back.
Retrieve Kubernetes logs for a given cluster, with optional timeframe in hours and optional namespace filter.