pulumi cloud development.com
pulumi cloud development.com logo

Pulumi Cloud Development

Integrates with Pulumi's cloud development platform to streamline infrastructure-as-code operations for efficient cloud...

Created byApr 23, 2025

Datadog Model Context Protocol (MCP)

[![smithery badge](https://smithery.ai/badge/@didlawowo/mcp-collection)](https://smithery.ai/server/@didlawowo/mcp-collection)
A Python-based tool to interact with Datadog API and fetch monitoring data from your infrastructure. This MCP provides easy access to monitor states and Kubernetes logs through a simple interface.

Datadog Features

  • **Monitor State Tracking**: Fetch and analyze specific monitor states
  • **Kubernetes Log Analysis**: Extract and format error logs from Kubernetes clusters

Prerequisites

  • Python 3.11+
  • Datadog API and Application keys (with correct permissions)
  • Access to Datadog site

Installation

Installing via Smithery

To install Datadog for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@didlawowo/mcp-collection):
Required packages:

Environment Setup

Create a `.env` file with your Datadog credentials:

Setup Claude Desktop Setup for MCP

  1. Install Claude Desktop
  1. Set up Datadog MCP config:

Usage

![get logs](assets/logs.gif)
![get monitor](assets/monitor.gif)

Architecture

  • **FastMCP Base**: Utilizes FastMCP framework for tool management
  • **Modular Design**: Separate functions for monitors and logs
  • **Type Safety**: Full typing support with Python type hints
  • **API Abstraction**: Wrapped Datadog API calls with error handling
I'll add a section about MCP and Claude Desktop setup:

Model Context Protocol (MCP) Introduction

What is MCP?

Model Context Protocol (MCP) is a framework allowing AI models to interact with external tools and APIs in a standardized way. It enables models like Claude to:
  • Access external data
  • Execute commands
  • Interact with APIs
  • Maintain context across conversations

some examples of MCP servers

<https://github.com/punkpeye/awesome-mcp-servers?tab=readme-ov-file>

Tutorial for setup MCP

<https://medium.com/@pedro.aquino.se/how-to-use-mcp-tools-on-claude-desktop-app-and-automate-your-daily-tasks-1c38e22bc4b0>

How it works - Available Functions

the LLM use provided function to get the data and use it

1. Get Monitor States

Example:

2. Get Kubernetes Logs

Example:

4. Verify Installation

In Claude chat desktop

check datadog connection in claude
![setup claude](assets/config.png)

5. Use Datadog MCP Tools

Security Considerations

  • Store API keys in `.env`
  • MCP runs in isolated environment
  • Each tool has defined permissions
  • Rate limiting is implemented

Troubleshooting

Using MCP Inspector

The MCP Inspector provides:
  • Real-time view of MCP server status
  • Function call logs
  • Error tracing
  • API response monitoring

Common issues and solutions

  1. **API Authentication Errors** ```bash Error: (403) Forbidden ``` Check your DD_API_KEY and DD_APP_KEY in .env
  1. **MCP Connection Issues** ```bash Error: Failed to connect to MCP server ``` Verify your claude_desktop_config.json path and content
  1. **Monitor Not Found** ```bash Error: No monitor found with name 'xxx' ``` Check monitor name spelling and case sensitivity
  1. **logs can be found here**
![alt text](assets/logs.png)

Contributing

Feel free to:
  1. Open issues for bugs
  1. Submit PRs for improvements
  1. Add new features

Notes

  • API calls are made to Datadog EU site
  • Default timeframe is 1 hour for monitor states
  • Page size limits are set to handle most use cases