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 uses a hash fragment (
#create=...), 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-reference.md— this is the XML generation reference covering edge routing, containers, layers, tags, metadata, dark mode, and more - 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 to compress and encode 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.