Diagram
← How to make diagrams with AI

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:

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.

The kind of thing you can ask for:

Quarterly report · Boardroom

Your job sucks, but your diagrams shouldn't

Make better-looking diagrams than your stupid coworkers.

Q4 Profit FINAL_v3 (2) ■ Series1 ■ Series2 Dave's version PROFIT BY QUARTER +38% year over year $1.2MQ1 $1.5MQ2 $1.9MQ3 $2.6MQ4 yours Q4 FINAL_v3 Dave's version PROFIT BY QUARTER +38% year over year $1.2MQ1 $1.5MQ2 $1.9MQ3 $2.6MQ4

Questions

Can Claude Code make diagrams?
Yes. Claude Code can draw flowcharts, architecture diagrams, org charts, timelines, and more as a web page. Connected to Diagram, it saves each one at a link you can open and share.
Is Diagram free to use with Claude Code?
Yes. Diagram is free for your first 5 diagrams, and there's nothing to install.
Who can see my diagrams?
A new diagram is a draft only you can see. When you say to publish it, the people on its project can see it. You can also add people, share with your team through an org, or make one diagram public for anyone with the link.
What happens when the diagram changes?
Ask Claude Code to change it. The change is saved at the same link, and every earlier version is kept.
Does Claude Code need an API key?
No. Claude Code signs in to Diagram in the browser (Google or an emailed link).

Diagrams in other tools