$ show jgraph/drawio-mcp
The drawio-mcp repository provides a comprehensive ecosystem for AI-assisted diagram creation using the Model Context Protocol (MCP). It consists of four integrated approaches: an MCP App Server for inline diagram rendering in AI chat interfaces (deployable as Node.js or Cloudflare Worker), an MCP Tool Server for opening diagrams in the draw.io browser editor, assistant-specific plugins for Claude Code, Codex, and GitHub Copilot, and project instructions for Python-based diagram generation. The system enables AI assistants to create diagrams from Mermaid or XML input, apply layouts (ELK/libavoid), and export to various formats while emphasizing data residency controlsβself-hosted options keep all diagram data local, with cloud export requiring explicit user action via draw.io Desktop CLI.
The LLM identified 3 files worth highlighting for reuse:
Implements a phonetic shape search using Soundex algorithm for tolerant matching of shape names despite misspellings or variations. Works with a pre-built JSON index and can be decoupled for reuse in any project requiring fuzzy dictionary search with configurable fallback mechanisms.
Provides a configurable icon search layer that supplements local shape queries with external services (default: icons.diagrams.net). Features request deduplication, error isolation, and cachingβdesigned for easy adaptation to alternative icon APIs while maintaining strict separation from core search logic.
Generates a self-contained JavaScript module exporting HTML as a string for Cloudflare Workers, eliminating runtime template fetching. Solves Worker size limits by inlining dependencies at build timeβa reusable pattern for any Worker serving dynamic HTML content without external requests during execution.