AI Database Design Tool — Design Schemas with Your AI Assistant

ER Flow is the only database design tool with a built-in MCP Server that connects directly to AI coding assistants like Cursor, Windsurf, and Claude Code. Instead of switching between your IDE and a separate design tool, your AI can read and modify the schema without leaving the conversation.

The integration works through the Model Context Protocol (MCP) — an open standard that lets AI tools call external services. ER Flow exposes 25+ MCP tools covering every aspect of schema design: creating tables, adding columns, defining foreign keys, creating indexes, managing views, and even writing stored procedures. The AI reads your current schema in DBML format before making changes, ensuring it never overwrites work already in progress.

Teams using ER Flow's AI integration report dramatic reductions in schema scaffolding time. A full SaaS data model — users, billing, permissions, audit logs — that would take a senior engineer hours to design manually can be scaffolded by an AI assistant in minutes. The visual canvas lets you review every change the AI makes, approve or reject individual operations, and keep a human in the loop throughout the process.

How It Works

25+ MCP Tools for Full Schema Control

The MCP Server exposes tools for every schema operation: create-table, update-column, create-foreign-key, create-index, create-view, batch-operations, and get-data-model-dbml. AI assistants can perform complex multi-step schema operations autonomously.

Context-Aware Schema Reads

Before making any change, the AI calls get-data-model-dbml to read your entire current schema in DBML format. This prevents the AI from creating duplicate tables or breaking existing foreign key relationships.

Batch Operations for Complex Scaffolding

The batch-operations tool lets an AI assistant create an entire domain schema — dozens of tables, columns, and relationships — in a single API call. This eliminates round-trip latency and produces consistent results.

Pending Changes Approval Workflow

Every AI-initiated schema change goes through ER Flow's pending changes workflow. Review what the AI wants to modify, approve individual operations, and reject anything that doesn't look right — keeping humans firmly in control.

Use Cases

Scaffold a complete e-commerce schema (products, orders, customers, reviews) from a plain-English description
Ask Cursor to add a notifications system to an existing schema without breaking current foreign keys
Let Windsurf design the database for a SaaS app while you focus on writing frontend code
Use Claude Code to review and suggest improvements to an existing schema via MCP

Connect your AI assistant to ER Flow — free to start

Free to get started. No credit card required.