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
- Gives every diagram a link. Without a server, a diagram your AI draws stays in the chat or in a file only you can open. With it, there is a page you can paste into Slack, a pull request or a doc.
- Keeps the link current. Changes are saved as new versions at the same address, and every earlier version is kept.
- Lets the AI check its work. Each save comes back with a screenshot and layout warnings, so overlapping labels get fixed before you see them.
- Works the same in every tool. A diagram made in Cursor can be changed from Claude Code or ChatGPT, because it lives at the link and not in one app.
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 CursorClaude 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 CodeCodex 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 CLIVS 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 + CopilotGemini 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 CLIUsing 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.