Diagram
← How to make diagrams with AI

Diagram MCP server for Cursor, Claude Code, Codex and Copilot

Diagram is an MCP server that lets your AI tool draw a diagram and save it at a link you can share. Ask for an architecture diagram, a flowchart or a data model in plain words; the AI draws it, saves it, and gives you the link. Ask for a change and the same link updates. There is nothing to install: add one address and sign in.

https://diagram.la/mcp

What it does

Add it to your tool

Cursor

Use the one-click Add to Cursor button on the setup page. Or add this to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "diagram": {
      "url": "https://diagram.la/mcp"
    }
  }
}

Sign in once: In Cursor Settings → MCP, click Connect (or Needs login) next to diagram: sign in to Diagram and click Allow.

Full guide to diagrams in Cursor

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.

Full guide to diagrams in Claude Code

Codex CLI

Run this in a terminal, in your repo. It connects Diagram and starts Codex CLI:

codex mcp remove diagram ; codex mcp add diagram --url https://diagram.la/mcp ; codex "Set up Diagram for this repo, then ask me what to draw. If you don't have the Diagram tools, tell me the connection didn't work."

Sign in once: Codex opens a browser tab as soon as it adds Diagram: sign in to Diagram and click Allow.

Full guide to diagrams in Codex CLI

VS Code + Copilot

Use the one-click Add to VS Code button on the setup page. Or run "MCP: Add Server" from the Command Palette, choose HTTP, paste this URL, and choose Global. VS Code asks you to trust the server the first time it starts:

https://diagram.la/mcp

Sign in once: When VS Code starts the server, it asks to sign in: allow it, then sign in to Diagram and click Allow.

Full guide to diagrams in VS Code + Copilot

Gemini CLI

Run this in a terminal, in your repo. It connects Diagram and starts Gemini CLI:

gemini mcp remove -s user diagram ; gemini mcp add -s user --transport http diagram https://diagram.la/mcp ; gemini -i "Set up Diagram for this repo, then ask me what to draw. If you don't have the Diagram tools, tell me the connection didn't work."

Sign in once: When Gemini first connects, a browser tab opens: sign in to Diagram and click Allow.

Full guide to diagrams in Gemini CLI

Using Windsurf, Zed, Cline, JetBrains, OpenCode, Claude or ChatGPT? Steps for every tool.

Then ask for a diagram

You never have to mention the server. Say what you want to see, such as “make an architecture diagram of this repo and give me a link”, and the AI uses it. For prompts that work on a real codebase, see how to make an architecture diagram of your codebase.

The kind of thing it saves:

Architecture · Dracula

How our app works

Explain your system to anyone.

cloud browser api postgres queue worker httpsread/writeenqueue cloud browser api postgres queue

The tools it gives your AI

save_diagram
Saves a diagram and returns its link. A new one is a draft only you can see.
edit_diagram
Changes part of a diagram by find and replace. The link stays the same.
publish_diagram
Shows a draft to the people on its project, after you say yes.
get_diagram
Reads a diagram back: an outline of its text, or the HTML around one piece of it.
get_screenshot
A picture of the diagram with layout warnings, so the AI checks its own work.
list_diagrams, list_projects, list_orgs
What you can see.
list_versions, restore_version
Every earlier version, and bringing one back.
move_diagram, delete_diagram
Housekeeping. Deleted diagrams go to an archive you can restore from.
setup_repo
Files that tell any agent working in a repo how its diagrams are kept.

There is no tool for making a diagram public or adding people. Sharing is done by you on the site, so an AI that has been tricked by something it read cannot expose your diagrams. How Diagram is secured.

How it compares to other diagram MCP servers

They solve different problems, so pick by what you want to end up with.

Mermaid servers
Turn Mermaid code into a picture or a preview. Good when you already write Mermaid and only need to see it.
draw.io and Excalidraw servers
Make a file or canvas you then edit by hand in that editor. Good when you want to drag the boxes around yourself.
Lucid, Miro and Eraser servers
Put the diagram in a board in their workspace. Good when your team already works there.
Diagram
Saves the diagram at a link anyone can open, which the AI keeps current. Good when the point is to send it to someone and not maintain it by hand.

Questions

Is there an MCP server for diagrams?
Yes, several. Diagram is one: a hosted server at https://diagram.la/mcp that lets your AI tool draw a diagram and save it at a link you can share. Others render Mermaid code or make files for editors such as draw.io and Excalidraw.
Does it work in Cursor and Claude Code?
Yes, and in Codex, GitHub Copilot in VS Code, Gemini CLI, Windsurf, Zed, Cline, JetBrains, OpenCode, Claude and ChatGPT. It is the same address in each; only where you paste it differs.
Do I need a skill or a plugin as well?
No. The server tells the AI when to use it and how to draw a diagram that reads well. In a repo, the AI can also add a short file (diagrams/README.md) so every later session knows where the repo’s diagrams are.
Does it work with Mermaid?
Yes. A diagram is a web page, so the AI can draw it with Mermaid, with plain boxes and arrows, or with a custom layout. You don’t need to know Mermaid: you describe what you want.
Do I have to install or run anything?
No. It is a hosted server, so there is no package to install and nothing running on your machine. You add one address and sign in once in the browser.
Who can see the diagrams?
A new diagram is a draft only you can see. Publishing shows it to the people on its project. Making a diagram public, or adding people, is done by you on the Diagram site and never by the AI.
Is it free?
Your first 5 diagrams are free. After that it's $5/month for as many as you want.