draw-mcp-server AGENTS.md

draw-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from jiangnuonnuo/draw-mcp-server. It costs 2,120 tokens per session, scanned C, a copy of drawio-mcp-server AGENTS.md, MIT.

A set of project instructions for developing a draw.io MCP server. MCP is a protocol that lets an agent call tools, and draw.io is a diagramming application.

In plain words
What is it for?
It is for guiding changes, testing, formatting, and logging in the draw.io server codebase.
Why use it?
It explains how to navigate the code and prevents log output from breaking the tool connection.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/jiangnuonnuo/draw-mcp-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/jiangnuonnuo/draw-mcp-server

Made for: Codex, OpenCode.

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 draw-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jiangnuonnuo/draw-mcp-server/agents-md.svg)](https://agentmods.dev/instructions/jiangnuonnuo/draw-mcp-server/agents-md)
Your own site
<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>
Per session 2,120 This file is loaded in full into every session.
When invoked 2,120 The same file — it is already loaded in full.
Security scan C 2 findings. Scan, not verified.
Origin 89% copy Near-identical to another mod 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 $0.02120 $0.02120
Opus 5 $0.01060 $0.01060
Sonnet 5 $0.00424 $0.00424
Haiku 4.5 $0.00212 $0.00212

Measured 4d ago against content hash 0925e9108990, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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%)
Origin

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.

AGENTS.md · 172 lines

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.

  1. Stdout discipline. console.log, console.info, console.dir, and process.stdout.write are banned in packages/drawio-mcp-server/src/** outside the allowlist below. The MCP SDK transport is the only legitimate writer to stdout.
  2. Logger usage. Every production function that needs to emit a diagnostic MUST receive an AppLogger (index.ts) or Logger (types.ts) — as a parameter or via Context.log. Constructing a logger inside a function is forbidden except in the entry-point files listed in rule 3.
  3. Allowlist (the only files permitted to call console.*):
    • src/mcp_console_logger.ts — the stderr bridge implementation.
    • src/mcp_server_logger.ts — internal console.error for unrecoverable invalid-level guard.
    • src/standard_console_logger.tstest-only logger (writes to stdout). Do not import from production code.
    • src/index.ts — only via the module-scope fatalLog constant. No other site in index.ts may use console.*.
    • src/prefetch-assets.ts — separate CLI entrypoint; instantiates mcp_console_logger and uses it.
    • src/**/*.test.ts — tests may use console and standard_console_logger freely.
  4. Pre-boot phase. Code that runs before createDrawioMcpApp({ config }) returns (CLI help, config-parse failure) uses fatalLog. After the app exists, use app.log or a logger provided by dependency injection.
  5. Two logger modes. --logger console (default) writes to stderr; --logger mcp-server sends MCP notifications/message to the connected client. No other logging output channels exist; do not add raw process.stderr.write either — go through the logger.
  6. Transport-mode awareness. src/stdio-transport-purity.test.ts spawns the binary with --transport stdio and asserts every non-empty stdout line parses as JSON. This catches stdout contamination introduced by future commits.
  7. Browser packages exempt. packages/drawio-mcp-extension/** and packages/drawio-mcp-plugin/** execute in a browser context and may use console.* freely; they share no streams with the MCP server.
  8. Lint enforcement (Biome). biome check src/ runs as part of pnpm --filter drawio-mcp-server lint and enforces noConsole for src/** with the per-file overrides matching rule 3. Biome is a devDep of drawio-mcp-server and pinned via the pnpm catalog.

Read the full file on GitHub · 172 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. 4d ago First seen · 172 lines · 2,120 tokens per session scan C 0925e9108990

Subscribe to this mod's changes

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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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.

github/spec-kit · 7,104 tokens

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.

langchain-ai/langchain · 4,469 tokens

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).

microsoft/vscode · 5,001 tokens