Chalkline / Guides / Make Claude draw diagrams

How to make Claude draw diagrams

Claude is very good at working out what a diagram should say. Getting it as a picture you can edit and share takes one extra step. Here are the three ways to do it, when to use each, and prompts that give good results.

Updated 14 November 2026 · 3 minute read

Three ways to get a diagram from Claude

WayWhat you getEditable?Setup
Ask for MermaidDiagram text, often shown as a previewOnly by editing the textNone
Ask for an SVGA pictureNot reallyNone
Connect a diagram tool (MCP)A link that opens a real, editable boardYes, by dragging and clickingOne minute

1. Ask for Mermaid text

Mermaid is a short text format for diagrams. Ask "Write this as a Mermaid flowchart" and Claude writes something like:

flowchart TD
  A[Request received] --> B{Approved?}
  B -->|yes| C[Send invoice]
  B -->|no| D[Reply with reasons]

Good for README files and docs that render Mermaid. The downside: to move one box, you edit text and hope the layout behaves.

2. Ask for an SVG picture

Claude can write an SVG drawing directly. It is quick for a one off image, but positions are hand placed by the model, so arrows can overlap and fixing one detail means asking again.

3. Connect a diagram tool through MCP

This is the most useful for real work. Add a diagram MCP server once, and Claude can hand you a link that opens the diagram in a whiteboard, laid out properly and ready to edit.

With a connector, Claude hands you an editable diagramWith a connector, Claude hands you an editable diagramYou ask ClaudeClaude writes diagram textChalkline lays it outLink to an editable boardDrag, restyle, export
With a connector, Claude hands you an editable diagramOpen this example in Chalkline →

To connect Chalkline in claude.ai or the Claude desktop app, open Settings, then Connectors, then Add custom connector, and enter https://chalkline.in/mcp. In Claude Code, run:

claude mcp add --transport http chalkline https://chalkline.in/mcp

It is free, needs no key, and keeps nothing on a server. More setup options are in use Chalkline with AI.

Prompts that work well

Be specific about three things: the kind of diagram, the direction and the content.

Instead ofTry
"Diagram our checkout""Draw a top to bottom flowchart of our checkout: cart, address, payment, confirmation. Add a branch for a failed payment."
"Show the login""Make a sequence diagram of a login with a browser, an API and a database, including a wrong password."
"Database diagram""Here are my CREATE TABLE statements. Draw the ER diagram with crow's foot notation." (paste the SQL)
"Explain this code visually""Turn this Python function into a flowchart." (paste the function)
"Chart the numbers""Make a bar chart of this CSV, with months on the x axis." (paste the data)

Changing a diagram after Claude draws it

You have two options, and you can mix them:

  • Ask in words: "Make the error path red", "Add a cache between the API and the database", "Switch it to left to right."
  • Open the link and edit by hand: drag boxes, change colours, add notes, switch between the hand drawn and clean look, then export to PNG, SVG, PDF or PowerPoint.

Fixing common problems

Claude answers with text instead of a diagram. Name the tool: "Use Chalkline to draw this as a flowchart."

The diagram is too big to read. Ask for fewer steps per diagram, or split it: "Draw only the payment part."

Boxes have long sentences in them. Ask for labels of three to five words, and put details in notes.

The connector does not appear. Check that it is switched on for the conversation, in the tools or connectors menu under the message box.

Which diagram to ask for

You want to showAsk for
Steps and decisionsA flowchart
Messages between systems over timeA sequence diagram
Tables and their linksAn ER diagram
The situations something can be inA state diagram
Ideas around one topicA mind map
How the parts of a system connectA system design diagram
See what a connector producesOpen the editor with a diagram built from code
Open the example

To understand what is happening behind the scenes, read MCP servers for diagrams.