drawio-mcp: Instructions file for Claude Code

AGENTS.md

drawio-mcp AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from jgraph/drawio-mcp. It costs 7,554 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for an add-on that lets an AI assistant open and create diagrams in the draw.io editor. It covers the server's structure and its diagram and shape-search tools.

In plain words
What is it for?
Useful for creating diagrams, finding diagram shapes, and understanding or changing this server's plugin and repository setup.
Why use it?
It gives coding agents the project-specific rules and context needed to work with the draw.io MCP server correctly.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: Claude Code plugin machinery, but also the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions Claude Code.

This is jgraph/drawio-mcp's own configuration. It tells Claude Code, Codex and OpenCode how to work on drawio-mcp 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 drawio-mcp configures →

About the project

drawio-mcp is an official Model Context Protocol server that lets AI assistants create and open editable diagrams in the draw.io editor. It supports diagram workflows ranging from inline chat previews to browser editing and generated draw.io, PNG, SVG, or PDF files. The catalogue entries provide its MCP servers, assistant integrations, project instructions, and skill.

jgraph/drawio-mcp · 5,779 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to jgraph/drawio-mcp. 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/jgraph/drawio-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/jgraph/drawio-mcp

Made for: Claude Code, 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 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jgraph/drawio-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/jgraph/drawio-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/jgraph/drawio-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/jgraph/drawio-mcp/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 drawio-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jgraph/drawio-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/jgraph/drawio-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,554 This file is loaded in full into every session.
When invoked 7,554 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.07554 $0.07554
Opus 5.5 $0.03022 $0.03022
Sonnet 5.5 $0.01511 $0.01511
Haiku 4.5 $0.00755 $0.00755

Measured today against content hash a815080a8f8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

drawio-mcp AGENTS.md 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 today.

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.

AGENTS.md · 216 lines

How it starts

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

Draw.io MCP Server

The official draw.io MCP (Model Context Protocol) server that enables LLMs to open and create diagrams in the draw.io editor.

