How to make diagrams in Claude Code
Ask Claude Code (Anthropic’s coding agent in the terminal) for a diagram in plain words and it draws one. On its own, the result stays in the chat or in a file only you can open. Connect Diagram once, and every diagram Claude Code makes is saved at a link you can share, which stays current as the diagram changes. It takes three steps.
1. Connect Diagram to Claude Code
Run this in a terminal, in your repo. It connects Diagram and starts Claude Code:
claude mcp remove -s user diagram ; claude mcp add -s user --transport http diagram https://diagram.la/mcp ; claude
Sign in once: When Claude Code starts, type /mcp, pick diagram, and choose Authenticate: sign in to Diagram in the browser tab that opens.
2. Ask Claude Code for a diagram
In Claude Code, then describe what you want in plain words. For example:
- “Make an architecture diagram of this repo and give me a link I can share.”
- “Diagram the deploy pipeline from push to production, using the CI config here.”
- “Draw the auth flow, including what happens when a token expires.”
- “Before you change it, draw how this module works today so we agree on it.”
Claude Code draws it, saves it to Diagram as a draft only you can see, and gives you a link. Keep the link open: when you ask for a change, the page updates by itself. Nothing is left in a local file you’d have to remember to upload, and you never have to mention Diagram again: it knows to use it.
3. Publish it and share the link
When it looks right, tell Claude Code to publish it. It asks first and says who will be able to see it: the people on its project. Then paste the link in Slack, a pull request, or a doc. To change it later, ask Claude Code: the link stays the same and every version is kept.