An alternative approach that works without installing the MCP server. Instead of using MCP tools, you add instructions to a Claude Project that teach Claude to generate draw.io URLs using Python code execution.
- No installation required - works immediately in Claude.ai
- No desktop app needed - works entirely in the browser
- Easy to use - just add instructions to your Claude Project
- Privacy-friendly - the generated URL carries the diagram in its hash fragment (
#R...for XML,#create=...for Mermaid and CSV), which stays in the browser and is never sent to any server
- Open your Claude Project settings
- Add the contents of
claude-project-instructions.txtto your project instructions - Also add the contents of
shared/xml-essentials.md— the condensed XML rules (skeleton, cell templates, labels, shapes, the layout grid, containers, swimlanes, edge styles). Add the fullshared/xml-reference.mdas well only if you need layers, tags, metadata, tables, cross-functional grids or dark-mode colors - Ask Claude to create diagrams - it will generate clickable draw.io URLs
The instructions teach Claude to:
- Generate diagram code (Mermaid, XML, or CSV)
- Execute Python code that repairs common XML slips, checks that the XML is well-formed, and compresses and encodes the diagram
- The script outputs a complete HTML page with the URL embedded as a clickable button
- Claude presents the HTML as an artifact - the user clicks the button to open draw.io
The generated URL contains compressed base64 data. LLMs are known to silently corrupt base64 strings when reproducing them token by token - even a single changed character breaks the link completely.
By having the Python script output a complete HTML page with the link already embedded, the URL never passes through Claude's text generation. Claude simply presents the script output as an artifact, ensuring the link is always correct.