Reading a database you did not design usually starts the same way: you open the schema, scroll through a few hundred lines of CREATE TABLE, and try to hold the foreign keys in your head. A picture would help, but drawing one by hand goes stale the moment the schema changes.
I built mcdview to skip that step. You drop a schema file and you get back a single self-contained HTML page: an interactive entity-relationship diagram you can zoom, search, isolate one table with its neighbours, and share by link. No account, nothing to install.
Here is one generated from the Pagila sample database, so you can see the output before reading further: mcdview.dev/v/2slcbFWyTvqJvIAxorPlSQ
What it reads
The point was to take whatever you already have, not to make you export to a specific format first. So it accepts:
-
SQL: PostgreSQL, MySQL/MariaDB, SQLite and about 15 dialects, detected automatically. A plain
pg_dumpworks. Several.sqlfiles at once work too, for a schema split across files, with foreign keys resolved across them. -
pgModeler
.dbm, MySQL Workbench.mwb -
dbml (dbdiagram.io), Prisma, Rails
schema.rb - Mermaid erDiagram, Drizzle ORM
The page you get
The generated page is static HTML with no runtime dependency, so it is safe to host anywhere or open straight from disk. The diagram itself is interactive: pan and zoom, a search box, click a table to isolate it with the tables it references, a minimap for large models, light and dark themes. Audit-trail columns like created_by or modified_by are detected and folded away by default so they stop cluttering the graph, with a toggle to bring them back.
Using it from CI
There is a small HTTP API. A create call returns a public link and a management key; an update call regenerates the diagram under the same link, so you can keep one stable URL in your README and refresh it on every build. From the second version on, the update also returns a diff between versions (tables and indexes added, changed, removed). You can also pull the Mermaid erDiagram as plain text to paste into a GitHub or GitLab README, which both render natively.
Open source
The generator is MIT-licensed: github.com/Gheop/mcdview. It is a self-contained Python script, so you can run it locally or in your own pipeline instead of the hosted service if you prefer.
Try it on your own schema: mcdview.dev. Feedback welcome, especially on dialects or formats that trip it up.
Top comments (0)