datadog-mcp: Instructions file for GitHub Copilot

.github/copilot-instructions.md

datadog-mcp copilot-instructions.md is an instructions file for GitHub Copilot from sushilti80/datadog-mcp. It costs 2,347 tokens per session, scanned A, original, MIT.

Project instructions for a Datadog MCP server, which connects an AI agent to Datadog monitoring and observability data.

In plain words
What is it for?
Guiding development of the server, including API key rotation, failure handling, debugging, and correct Datadog site configuration.
Why use it?
They document the server structure and prevent a critical configuration mistake: hardcoding the Datadog site instead of reading it from the environment.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions AGENTS.md.

This is sushilti80/datadog-mcp's own configuration. It tells GitHub Copilot how to work on datadog-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything datadog-mcp configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 src/datadog_mcp_server.py.

Reuse

Borrowing it

Nothing to install: this file belongs to sushilti80/datadog-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sushilti80/datadog-mcp/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/sushilti80/datadog-mcp

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for datadog-mcp copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sushilti80/datadog-mcp/copilot-instructions/github.svg)](https://agentmods.dev/instructions/sushilti80/datadog-mcp/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/sushilti80/datadog-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/sushilti80/datadog-mcp/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for datadog-mcp copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sushilti80/datadog-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/sushilti80/datadog-mcp/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,347 This file is loaded in full into every session.
When invoked 2,347 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02347 $0.02347
Opus 5.5 $0.00939 $0.00939
Sonnet 5.5 $0.00469 $0.00469
Haiku 4.5 $0.00235 $0.00235

Measured 2mo ago against content hash 99f733c366ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

datadog-mcp copilot-instructions.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:8080/health
.github/copilot-instructions.md · 286 lines

How it starts

The opening of the file, as written. The whole thing — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Datadog MCP Server - AI Agent Instructions

Architecture Overview

This is a FastMCP-based Model Context Protocol (MCP) server that exposes Datadog observability APIs to AI agents. The architecture centers on two core systems:

  1. FastMCP Server (src/datadog_mcp_server.py) - HTTP+SSE transport server with tools, resources, and prompts
  2. Key Rotation System (src/key_rotation.py) - Intelligent multi-key management for rate limit avoidance

Key Components

  • DatadogMCPServer class: Main server with _execute_with_key_rotation() wrapper for all API calls
  • KeyPoolManager: Manages 3-5 API key pairs with 5 rotation strategies (adaptive, round_robin, LRU, weighted, random)
  • Circuit Breaker: Automatically isolates problematic keys after configurable failure threshold
  • Debug System: Enum-based debug levels (NONE/INFO/DEBUG/TRACE) with correlation IDs and sensitive data masking

Critical Pattern: DD_SITE Must Always Come From Environment

NEVER hardcode Datadog site values. Always use environment variables:

# ✅ CORRECT - Always read from environment
site = os.getenv("DD_SITE") or os.getenv("DATADOG_SITE") or "us3.datadoghq.com"

# ✅ For numbered keys
site = os.getenv(f"DD_SITE_{i}") or os.getenv(f"DATADOG_SITE_{i}") or "us3.datadoghq.com"

# ❌ NEVER do this
site = "datadoghq.com"  # Wrong - hardcoded value

The default fallback us3.datadoghq.com should only appear in environment loading functions (load_keys_from_environment() in key_rotation.py), never in API client configuration.

Development Workflows

Running the Server

# Local development - reads .env file automatically
python3 src/datadog_mcp_server.py

# With debug tracing
MCP_DEBUG_LEVEL=TRACE python3 src/datadog_mcp_server.py

# Check server health on port 8080
curl http://localhost:8080/health

Testing

# Run all tests including key rotation
pytest tests/ -v

# Run specific test suite
pytest tests/test_key_rotation.py -v

# Test with coverage
pytest tests/ --cov=src --cov-report=html

Read the full file on GitHub · 286 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 286 lines · 2,347 tokens per session scan A 99f733c366ef

Subscribe to this mod's changes

datadog-mcp copilot-instructions.md is an instructions file published in the GitHub repository sushilti80/datadog-mcp (2 stars, last pushed 4mo ago), licensed MIT. It adds 2,347 tokens to every session, about $0.0094 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

datadog-mcp copilot-instructions.md compared with instructions from other repositories

datadog-mcp copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
datadog-mcp copilot-instructions.mdsushilti80/datadog-mcpInstructions file24mo agoMITA2,347GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode