drawio-mcp-server AGENTS.md

drawio-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from lgazo/drawio-mcp-server. It costs 2,218 tokens per session, scanned C, original, MIT.

Project instructions for a draw.io MCP server, a service that lets an agent work with draw.io diagrams through a standard tool connection. They also cover logging, code navigation, version compatibility, and efficient command use.

In plain words
What is it for?
Use them when developing or maintaining the draw.io server, especially when handling logs, navigating its codebase, checking draw.io versions, or using rtk commands.
Why use it?
They prevent diagnostic messages from corrupting the machine-readable communication used by the server and keep changes compatible with the project.

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.

About the project

Draw.io MCP Server connects AI agents to Draw.io, a diagramming application, through the Model Context Protocol. Users can create, edit, manage, import, export, and persist diagrams across documents and pages from supported agent environments. The catalogue entries package the server with commands, instructions, a plugin, and settings for agent-based diagram workflows.

lgazo/drawio-mcp-server · 1,456 stars · on GitHub

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/lgazo/drawio-mcp-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/lgazo/drawio-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 drawio-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lgazo/drawio-mcp-server/agents-md.svg)](https://agentmods.dev/instructions/lgazo/drawio-mcp-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lgazo/drawio-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/lgazo/drawio-mcp-server/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,218 This file is loaded in full into every session.
When invoked 2,218 The same file — it is already loaded in full.
Security scan C 2 findings. Scan, not verified.
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.02218 $0.02218
Opus 5 $0.01109 $0.01109
Sonnet 5 $0.00444 $0.00444
Haiku 4.5 $0.00222 $0.00222

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

Security

Grade C, and why

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

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

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 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 · 180 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 · 180 lines · 2,218 tokens per session scan C bd4c4308b3f1

Subscribe to this mod's changes

drawio-mcp-server AGENTS.md is an instructions file published in the GitHub repository lgazo/drawio-mcp-server (1,456 stars, last pushed 4d ago), licensed MIT. It adds 2,218 tokens to every session, about $0.0111 per session on Opus 5. A static security scan graded it C with 2 findings (hidden instructions, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

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 · 6,785 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 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

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

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

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