Repository Structure

  • .claude-plugin/marketplace.json — Claude Code plugin marketplace manifest. Lists this repo's plugins (currently just drawio, sourced from ./plugins/claude-code); plugin metadata is inherited from each plugin's own plugin.json. Users install with /plugin marketplace add jgraph/drawio-mcp then /plugin install drawio@drawio.
  • .agents/plugins/marketplace.json — Codex CLI plugin marketplace manifest (Codex's format: source object + policy + category). Lists the drawio plugin sourced from ./plugins/codex/drawio; metadata is inherited from that plugin's own .codex-plugin/plugin.json. Users install with codex plugin marketplace add jgraph/drawio-mcp then codex plugin add drawio@drawio.
  • .github/plugin/marketplace.json — GitHub Copilot CLI plugin marketplace manifest (same schema family as Claude's, but plugin metadata is inlined in the plugins[] entry rather than inherited — keep it in sync with plugins/copilot/plugin.json). Lists the drawio plugin sourced from ./plugins/copilot. Users install with copilot plugin marketplace add jgraph/drawio-mcp then copilot plugin install drawio@drawio. Copilot CLI checks this path first and falls back to .claude-plugin/marketplace.json.
  • .cursor-plugin/marketplace.json — Cursor plugin marketplace manifest (Cursor's format: owner + plugins[] entries whose source is the plugin directory). Lists the drawio plugin sourced from plugins/cursor; metadata comes from that plugin's own .cursor-plugin/plugin.json. Users install from the Cursor Marketplace (every version is reviewed by Cursor, submitted at cursor.com/marketplace/publish); Teams/Enterprise admins can import this repo as a team marketplace.
  • glama.json — Ownership file for the Glama MCP directory: lists the GitHub users (maintainers) who may claim the listing of this org-hosted repo, which a GitHub sign-in alone can't. After editing it, run Glama's Claim flow again. We make no Glama releases: in October 2026 the listing had views but no use and sent no traffic.
  • shared/ — Single source of truth shared by every delivery mechanism: the LLM-facing references (xml-reference.md, its condensed xml-essentials.md, mermaid-reference.md, style-reference.md) and the shared logic both MCP servers run (shape-search.js, icon-search.js, mermaid-elk.js, the repairs for common LLM slips in XML repair-xml.js, plus the headless mxGraph stack mx-model.js / mx-xml.js / normalize-model.js, and label-perimeter.js, which marks labels outside the shape so edges end at them).
  • mcp-app-server/ — MCP App server (renders diagrams inline in chat via iframe). Hosted at https://mcp.draw.io/mcp. Can also be self-hosted via Node.js, the jgraph/drawio-mcp Docker Hub image (built and pushed by .github/workflows/publish-app-server-image.yml; Hub page text in mcp-app-server/DOCKER_HUB.md) or Cloudflare Workers. Its server.json is the MCP Community Registry manifest (io.draw/mcp — feeds github.com/mcp and VS Code's MCP browser); publish runbook in its README.
  • mcp-tool-server/ — Original MCP tool server (stdio-based, opens browser). Published as @drawio/mcp on npm.
  • project-instructions/ — Claude Project instructions (no MCP required, no install).
  • plugins/ — Assistant-side plugins grouped by host, one subdirectory per AI assistant.
    • plugins/claude-code/ — Claude Code plugin: ships the drawio skill (generates native .drawio files, authored as Mermaid — converted + laid out by the desktop CLI — or as XML directly with optional ELK --layout; exports to PNG/SVG/PDF, or opens as a browser URL via app.diagrams.net). For shape-library and brand icons the skill runs its bundled scripts/find-shapes.js, which searches the search_shapes index (from jsDelivr) and the draw.io icon service. Mermaid conversion, ELK layout, and image export need draw.io Desktop; plain XML .drawio/url output does not. Installable via the repo-root marketplace or claude --plugin-dir ./plugins/claude-code. Since 1.2.3 it also bundles the hosted MCP App Server (.mcp.json, https://mcp.draw.io/mcp), so its Claude directory listing can be paired with the draw.io connector listing and the skill can defer to create_diagram where Claude shows diagrams inline (Claude.ai); in Claude Code's terminal the skill still writes the files. The Codex and Copilot ports stay skill-only.
    • plugins/codex/drawio/ — Codex CLI plugin: the Codex port of the Claude Code plugin, shipping the same drawio skill. skills/drawio/ (SKILL.md and scripts/) is byte-identical to the Claude plugin's copy (Codex uses the same /drawio:drawio invocation and fetches the same shared references from GitHub). Differs only in host wrapping: a .codex-plugin/plugin.json manifest with an interface block (official draw.io SVG logo, brandColor, default prompts). Nested under codex/ because Codex requires the plugin root folder name to equal plugin.json "name" (drawio). No MCP required.
    • plugins/copilot/ — GitHub Copilot CLI plugin: the Copilot port of the Claude Code plugin, shipping the same drawio skill. skills/drawio/ (SKILL.md and scripts/) is byte-identical to the Claude plugin's copy (the in-skill /drawio:drawio example lines are model-facing; Copilot's user-facing command is plain /drawio since Copilot doesn't prefix plugin skills). Differs only in host wrapping: a root plugin.json manifest (Copilot's format, skills directory list); no folder-name rule, so copilot/ is itself the plugin root. The same skill folder also works in other Copilot surfaces (VS Code agent mode, coding agent, code review) when copied to a repo's .github/skills/. No MCP required.
    • plugins/cursor/ — Cursor plugin: the same drawio skill (skills/drawio/, SKILL.md and scripts/, byte-identical to the Claude plugin's copy) plus an mcp.json that adds the hosted MCP App Server (https://mcp.draw.io/mcp), because Cursor's Agent chat (≥ 2.6) renders MCP Apps inline; the skill's own instructions already defer to create_diagram in such a chat and keep files and exports for the skill. Manifest .cursor-plugin/plugin.json (only name is required; logo is a repo-relative path, here the draw.io SVG in assets/). No folder-name rule, so cursor/ is itself the plugin root.
    • plugins/antigravity/ — Antigravity plugin: the same drawio skill (skills/drawio/, SKILL.md and scripts/, byte-identical to the Claude plugin's copy) with a minimal root plugin.json (Antigravity's schema allows only name, description, $schema; components are found by folder). Skill-only: Antigravity's converter turns a Claude plugin's HTTP MCP server into an empty command, and a terminal can only get links from the hosted server, so the README shows agy mcp add separately. No marketplace for other publishers: users install from the directory URL (agy plugin install https://github.com/jgraph/drawio-mcp/tree/main/plugins/antigravity); the repository URL installs every plugin in the repo under the same name. Porting notes in its DEVELOPING.md.
  • shape-search/ — Shape search index generator. Loads draw.io's app.min.js via jsdom to extract all shape styles and tags into search-index.json, which powers the search_shapes MCP tool and the skill's scripts/find-shapes.js (it reads title, tags, w, h and style from the @main copy on jsDelivr, so renaming a field breaks every installed skill). Re-run after updating drawio-dev to pick up new or changed shapes.

Read the full file on GitHub · 216 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. today Changed · +2 lines · +147 tokens per session a815080a8f8a
  2. 3d ago Changed · +29 tokens per session 83f76bf86efb
  3. 5d ago Changed · -1 lines · +116 tokens per session 118dc7db0312
  4. 6d ago Changed · +16 lines · +535 tokens per session 6b4c313cecec
  5. 10d ago Changed · +118 tokens per session d30c7791bf70
  6. 15d ago Changed · +64 tokens per session 0a02f9467a5f
  7. 18d ago Changed · +1 lines · +182 tokens per session 05e7660c3ed5
  8. 19d ago Changed · +1 lines · +358 tokens per session 65e4196dbfb5
  9. 20d ago Changed · +4 lines · +547 tokens per session ebdcedfc3847
  10. 21d ago First seen · 193 lines · 5,458 tokens per session scan A e108908c06a0

Subscribe to this mod's changes

drawio-mcp AGENTS.md is an instructions file published in the GitHub repository jgraph/drawio-mcp (5,779 stars, last pushed yesterday), licensed Apache-2.0. It adds 7,554 tokens to every session, about $0.0302 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-25.

Related

drawio-mcp AGENTS.md compared with instructions from other repositories

drawio-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
drawio-mcp AGENTS.mdjgraph/drawio-mcpInstructions file5.8kyesterdayApache-2.0A7,554Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode