How to make diagrams in Cursor
Ask Cursor (the AI code editor) 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 Cursor makes is saved at a link you can share, which stays current as the diagram changes. It takes three steps.
1. Connect Diagram to 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.
2. Ask Cursor for a diagram
Open your repo and switch the chat to Agent, then describe what you want in plain words. For example:
- “Draw how a request flows through this app, from the browser to the database.”
- “Diagram the files and functions involved in checkout, and what calls what.”
- “Show the data model as an entity diagram, from the schema in this repo.”
- “Update the architecture diagram: we just added a queue and a worker.”
Cursor 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 Cursor 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 Cursor: the link stays the same and every version is kept.