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.
npx agentmods add instructions/jiangnuonnuo/draw-mcp-server/agents-mdgit clone --depth 1 https://github.com/jiangnuonnuo/draw-mcp-serverWrote 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.
[](https://agentmods.dev/instructions/jiangnuonnuo/draw-mcp-server/agents-md)<a href="https://agentmods.dev/instructions/jiangnuonnuo/draw-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/jiangnuonnuo/draw-mcp-server/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02120 | $0.02120 |
| Opus 5 | $0.01060 | $0.01060 |
| Sonnet 5 | $0.00424 | $0.00424 |
| Haiku 4.5 | $0.00212 | $0.00212 |
Grade C, and why
draw-mcp-server AGENTS.md scanned grade C with 2 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 4d 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- rtk-instructions v2 --> Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
rtk curl <url> # Compact HTTP responses (70%) This is a copy
89% identical to drawio-mcp-server AGENTS.md — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Draw.io MCP Server
Logging discipline (drawio-mcp-server)
When the stdio transport is active, stdout must contain only JSON-RPC frames produced by the MCP SDK. A single stray console.log will cause spec-strict clients (e.g. codex-cli) to reject the server. The rules below codify this.
- Stdout discipline.
console.log,console.info,console.dir, andprocess.stdout.writeare banned inpackages/drawio-mcp-server/src/**outside the allowlist below. The MCP SDK transport is the only legitimate writer to stdout. - Logger usage. Every production function that needs to emit a diagnostic MUST receive an
AppLogger(index.ts) orLogger(types.ts) — as a parameter or viaContext.log. Constructing a logger inside a function is forbidden except in the entry-point files listed in rule 3. - Allowlist (the only files permitted to call
console.*):src/mcp_console_logger.ts— the stderr bridge implementation.src/mcp_server_logger.ts— internalconsole.errorfor unrecoverable invalid-level guard.src/standard_console_logger.ts— test-only logger (writes to stdout). Do not import from production code.src/index.ts— only via the module-scopefatalLogconstant. No other site inindex.tsmay useconsole.*.src/prefetch-assets.ts— separate CLI entrypoint; instantiatesmcp_console_loggerand uses it.src/**/*.test.ts— tests may useconsoleandstandard_console_loggerfreely.
- Pre-boot phase. Code that runs before
createDrawioMcpApp({ config })returns (CLI help, config-parse failure) usesfatalLog. After the app exists, useapp.logor a logger provided by dependency injection. - Two logger modes.
--logger console(default) writes to stderr;--logger mcp-serversends MCPnotifications/messageto the connected client. No other logging output channels exist; do not add rawprocess.stderr.writeeither — go through the logger. - Transport-mode awareness.
src/stdio-transport-purity.test.tsspawns the binary with--transport stdioand asserts every non-empty stdout line parses as JSON. This catches stdout contamination introduced by future commits. - Browser packages exempt.
packages/drawio-mcp-extension/**andpackages/drawio-mcp-plugin/**execute in a browser context and may useconsole.*freely; they share no streams with the MCP server. - Lint enforcement (Biome).
biome check src/runs as part ofpnpm --filter drawio-mcp-server lintand enforcesnoConsoleforsrc/**with the per-file overrides matching rule 3. Biome is a devDep ofdrawio-mcp-serverand pinned via the pnpm catalog.
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.
- 4d ago First seen · 172 lines · 2,120 tokens per session scan C 0925e9108990
draw-mcp-server AGENTS.md is an instructions file published in the GitHub repository jiangnuonnuo/draw-mcp-server (0 stars, last pushed 1mo ago), licensed MIT. It adds 2,120 tokens to every session, about $0.0106 per session on Opus 5. A static security scan graded it C with 2 findings (hidden instructions, makes network calls). It is 89% identical to drawio-mcp-server AGENTS.md, differing in 8 lines, and is treated as a copy.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).