mdc

mdc is a cursor rule for Cursor from graphprotocol/graph-tooling. It costs 1,857 tokens per session, scanned A, original, Apache-2.0.

Guidelines for writing Cursor MDC files, which are Markdown-based configuration and documentation files that control coding guidance for matching files.

In plain words
What is it for?
Use it when creating or reviewing Cursor rules, including their front matter, file patterns, references, examples, and structure.
Why use it?
They define the required metadata and sections, helping agents create rules that Cursor can read and validate correctly.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or reviewing Cursor rules, including their front matter, file patterns, references, examples, and structure.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/graphprotocol/graph-tooling/mdc
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/graphprotocol/graph-tooling

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 mdc

README.md
[![agentmods](https://agentmods.dev/badge/rules/graphprotocol/graph-tooling/mdc/github.svg)](https://agentmods.dev/rules/graphprotocol/graph-tooling/mdc)
Your own site
<a href="https://agentmods.dev/rules/graphprotocol/graph-tooling/mdc"><img src="https://agentmods.dev/badge/rules/graphprotocol/graph-tooling/mdc/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 mdc

Your own site · 80×15
<a href="https://agentmods.dev/rules/graphprotocol/graph-tooling/mdc"><img src="https://agentmods.dev/badge/rules/graphprotocol/graph-tooling/mdc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,857 This file is loaded in full into every session.
When invoked 1,857 The same file — it is already loaded in full.
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.01857 $0.01857
Opus 5.5 $0.00743 $0.00743
Sonnet 5.5 $0.00371 $0.00371
Haiku 4.5 $0.00186 $0.00186

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

Security

Grade A, and why

mdc 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 1mo 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/mdc.mdc · 355 lines

How it starts

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


description: Guidelines and best practices for creating .mdc (Markdown Configuration) files in Cursor, including structure, metadata annotations, and formatting rules globs: ["**/*.mdc"]

Cursor MDC File Guidelines

@context { "type": "documentation", "purpose": "cursor_rules", "format_version": "1.0.0", "supported_content_types": [ "guidelines", "api_docs", "examples", "implementations" ] }

@structure { "required_sections": [ "frontmatter", "title", "context", "content_sections" ], "optional_sections": [ "version", "last_updated", "examples", "implementations", "related_files" ], "recommended_sections": [ "practical_examples", "common_patterns", "type_definitions" ] }

File Structure

1. Frontmatter

@frontmatter_rules [ { "id": "position", "rule": "Must be at the very top of the file", "severity": "error" }, { "id": "description", "rule": "Single sentence, clear purpose", "severity": "error" }, { "id": "globs", "rule": "Array of relevant file patterns", "severity": "error" }, { "id": "related_docs", "rule": "Optional array of related documentation files - MUST only reference existing files", "severity": "error" }, { "id": "file_validation", "rule": "All referenced files must exist in the workspace", "severity": "error" } ]

Example frontmatter:

---
description: Guidelines for implementing feature X
globs: ["**/*.{ts,tsx}"]
related_docs: ["docs/architecture/feature-x.md"]
---

2. Metadata Annotations

@annotations { "syntax": "@annotation_name JSON_content", "placement": "Before relevant sections", "format": "Valid JSON with proper indentation", "types": { "context": "Project and document context", "rules": "List of rules or requirements", "format": "Format specifications", "options": "Available options", "examples": "Implementation examples", "implementations": "Full implementation details", "related": "Related documentation or code" } }

Read the full file on GitHub · 355 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. 1mo ago First seen · 355 lines · 1,857 tokens per session scan A 0301fbf8a4c9

Subscribe to this mod's changes

mdc is a cursor rule published in the GitHub repository graphprotocol/graph-tooling (424 stars, last pushed today), licensed Apache-2.0. It adds 1,857 tokens to every session, about $0.0074 per session on Opus 5.5. 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-09-01.