draw-mcp-server: Instructions file for Codex

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is jiangnuonnuo/draw-mcp-server's own configuration. It tells Codex and OpenCode how to work on draw-mcp-server 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 draw-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jiangnuonnuo/draw-mcp-server. 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/jiangnuonnuo/draw-mcp-server/main/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/github.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/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 draw-mcp-server AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02120 $0.02120
Opus 5.5 $0.00848 $0.00848
Sonnet 5.5 $0.00424 $0.00424
Haiku 4.5 $0.00212 $0.00212

Measured 1mo ago against content hash 0925e9108990, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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 — 52 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.ts — test-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. 1mo 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 3mo ago), licensed MIT. It adds 2,120 tokens to every session, about $0.0085 per session on Opus 5.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 52 lines, and is treated as a copy.

Related

Other instructions, from other repositories

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 · 9,649 tokens

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,549 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens