dbx
Query databases from AI agents using connections configured in DBX.
T8t8y2/dbx26k近 7 天新增 1,070 个 star
ERD Editor: design database schemas visually, import SQL DDL, GraphQL, DBML and AML, export DDL and code for 22 languages. Web app, Google Drive, VS Code, IntelliJ, Obsidian, a custom element, and an MCP server that lets coding agents edit diagrams live.
Entity-Relationship Diagram Editor

Design a database schema visually, bring in one you already have from SQL DDL, GraphQL SDL, DBML or AML, and take it out as DDL or as generated code. ERD Editor is one editor and one file format on erd-editor.io, in Google Drive, VS Code, IntelliJ-based IDEs and Obsidian, and in your own page as a custom element, and a coding agent edits the same diagrams through its MCP server.
| Install | ||
|---|---|---|
| Web app | erd-editor.io | Installable PWA that launches offline, real-time collaboration |
| Google Drive | Google Workspace Marketplace | Adds ERD Editor to Drive's Open with and New menus, saving back to the same file |
| VS Code | Marketplace | Opens .erd.json files in a custom editor |
| IntelliJ | JetBrains Marketplace | Same, for IntelliJ-based IDEs |
| Obsidian | Community plugins | Opens .erd and .erd.json files in a vault tab, desktop only |
| Your app | npm install @dineug/erd-editor | The framework-free <erd-editor> custom element |
| Coding agents | @dineug/erd-editor-mcp | An MCP server for Claude Code, Codex or another client, live in VS Code, a JetBrains IDE or Obsidian, or on the file |
To try it in an IDE, create an empty file with a .erd.json extension and open it. In Obsidian,
run ERD Editor: Create new diagram from Obsidian's command palette. In Google Drive, choose
New → More → ERD Editor.
Alt+N adds a table and Alt+Enter a column, Alt+K toggles the primary
key on the focused column, or on every selected column when it is one of them, and Delete or
Backspace removes the selection, each in one undo step; the Shortcuts page of the editor's
Settings tab lists every keyuser_id for user's id), and
Map Columns in a relationship's right-click menu changes its columns laterD:C U:R, and View Option's Referential
Actions hides the labels. SQL, DBML and AML import read them, and the DDL export and the code
generators that have a place for them write the ones the target supportsAK1.1, AK1.2, and SQL import reads a UNIQUE over several columns as one
such indexTableGroupsAlt while dragging to duplicate them, and
color a table, memo or table group from its right-click menu.sql dump from any of the eight vendors below. The parser reads
CREATE TABLE, CREATE INDEX, ALTER TABLE constraints and table and column comments
(COMMENT ON, SQL Server's sp_addextendedproperty), and skips what it does not recognize, so an
awkward dump imports partially rather than failing outright.dbml file written for dbdiagram.io or dbdocs.io, or emitted by
sql2dbml or prisma-dbml-generator. Tables, columns, indexes, enums, header colors, every Ref
spelling and each TableGroup arrive; a Project or a sticky Note is skipped rather than
refused.aml file written for Azimutt, in either the
v2 or the legacy v1 spelling. Entities, attributes, indexes, enums, colors and every relation
arrow arrive; a check and a struct type are skipped rather than refused, and a view arrives as a
table.sql, GraphQL, DBML, AML or .erd.json file to the diagram instead of replacing it: its tables
arrive below everything already there, laid out the same way (an .erd.json file keeps its own
placement), selected, and one undo takes them away. A table whose name is already taken arrives as
a second table rather than merging, and a foreign key to a table outside the file is dropped.sql file or copies itUSE or CREATE + USE header, each where the
database has it, and the tables by table group, and keeps SQL of your own to write before and
after the tables. The statements, header and tables stay with this editor until you close it and
never reach the file; the scripts are saved in the document.erd.json, .sql, and a .png or .svg from a dialog with a preview: transparent
background, light or dark, the PNG at 1x to 3x or copied to the clipboard insteadCtrl/Cmd+K opens the command palette to run editor commands (new table,
import, export, Auto Layout, tabs, theme, language and more), or to jump to a table after #, a
column after @, and a comment or memo after :; Korean also matches by its initial consonants
(ㅅㅇㅈ finds 사용자)Ctrl/Cmd+F searches table and column names, comments and memos, with
match case, whole word and regular expressions, and one undo takes back a Replace AllAlt+F does for the
selection, and neither view writes its layout into the file.json file from the canvas menuCtrl/Cmd+Z and Ctrl/Cmd+Shift+Z,
in the editor's own historygetSharedStore()@dineug/erd-editor-mcp, live on the canvas in VS Code, Obsidian or a
JetBrains IDE, where the agent's undo reverts only its own edits, or on the file itself when no
editor holds itnpm install @dineug/erd-editor
import '@dineug/erd-editor';
const editor = document.createElement('erd-editor');
// the editor fills its container, and a custom element is inline by default
Object.assign(editor.style, { display: 'block', width: '100%', height: '100vh' });
document.body.appendChild(editor);
It is a custom element, so it works from any framework or from none. See
packages/erd-editor for installation, attributes and the element API.
Open a schema on erd-editor.io, choose Start session from its collaboration button in the sidebar, and share the link. Everyone who opens it edits the diagram with you, and their edits are saved in your browser: the link is the only key, so share it only with people you would let edit. Each participant can set a nickname, shown in the participant list and beside their pointer.
The session lives in the host's browser: guests keep no copy of the diagram, and it ends when the host closes their last tab, so a guest who wants the diagram exports it first.
Sessions are peer-to-peer over WebRTC, and the diagram and every edit are encrypted with AES-GCM. A signaling relay introduces the peers and never sees plaintext; the room's secret key lives in the URL fragment, which browsers leave out of every request, so neither the relay nor erd-editor.io's server receives it. In the host's browser, the open tabs elect a leader that holds the peer connections for all of them; each guest tab joins on its own.
flowchart TB
subgraph clientA["Client A"]
bcA["Broadcast Channel"]
tabA1["Tab (leader)"]
tabA2["Tab"]
swA["Shared Worker"]
idbA[("IndexedDB")]
bcA <--> tabA1
bcA <--> tabA2
tabA1 <--> swA
tabA2 <--> swA
swA <--> idbA
end
subgraph clientB["Client B (guest)"]
tabB1["Tab"]
end
relay["Signaling Relay (nostr / mqtt)"]
tabA1 <-->|"WebRTC (AES-GCM)"| tabB1
tabA1 -. "signaling" .-> relay
tabB1 -. "signaling" .-> relay
@dineug/erd-editor-mcp is an MCP server that gives Claude Code, Codex or
any other MCP client one tool per editing operation: add a table, rename a column, relate two
tables, import a DDL dump, read the schema back as SQL. When a VS Code window, an Obsidian vault or
a JetBrains IDE has the diagram open, or holds it in its workspace, vault or project, the agent
joins that editor as one more collaborator: each change shows up on the canvas as it happens, and
the agent's undo reverts only its own edits. With no editor holding the diagram, the same tools
edit the file on disk. An editor with its connection turned off, or a VS Code workspace or
JetBrains project you have not trusted, lets the agent read but refuses its edits, which the
editor's next save would overwrite. The server needs Node.js 22.12 or later; for Claude Code, run
this in your project folder:
claude mcp add --transport stdio erd-editor -- npx -y @dineug/erd-editor-mcp
Its README sets up Codex and other clients and lists the current tools; the MCP docs cover installing the server and live and headless editing.

<erd-editor>
element's APIThis is a pnpm workspace. Two packages are published to npm:
@dineug/erd-editor, the editor itself, syntax highlighting included, and
@dineug/erd-editor-mcp, the MCP server for coding agents. The three
plugins ship through their own stores, app is erd-editor.io, and the rest are private libraries
and bundles those builds take in.
| Folder | npm name | Description |
|---|---|---|
erd-editor | @dineug/erd-editor | The editor core: the <erd-editor> custom element and the headless engine.js and peer.js entries |
erd-editor-schema | @dineug/erd-editor-schema | The v2/v3 document schema, parsing, serializers, queries and LWW operators |
schema-sql-parser | @dineug/schema-sql-parser | Permissive DDL parser used for SQL import |
uuid | @dineug/uuid | UUIDv7 and the Uuid25 encoding, the ids the editor mints |
r-html | @dineug/r-html | The tagged-template rendering framework and store the editor is built on |
vite-plugin-r-html | @dineug/vite-plugin-r-html | JSX → tagged templates, plus HMR boundaries |
app | @dineug/erd-editor-app | The React PWA at erd-editor.io, with the Google Drive editor at /gdrive, whose OAuth relay is the Pages Function in functions/ |
vscode-extension | vuerd-vscode | The published VS Code extension, with its side of the coding-agent hub |
vscode-webview | @dineug/erd-editor-vscode-webview | The bundle inside the VS Code webview |
webview-client | @dineug/erd-editor-webview-client | The editor mounted into an IDE webview, host protocol wired, shared by both IDE bundles |
webview-bridge | @dineug/erd-editor-webview-bridge | Typed host ↔ webview command protocol |
replication-store-worker | @dineug/erd-editor-replication-store-worker | Headless document replica in a Worker, serializing what the IDE webviews and the Obsidian plugin save |
intellij-webview | @dineug/erd-editor-intellij-webview | The bundle inside the IntelliJ plugin's editor panel |
intellij-plugin | @dineug/erd-editor-intellij-plugin | The published IntelliJ plugin, in Kotlin and Gradle, with its own Kotlin hub for coding agents |
obsidian-plugin | @dineug/erd-editor-obsidian-plugin | The Obsidian plugin, released from erd-editor-obsidian-plugin |
agent-hub | @dineug/erd-editor-agent-hub | The protocol between an editor window and a coding agent's MCP server: messages, lock files, framing |
agent-hub-host | @dineug/erd-editor-agent-hub-host | The editor window's side of that protocol, shared by the VS Code extension and the Obsidian plugin; the IntelliJ plugin ports it to Kotlin |
mcp-server | @dineug/erd-editor-mcp | The published MCP server, live in VS Code, Obsidian or a JetBrains IDE, or headless on the file |
You need Node 22.22.1 or later on the 22 line, 24.11 or later on the 24, or 26 and up (.nvmrc
pins 22.23.2, which CI runs), Git 2.32 or later for the pre-commit hook, and pnpm 10.34.3,
which packageManager pins. The IntelliJ plugin also needs a JDK 17 or later to run Gradle, whose
toolchain resolver fetches the JDK 21 the plugin compiles against if you lack it.
pnpm test runs erd-editor's browser specs in Chromium, so install it once:
pnpm install
pnpm --filter @dineug/erd-editor exec playwright install --with-deps chromium
pnpm check # format and lint check, root tsc, tools' specs, task-input check
pnpm test # per package: build deps, tsc --noEmit, unit and browser specs
pnpm -r --no-bail test:coverage # each package's specs with coverage; CI runs it after pnpm test
pnpm build # build every package
pnpm size # after pnpm build: the bundle-size check CI runs
pnpm peer-graph # after pnpm build: the peer.js graph check CI runs
pnpm cache:clear # empty the Vite Task cache
pnpm format # write formatting fixes
The build and test tasks go through Vite+, whose vp binary
pnpm install puts in node_modules/.bin; everything else is a package.json script. Filter a
package by its npm name or by ./packages/<folder>.
pnpm exec vp run --filter @dineug/erd-editor --fail-if-no-match test # a task
pnpm --filter @dineug/erd-editor-app dev # a script: the web app
intellij-plugin is the exception: a Gradle project, built and tested from its own directory,
whose package.json holds only its smoke and probe scripts. pnpm test never reaches its Kotlin.
cd packages/intellij-plugin
./gradlew buildWebview # the webview bundle it packages
./gradlew runIde # a sandbox IDE with the plugin loaded
./gradlew check # its JUnit specs, the conformance runs and the Kover coverage gate
./gradlew buildPlugin # the distributable zip
The Playwright end-to-end suites and the VS Code Extension Host suite are not part of pnpm test;
CI runs them as separate jobs.
pnpm --filter @dineug/erd-editor e2e # also @dineug/r-html and @dineug/erd-editor-app
pnpm --filter vuerd-vscode e2e # launches a real VS Code; prefix with `xvfb-run -a` on Linux
Everything else a change needs, which checks it runs, what it carries and the commit rules, is in AGENTS.md.
Issues and pull requests are welcome. Commit messages follow Conventional Commits and are checked by commitlint.
MIT © SeungHwan-Lee
Query databases from AI agents using connections configured in DBX.
T8t8y2/dbx26k近 7 天新增 1,070 个 star
MCP Toolbox for Databases enables your agent to connect to your database.
GOgoogleapis/mcp-toolbox17k近 7 天新增 56 个 star
Real-time Kubernetes network traffic visibility and API analysis for HTTP, gRPC, Redis, Kafka, DNS.
KUkubeshark/kubeshark12k近 7 天新增 7 个 star
Let your users work with their own data through an AI assistant, limited to what they can see.
NHnhost/nhost9.4k近 7 天新增 10 个 star
Open-source desktop SQL workspace with 3 built-in database drivers and 16 shipped plugins, including SQL Server, DuckDB, ClickHouse and Redis. Built-in MCP server for Claude, Cursor and Devin, SQL notebooks and visual EXPLAIN.
TATabularisDB/tabularis5.2k近 7 天新增 81 个 star
Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.
JIjitsucom/jitsu5.1k近 7 天新增 8 个 star