MCP Setup

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.

⚙️
Developer preview. The npm package is on the way. For now you run the server from source — the steps below cover both, and the published flow is noted where it changes.
1

Prerequisites

You'll need Node 18 or newer and an MCP-compatible client (Claude Code, Codex, etc.). Check your Node version:

node -v
2

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.

3

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"]
    }
  }
}
4

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.

5

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.

6

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.