mcp-architecture

mcp-architecture is a cursor rule for Cursor from techskies11/datadog-mcp. It costs 0 tokens per session (2,660 once invoked), scanned A, original, MIT.

A set of rules for organizing an MCP server, a program that lets an AI assistant use defined tools. It describes where authentication, domain-specific tools, shared utilities, and server wiring belong.

In plain words
What is it for?
Use it when adding or changing MCP server domains, tools, authentication, shared utilities, or project structure.
Why use it?
It prevents new code from reintroducing outdated patterns, such as putting everything in one large server file or using inconsistent response types.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or changing MCP server domains, tools, authentication, shared utilities, or project structure.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/techskies11/datadog-mcp/mcp-architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/techskies11/datadog-mcp

Made for: Cursor.

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 mcp-architecture

README.md
[![agentmods](https://agentmods.dev/badge/rules/techskies11/datadog-mcp/mcp-architecture.svg)](https://agentmods.dev/rules/techskies11/datadog-mcp/mcp-architecture)
Your own site
<a href="https://agentmods.dev/rules/techskies11/datadog-mcp/mcp-architecture"><img src="https://agentmods.dev/badge/rules/techskies11/datadog-mcp/mcp-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,660 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.02660
Opus 5 $0.00000 $0.01330
Sonnet 5 $0.00000 $0.00532
Haiku 4.5 $0.00000 $0.00266

Measured 6d ago against content hash 0beffb6b1941, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

mcp-architecture scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/mcp-architecture.mdc · 272 lines

How it starts

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

MCP Server Architecture

This file documents the actual architecture of this repo. Follow it for any new domain/tool - don't reintroduce patterns from older revisions of this server (a single monolithic server.py, TypedDict responses, or an implicit "create auth if not passed" factory) even if you've seen them in git history.

Project Structure

datadog-mcp/
├── src/
│   └── datadog_mcp/
│       ├── __init__.py
│       ├── server.py            # Composition ONLY: wires domains + resources/prompts
│       ├── auth.py              # DatadogAuth + get_auth_instance() singleton
│       ├── tools/                # One module per Datadog domain
│       │   ├── logs.py
│       │   ├── aggregations.py
│       │   ├── metrics.py
│       │   ├── dashboards.py
│       │   ├── apm.py
│       │   ├── monitors.py
│       │   └── downtimes.py
│       └── utils/                # Shared, domain-agnostic utilities
│           ├── auth.py           # get_api_instance() factory
│           ├── annotations.py    # ToolAnnotations presets
│           ├── pagination.py     # Page-size constants/clamping
│           ├── response.py       # Pydantic response base classes + helpers
│           └── time.py           # parse_time_value()
├── tests/                        # Mirrors src/ (tests/tools/test_<domain>.py, tests/utils/)
├── pyproject.toml
└── README.md

Separation of Concerns

Server Layer - Composition Only

server.py never contains a tool implementation, a Pydantic model, or a call to a Datadog API class directly. It only imports each domain's register_<domain>_tools and calls it, plus defines @mcp.resource/@mcp.prompt (which are thin enough to live here).

# server.py
from fastmcp import FastMCP
from datadog_mcp.tools.logs import register_logs_tools
from datadog_mcp.tools.metrics import register_metrics_tools
# ... one import per domain

mcp = FastMCP("Datadog Integration")

register_logs_tools(mcp)
register_metrics_tools(mcp)
# ...

Read the full file on GitHub · 272 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. 6d ago First seen · 272 lines · 0 tokens per session scan A 0beffb6b1941

Subscribe to this mod's changes

mcp-architecture is a cursor rule published in the GitHub repository techskies11/datadog-mcp (0 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,660 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.