Labsco
anatoly314 logo

drawdb-mcp

โ˜… 16

from anatoly314

DrawDB + MCP server

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup
drawdb logo

drawDB + MCP Server

This fork of DrawDB extends the original with AI assistant integration via Model Context Protocol (MCP). AI assistants like Claude can now create, modify, and manage database diagrams programmatically through a WebSocket API.

Relationship to Upstream DrawDB

This project began as a fork of DrawDB but has since diverged substantially and is intentionally not kept 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 โ€” see drawdb-io/drawdb.

Demo Video

DrawDB MCP Integration Demo

Watch how to design database schemas using natural language with Claude AI.

Architecture:

  • apps/gui: React-based frontend derived from DrawDB
  • apps/backend: NestJS MCP server that enables AI assistants to control the diagram editor
  • Built with Turborepo and pnpm workspaces

Features

Export & Import

The MCP server provides tools for exporting and importing database diagrams in multiple formats:

Export 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

Import Formats:

  • DBML: Import database schemas from DBML format
  • JSON: Import complete diagram state

Available MCP Tools:

  • 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

See CLAUDE.md for complete list of available MCP tools and their usage.