MCP

Generate architecture diagrams from Claude Code.

Keep working in Claude Code and get a diagram that a layout solver produced.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

Add Lucid Train to Claude Code as an stdio MCP server and its diagram tools become available in your session as mcp__lucid__emit_diagram. Claude Code supplies a semantic graph of components and edges after reading your repository, and the ELK layout engine positions them, so you get a laid-out architecture diagram without leaving the terminal and without the model choosing coordinates.

Why not just ask for Mermaid

You can, and for a five-box flow it is the right answer. Two limits show up quickly: Mermaid's layout starts producing crossing edges and awkward spacing past roughly twenty to thirty nodes with only coarse direction hints to fight it, and there is no way to attach a real service logo to a node so every box looks alike. Both matter on a diagram of a real system and neither matters on a small one.

What changes with the MCP server

Claude Code still does the reading and the reasoning, which is what it is good at. It hands over a semantic graph rather than a picture, and a constraint solver does the arrangement. The diagram comes back with tier bands so dependency direction is visible, bundled service icons, and orthogonal routing.

Setup

Add it as a command-type MCP server in your Claude Code configuration. The tools appear namespaced as mcp__lucid__*.

Transport

Connections are stdio: the server runs as a local child process with piped stdin and stdout. Remote HTTP and SSE servers appear in the Connectors tab's registry search but cannot be connected, and that is a real limit rather than a configuration step you are missing. A remote server needs a local stdio bridge in front of it.

Or run Claude Code the other way round

Lucid Train can also drive Claude Code as its execution engine, alongside Codex, Cursor and OpenCode, selectable per tab with each CLI's permission model mapped onto one set of approval modes. Which direction suits depends on whether you want the canvas in front of you or the terminal.

Add the server

shell
$ claude mcp add lucid -- lucid-train mcp
# Then: "Diagram this repository's architecture"
FAQ

Questions

Can Claude Code generate architecture diagrams?

It can write Mermaid into a file like any coding agent. For a laid-out diagram with real icons and tier bands, add Lucid Train as an stdio MCP server and its diagram tools become available in the session.

Do I need the Lucid Train desktop app?

No. The MCP server ships with the free CLI. The desktop app adds the interactive canvas and version history.

Does this send my code anywhere new?

No. The MCP server runs locally as a child process. Whatever Claude Code already sends to Anthropic is unchanged; nothing additional leaves the machine.

Related