datadog-mcp
Enables AI assistants to query and manage Datadog observability data including metrics, logs, traces, and monitors through natural language. Supports read-only operations by default for security.
README
Datadog MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to interact with Datadog's observability platform through natural language.
Features
- Metrics: Query time-series data, list metrics, get metadata
- Logs: Search and filter log events
- APM: Access trace data, service maps, dependencies
- Infrastructure: Host information, container data, process metrics
- Dashboards: List and read dashboard configurations
- Monitors: Alert rules and status information
- Incidents: Incident tracking and management
- Service Catalog: Service definitions and relationships
- SLOs: Service level objectives and compliance data
- Usage: Account usage statistics
Installation
From Source
git clone https://github.com/brukhabtu/datadog-mcp.git
cd datadog-mcp
pip install -e .
Using Docker
docker pull ghcr.io/brukhabtu/datadog-mcp:latest
Configuration
Required Environment Variables
DATADOG_API_KEY="your-datadog-api-key"
DATADOG_APP_KEY="your-datadog-application-key"
Optional Environment Variables
DATADOG_BASE_URL="https://api.datadoghq.com" # Default US site
DATADOG_TIMEOUT=30 # Request timeout in seconds
MCP_TRANSPORT=stdio # Transport method (stdio/websocket)
MCP_PORT=8000 # Port for WebSocket transport
MCP_LOG_LEVEL=INFO # Logging level
MCP_ENABLE_SECURITY_FILTERING=true # Enable read-only filtering
Regional Endpoints
For different Datadog regions:
- US:
https://api.datadoghq.com(default) - EU:
https://api.datadoghq.eu - US3:
https://api.us3.datadoghq.com - US5:
https://api.us5.datadoghq.com - AP1:
https://api.ap1.datadoghq.com
Usage
Command Line
# Run with default stdio transport
datadog-mcp
# Run with WebSocket transport
datadog-mcp --transport websocket --port 8000
# Run with debug logging
datadog-mcp --log-level DEBUG
Docker
# Run with environment file
docker run --env-file .env ghcr.io/brukhabtu/datadog-mcp:latest
# Run with individual environment variables
docker run -e DATADOG_API_KEY=your-key \
-e DATADOG_APP_KEY=your-app-key \
ghcr.io/brukhabtu/datadog-mcp:latest
Claude Desktop Integration
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"datadog": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env", "DATADOG_API_KEY",
"--env", "DATADOG_APP_KEY",
"ghcr.io/brukhabtu/datadog-mcp:latest"
],
"env": {
"DATADOG_API_KEY": "your-datadog-api-key",
"DATADOG_APP_KEY": "your-datadog-application-key"
}
}
}
}
Or use the native installation:
{
"mcpServers": {
"datadog": {
"command": "datadog-mcp",
"args": ["--transport", "stdio"],
"env": {
"DATADOG_API_KEY": "your-datadog-api-key",
"DATADOG_APP_KEY": "your-datadog-application-key"
}
}
}
}
OpenAPI Specification
The server requires the Datadog v2 API OpenAPI specification to be placed at:
src/datadog_mcp/specs/datadog-v2.yaml
You can obtain this specification from:
- Datadog's API documentation
- Datadog's GitHub repositories
- Community-maintained specifications
Security
By default, the server runs with security filtering enabled (MCP_ENABLE_SECURITY_FILTERING=true), which restricts operations to read-only access. This includes:
Allowed Operations
- GET requests to query metrics, logs, traces, etc.
- Reading dashboards, monitors, and configurations
- Searching and filtering data
- Viewing usage statistics
Blocked Operations
- All POST, PUT, PATCH, DELETE operations
- User and API key management
- Organization settings modifications
- Any destructive actions
To disable security filtering (not recommended for production):
MCP_ENABLE_SECURITY_FILTERING=false
Example Interactions
Once configured, you can interact with Datadog through natural language:
- "Show me the error rate for my web service over the last hour"
- "List all active monitors that are alerting"
- "Get the CPU usage metrics for production hosts"
- "Show me recent incidents in the platform team"
- "What's our log volume usage this month?"
- "Find traces with high latency in the payment service"
- "Show me the service dependencies for the API gateway"
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/brukhabtu/datadog-mcp.git
cd datadog-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
Running Tests
pytest tests/
Building Docker Image
docker build -t datadog-mcp:local .
Architecture
The server follows the same architectural patterns as the Jira MCP implementation:
- FastMCP 2.0: Leverages automatic tool generation from OpenAPI specifications
- Security-First: Default read-only access with configurable filtering
- Environment Configuration: All settings via environment variables
- Docker-First: Containerized deployment for consistency
- Transport Flexibility: Supports both stdio and WebSocket transports
Troubleshooting
Authentication Errors
- Ensure both
DATADOG_API_KEYandDATADOG_APP_KEYare set correctly - Verify your keys have the necessary permissions in Datadog
- Check you're using the correct regional endpoint
Connection Issues
- Verify your network can reach the Datadog API
- Check if you need to configure proxy settings
- Ensure the timeout is sufficient for your queries
Missing Tools
- Verify the OpenAPI specification is present in
src/datadog_mcp/specs/ - Check the server logs for any specification loading errors
- Ensure the specification version matches your Datadog API version
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
License
MIT License - see LICENSE file for details
Credits
Based on the Jira MCP implementation pattern.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。