Native MCP server
Nine tools over Streamable HTTP: validate, create, edit, export. Scoped API keys, idempotent writes, per-tier rate limits — the same rules the UI plays by.
Native MCP server
Design Postgres schemas in DBML or on a visual canvas, mirror a live database read-only, and plug your agent into the same diagrams through a native MCP server.
The agent loop
The MCP surface covers the full design loop — no pasting SQL back and forth.
Point your agent at the MCP endpoint with a scoped API key.
It writes DBML, checks it with validate_dbml — errors come back with line and column — and applies it with create_diagram or apply_dbml.
Export Postgres DDL with export_sql, a Drizzle schema with generate_drizzle, or share the diagram's URL.
MCP surface
Remote MCP over Streamable HTTP with Bearer API keys. Every tool is a client of the same service layer the UI uses — same rules, same results.
Connect in one block
{
"mcpServers": {
"dbdiagramflow": {
"type": "http",
"url": "https://dbdiagramflow.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}| Tool | Scope | What it does |
|---|---|---|
| validate_dbml | read | Validate DBML — errors come back with line and column |
| create_diagram | write | Create a diagram from DBML or empty; returns its id and URL |
| list_diagrams | read | List the diagrams the API key can access |
| get_schema | read | Read a diagram's full model plus its DBML |
| apply_dbml | write | Replace the DBML of a text diagram |
| edit_schema | write | Apply structural edits to a flow diagram |
| export_sql | read | Export the schema as Postgres DDL |
| generate_drizzle | read | Generate the Drizzle schema |
| refresh_snapshot | write | Refresh the snapshot of a live-database diagram |
Everything in one surface
Nine tools over Streamable HTTP: validate, create, edit, export. Scoped API keys, idempotent writes, per-tier rate limits — the same rules the UI plays by.
Point a read-only connection at your Postgres and keep a diagram in sync with the real schema. We only ever read.
Write schemas as plain DBML text — diffable, portable, and always what gets persisted.
Design tables and relationships on a canvas with auto-layout presets.
Start from a live mirror, clone into an editable text or canvas diagram in one step.
Generate Postgres DDL or a typed Drizzle schema from any diagram.
Publish a diagram at a non-guessable URL — strictly read-only.
Share one workspace with owner, editor and viewer roles.
Start free. Upgrade when your schemas — or your agents — outgrow it.