datadog
Datadog モデルコンテキストプロトコル (MCP) 🔍
Datadog APIと連携し、インフラストラクチャから監視データを取得するためのPythonベースのツールです。このMCPは、シンプルなインターフェースから監視状態やKubernetesログに簡単にアクセスできます。
Datadog の機能 🌟
モニター状態追跡: 特定のモニター状態を取得して分析する
Kubernetes ログ分析: Kubernetes クラスターからエラー ログを抽出してフォーマットする
Related MCP server: MongoDB MCP Server
前提条件 📋
Python 3.11以上
Datadog API およびアプリケーション キー (適切な権限付き)
Datadogサイトへのアクセス
インストール🔧
Smithery経由でインストール
Smithery経由で Claude Desktop 用の Datadog を自動的にインストールするには:
npx -y @smithery/cli install @didlawowo/mcp-collection --client claude必要なパッケージ:
datadog-api-client
fastmcp
loguru
icecream
python-dotenv
uv環境設定 🔑
Datadog の認証情報を使用して.envファイルを作成します。
DD_API_KEY=your_api_key
DD_APP_KEY=your_app_keyMCP 用の Claude デスクトップ セットアップをセットアップする 🖥️
Claude Desktopをインストールする
# Assuming you're on macOS
brew install claude-desktop
# Or download from official website
https://claude.ai/desktopDatadog MCP 構成をセットアップします。
# on mac is
~/Library/Application\ Support/Claude/claude_desktop_config.json
# Add this to your claude config json
```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"
}
},使用方法💻


建築 🏗
FastMCP Base : ツール管理にFastMCPフレームワークを活用
モジュラー設計:モニターとログの機能を分離
型安全性: Python 型ヒントによる完全な型指定のサポート
API 抽象化: エラー処理を伴うラップされた Datadog API 呼び出し
MCP と Claude Desktop のセットアップに関するセクションを追加します。
モデルコンテキストプロトコル (MCP) の紹介 🤖
MCPとは何ですか?
モデルコンテキストプロトコル(MCP)は、AIモデルが外部ツールやAPIと標準化された方法で連携できるようにするフレームワークです。これにより、Claudeのようなモデルは以下が可能になります。
外部データにアクセスする
コマンドを実行する
APIを操作する
会話全体にわたって文脈を維持する
MCPサーバーの例
https://github.com/punkpeye/awesome-mcp-servers?tab=readme-ov-file
MCP セットアップのチュートリアル
仕組み - 利用可能な機能 🛠️
LLMは提供された関数を使用してデータを取得し、それを使用します
1. モニターの状態を取得する
get_monitor_states(
name: str, # Monitor name to search
timeframe: int = 1 # Hours to look back
)例:
response = get_monitor_states(name="traefik")
# Sample Output
{
"id": "12345678",
"name": "traefik",
"status": "OK",
"query": "avg(last_5m):avg:traefik.response_time{*} > 1000",
"message": "Response time is too high",
"type": "metric alert",
"created": "2024-01-14T10:00:00Z",
"modified": "2024-01-14T15:30:00Z"
}2. Kubernetesログを取得する
get_k8s_logs(
cluster: str, # Kubernetes cluster name
timeframe: int = 5, # Hours to look back
namespace: str = None # Optional namespace filter
)例:
logs = get_k8s_logs(
cluster="prod-cluster",
timeframe=3,
namespace="default"
)
# Sample Output
{
"timestamp": "2024-01-14T22:00:00Z",
"host": "worker-1",
"service": "nginx-ingress",
"pod_name": "nginx-ingress-controller-abc123",
"namespace": "default",
"container_name": "controller",
"message": "Connection refused",
"status": "error"
}# Install as MCP extension
cd datadog
task install-mcp4. インストールの確認
クロードチャットデスクトップ
クロードでデータドッグの接続を確認する

5. Datadog MCPツールを使用する
セキュリティに関する考慮事項 🔒
APIキーを
.envに保存するMCPは隔離された環境で実行される
各ツールには定義された権限があります
レート制限が実装されています
トラブルシューティング🔧
MCPインスペクターの使用
# Launch MCP Inspector for debugging
task run-mcp-inspectorMCP インスペクターは以下を提供します。
MCP サーバーのステータスをリアルタイムで表示
関数呼び出しログ
エラートレース
API応答監視
よくある問題と解決策
API認証エラー
Error: (403) Forbidden➡️ .env で DD_API_KEY と DD_APP_KEY を確認してください
MCP 接続の問題
Error: Failed to connect to MCP server➡️ claude_desktop_config.json のパスと内容を確認する
モニターが見つかりません
Error: No monitor found with name 'xxx'➡️ モニター名のスペルと大文字と小文字の区別を確認する
ログはここにあります

貢献中🤝
お気軽にどうぞ:
バグに関する未解決の問題
改善のためのPRを送信する
新機能の追加
ノート📝
API 呼び出しは Datadog EU サイトに対して行われます
モニター状態のデフォルトの時間枠は1時間です
ほとんどのユースケースに対応できるようにページサイズの制限が設定されています
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
- Combining MCP Server Aggregator
- Datadog - A monitoring and analytics platform for developers and IT operations
- A service for application performance monitoring and observability
- A platform for monitoring and analyzing system and application performance
- A platform for monitoring and analyzing data in real-time
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/didlawowo/mcp-collection'
If you have feedback or need assistance with the MCP directory API, please join our Discord server