drawdb-mcp
About
DrawDB + MCP server Browse Drawdb MCP Server for Claude, Cursor, VS Code, and other AI agents.
Details
- Author
- anatoly314
- Categories
- Developer Tools, Database, Other
Jump to
Setup
Install drawdb-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/anatoly314/drawdb-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
The backend owns the diagram.MCP tools read and write the authoritative state directly, soevery tool works whether or not a browser is open— you do not need the editor running for an assistant to build a schema. When a GUIisconnected it acts as a synced view: the backend pushes each committed change to it, and edits made in the editor are submitted back. A tab that reconnects adopts whatever the backend holds.
This project began as a fork of DrawDB but has since diverged substantially and is intentionallynotkept in sync with upstream. Selected fixes and features are occasionally cherry-picked from the parent project, but the two will continue to drift apart as drawdb-mcp evolves on its own. DrawDB remains a separate, actively maintained project, and full credit goes to its authors — seedrawdb-io/drawdb.
Watch how to design database schemas using natural language with Claude AI.
- apps/gui: React frontend derived from DrawDB — a synced view of the backend's diagram, not the store
- apps/backend: NestJS MCP server that holds the authoritative diagram state
- packages/diagram-core: framework-free domain layer — entity schemas, the state reducer, the datatype tables and the SQL/DBML codecs, so the backend can render exports with no GUI running
- packages/remote-control-contract: the typed ORPC contract both directions of the socket share
- Built withTurborepoandpnpm workspaces
The easiest way to get started is using Docker:
docker run \ --name drawdb-mcp \ -p 8080:80 \ -p 3000:3000 \ --restart unless-stopped \ ghcr.io/anatoly-lab/drawdb-mcp:latest
- Open GUI:http://localhost:8080
- Connect Claude Codeto the MCP server:
claude mcp add --transport http drawdb-mcp http://127.0.0.1:3000
Now Claude can create and modify database diagrams for you!
latesttracks stable releases only. Betas and release candidates are published under their exact version and never movelatest, so pin the full version to run one:
docker run \ --name drawdb-mcp \ -p 8080:80 \ -p 3000:3000 \ ghcr.io/anatoly-lab/drawdb-mcp:2.0.0-beta.1
SeeGHCR_DEPLOYMENT.mdfor available tags and advanced usage.
- Node.js 20.19+ or 22.22+ (seeenginesinpackage.json)
- pnpm 8.15.0+ (install vianpm install -g pnpm)
git clone https://github.com/anatoly-lab/drawdb-mcp cd drawdb-mcp pnpm install pnpm dev
pnpm gui:dev # Access at http://localhost:5173
pnpm backend:dev # WebSocket at ws://localhost:3000/remote-control
pnpm build --filter=gui pnpm build --filter=backend
When running locally, connect Claude Code:
claude mcp add --transport http drawdb-mcp http://127.0.0.1:3000
The frontend connects to the backend over WebSocket automatically. Remember it is a view of the backend's state rather than the store: the tools keep working with no browser open, and a tab that reconnects adopts whatever the backend holds.
SeeDOCKER_BUILD.mdfor detailed build instructions.
docker-compose up --build # Access at http://localhost:8080
docker build -t drawdb-mcp:local . docker run -p 8080:80 -p 3000:3000 drawdb-mcp:local
The Docker image includes both frontend and backend. WebSocket is proxied through Nginx.
When updating to a new version (whether via Docker or local development),you must perform a hard refresh in your browserto clear the cached frontend JavaScript:
- Windows/Linux:Ctrl + Shift + RorCtrl + F5
- macOS:Cmd + Shift + R
Without a hard refresh, the browser may continue using the old cached frontend code even though the backend has been updated, which can cause errors or unexpected behavior.
The MCP server provides tools for exporting and importing database diagrams in multiple formats:
- SQL DDL: Export database-specific SQL statements (PostgreSQL, MySQL, SQLite, MariaDB, MSSQL, Oracle)
- DBML: Export to Database Markup Language (human-readable, database-agnostic format)
- JSON: Export complete diagram state for backup/restore
- DBML: Import database schemas from DBML format
- JSON: Import complete diagram state
- export_sql- Export diagram as SQL DDL for current database type
- export_dbml- Export diagram as DBML
- import_dbml- Import database schema from DBML
- export_diagram- Export complete diagram as JSON
- import_diagram- Import complete diagram from JSON
SeeCLAUDE.mdfor complete list of available MCP tools and their usage.
This project is licensed under theGNU Affero General Public License v3.0 (AGPL-3.0), inherited and retained from upstream DrawDB. See theLICENSEfile for the full text.
Built on top ofDrawDBby the DrawDB authors and contributors. Huge thanks to the original project for the foundation this fork is built on.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
connect a read-only replica, analytics database, or staging database. Keep credentials on your machine while the tool discovers schema, generates safe SQL, previews it for approval, runs the query, and summarizes the result.
An example of a remote, authentication-free MCP server deployable on Cloudflare Workers.
Efficient, SQL-backed C++ project indexer designed for large codebases with low memory footprint.
MCPg - Production-grade PostgreSQL MCP Server
Safe-by-default PostgreSQL Model Context Protocol server for AI agents.
Analyze, lint, and fix SQL queries using the SQLFluff linter.
MCP servers that give AI clients safe, structured access to SQL databases. One installable package per database engine. Every package exposes the same minimal two-tool surface, execute_sql and search_objects, with guardrails on by default: read-only mode, row caps, and statement timeouts.
Provides tools and resources for coding agents to interact with the Gel database, including automatic project configuration for query builders and ORMs.
MCP server that gives AI agents deep understanding of contemporary or legacy relational databases.
Browse, create, and manage schema projects on the Schematica schema library. 8 MCP tools for AI-powered schema design and data modeling.
Interact with Supabase databases, query tables, and generate TypeScript types.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





