Draw your architecture from code.
The SchemaFlow MCP lets Claude Code, Codex, or any MCP-compatible assistant read a repository and produce a system-design diagram — components, connections, and plain-English descriptions, laid out and ready to edit.
Prerequisites
You'll need Node 18 or newer and an MCP-compatible client (Claude Code, Codex, etc.). Check your Node version:
node -v
Get the server
During the preview, install it from source:
git clone https://github.com/tom-pettit/schemaflow.git cd schemaflow/mcp npm install
Once published
No clone needed — your client runs it on demand with npx -y schemaflow-mcp.
Connect your assistant
Claude Code — point it at the server (use the absolute path to mcp/index.js):
claude mcp add schemaflow -- node /path/to/schemaflow/mcp/index.js
# once published: claude mcp add schemaflow -- npx -y schemaflow-mcp
Codex — add to ~/.codex/config.toml:
[mcp_servers.schemaflow] command = "node" args = ["/path/to/schemaflow/mcp/index.js"]
Any client that takes JSON — add an MCP server entry:
{
"mcpServers": {
"schemaflow": {
"command": "node",
"args": ["/path/to/schemaflow/mcp/index.js"]
}
}
}
Generate a diagram
Open your repo in the assistant and ask:
"Read this repo and create a SchemaFlow diagram of the architecture."
It reads the code, describes the system as components and connections, and the MCP lays it out and returns an import link.
Open & save it
Click the link to open the diagram on the canvas — or paste it (or a .json file) into Import in the app. Sign in to save it to your account, where it's encrypted on your device before it's stored.
Reference
Tools
create_system_diagram — { name, components[], links[] } → an import link. Layout is automatic.list_component_types — the available shape types.Configuration
SCHEMAFLOW_URL — override the base URL (defaults to https://schemaflow.dev) if you self-host.
Component type is one of: service, process, gateway, balancer, database, cache, storage, queue, cloud, client, note. The model supplies the logical graph; SchemaFlow handles the layout and routing.