export_sqlLABSCO SUMMARY
The diagram lives in the backend, so the agent is not driving a UI.
Most editor integrations break the moment nobody has the tab open. Making the backend authoritative means schema work happens headlessly and the browser is just a window onto it — which is also why exports render correctly with no GUI running. Worth knowing it has diverged from upstream DrawDB on purpose and only cherry-picks fixes.
What it is
A fork of DrawDB with an MCP server in front of it. The backend holds the authoritative diagram state, so an assistant can create tables, change relationships and export SQL whether or not the editor is open; when a browser is connected it acts as a synced view.
What you get
export_sql— the diagram as SQL DDL for the current database type, covering PostgreSQL, MySQL, SQLite, MariaDB, MSSQL and Oracleexport_dbmlandimport_dbml— round-trip through Database Markup Language, which is human-readable and database-agnosticexport_diagramandimport_diagram— the complete diagram state as JSON, for backup or restore- Every tool works with no browser open; a tab that reconnects adopts whatever the backend holds, and edits made in the editor are submitted back
Requirements
Docker is the quickest path: run ghcr.io/anatoly-lab/drawdb-mcp:latest publishing ports 8080 and 3000, open the GUI at http://localhost:8080, and connect with claude mcp add --transport http drawdb-mcp http://127.0.0.1:3000. Pin the full version to run a beta — latest only tracks stable. For local development you need Node.js 20.19+ or 22.22+ and pnpm 8.15.0+, then pnpm install and pnpm dev. After any upgrade do a hard refresh in the browser, or the cached frontend keeps running against the new backend. AGPL-3.0, inherited from upstream DrawDB.
Setup effort
Follow the published steps — docker run --name drawdb-mcp -p 8080:80 -p 3000:3000 --restart unless-stopped ghcr.io/anatoly-lab/drawdb-mcp:latest
USE CASES
Designing a schema by describing it
Build the tables and relationships in conversation, then export the DDL for your database.
Bringing an existing schema in to look at
Import a DBML definition and let the diagram render it for review.
Keeping a versionable copy of the design
Export the whole diagram as JSON to commit, and restore it later when you need that state back.
8 tools
Listed in project docs. Your client may show a different list.
export_dbmlimport_dbmlexport_diagramimport_diagramget_diagramget_tableadd_tableBEFORE YOU INSTALL
What to know first
Tools you get
8 tools named in the project's documentation. The documentation's tool list covers export and import only; get_diagram, get_table and add_table are named elsewhere, and the project describes editing tables, fields and relationships without naming those tools.
Requires
- Node.js 20.19+
- pnpm 8.15.0+
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
docker run \
--name drawdb-mcp \
-p 8080:80 \
-p 3000:3000 \
--restart unless-stopped \
ghcr.io/anatoly-lab/drawdb-mcp:latestMCP Clients
Claude Code
claude mcp add --transport http drawdb-mcp http://127.0.0.1:3000