Develop diagrams together with Claude Code.
Just an evening experiment
Uses Excalidraw with Excalidraw extension for VS Code. The MCP server reads and writes the file, but the LLM sees the semantic representation of the diagram, not JSON, only consice relationships. The LLM doesn't position elements either — I do. I handle styling and arrangement, the LLM checks the content.
What the LLM sees and speaks:
nodes: api, auth, db
edges: api→auth, auth→db
groups: backend[auth, db]
~30 tokens instead of ~3,000 by reading the JSON.
- Claude Code
- VS Code with Excalidraw extension
- uv (
curl -LsSf https://astral.sh/uv/install.sh | sh)
claude mcp add semantic-diagram -- \
uvx --from git+https://github.com/vykhovanets/semantic-diagram semantic-diagram| Tool | Purpose |
|---|---|
create |
New diagram from nodes + edges + groups |
add |
Add elements to current diagram |
update |
Rename, restyle an element |
remove |
Delete elements (cascades edges) |
state |
Current topology (~30 tokens) |
save |
Render to .excalidraw file |
load |
Parse .excalidraw back to topology |
diff |
Semantic changes since last save/load |