Turns SQL CREATE TABLE statements into an entity relationship diagram you can print.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Use this when the user wants SQL CREATE TABLE statements checked without a drawing, for example "check my schema for broken foreign keys" or "which tables have no primary key". Takes the same DDL text and dialect as make_er_diagram. Returns foreign keys that point to a missing table or column, foreign keys whose referenced columns are not a primary key or UNIQUE, type differences between a foreign key column and the column it references, tables without a primary key, duplicate table and column names (with the name rule used), and the statements it skipped with line numbers. Draws nothing and makes no files. Does not connect to a database or check data.
The SQL DDL text: CREATE TABLE statements with columns, types, NOT NULL, PRIMARY KEY, UNIQUE and REFERENCES / FOREIGN KEY, up to 200,000 characters, e.g. "CREATE TABLE users (id int PRIMARY KEY, email text NOT NULL UNIQUE); CREATE TABLE orders (id int PRIMARY KEY, user_id int NOT NULL REFERENCES users(id));". Other statements are listed as skipped.
Which SQL quoting and type names to read: auto (default; accepts "x", `x` and [x]), postgres, mysql or sqlite. It also sets how names are matched: postgres folds unquoted names to lower case and keeps quoted names exact; the others ignore case. Example: postgres.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http er-diagram https://er-diagram.zovo.one/mcp
Use this when the user wants SQL CREATE TABLE statements checked without a drawing, for example "check my schema for broken foreign keys" or "which tables have no primary key". Takes the same DDL text and dialect as make_er_diagram. Returns foreign keys that point to a missing table or column, foreign keys whose referenced columns are not a primary key or UNIQUE, type differences between a foreign key column and the column it references, tables without a primary key, duplicate table and column names (with the name rule used), and the statements it skipped with line numbers. Draws nothing and makes no files. Does not connect to a database or check data.
| Argument | Type | Description |
|---|---|---|
| ddl* | string | The SQL DDL text: CREATE TABLE statements with columns, types, NOT NULL, PRIMARY KEY, UNIQUE and REFERENCES / FOREIGN KEY, up to 200,000 characters, e.g. "CREATE TABLE users (id int PRIMARY KEY, email text NOT NULL UNIQUE); CREATE TABLE orders (id int PRIMARY KEY, user_id int NOT NULL REFERENCES users(id));". Other statements are listed as skipped. |
| dialect | string | Which SQL quoting and type names to read: auto (default; accepts "x", `x` and [x]), postgres, mysql or sqlite. It also sets how names are matched: postgres folds unquoted names to lower case and keeps quoted names exact; the others ignore case. Example: postgres. |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ddl"
],
"properties": {
"ddl": {
"type": "string",
"maxLength": 400000,
"description": "The SQL DDL text: CREATE TABLE statements with columns, types, NOT NULL, PRIMARY KEY, UNIQUE and REFERENCES / FOREIGN KEY, up to 200,000 characters, e.g. \"CREATE TABLE users (id int PRIMARY KEY, email text NOT NULL UNIQUE); CREATE TABLE orders (id int PRIMARY KEY, user_id int NOT NULL REFERENCES users(id));\". Other statements are listed as skipped."
},
"dialect": {
"enum": [
"auto",
"postgres",
"mysql",
"sqlite"
],
"type": "string",
"description": "Which SQL quoting and type names to read: auto (default; accepts \"x\", `x` and [x]), postgres, mysql or sqlite. It also sets how names are matched: postgres folds unquoted names to lower case and keeps quoted names exact; the others ignore case. Example: postgres."
}
}
}Use this when the user wants an ER diagram, entity relationship diagram or database schema diagram drawn from SQL CREATE TABLE statements, for example "draw an ER diagram of this schema" or "make a PDF of my database tables". Takes the DDL text, a dialect (auto, postgres, mysql, sqlite), a page size and an optional title. Reads CREATE TABLE with columns, types, NOT NULL, PRIMARY KEY, UNIQUE and REFERENCES / FOREIGN KEY, including composite keys; lists every other statement as skipped with its line number. Returns counts, relationships with crow's foot cardinality taken from the DDL, schema problems, a geometry check (overlapping tables, lines crossing a table), the PDF page count and smallest text size, an interactive diagram, and PDF, SVG, CSV and JSON downloads. Refuses a CREATE TABLE that does not parse, naming the line. Up to 50 tables. Does not connect to a database or run SQL. Download links of large diagrams expire after about 1 hour.
| Argument | Type | Description |
|---|---|---|
| ddl* | string | The SQL DDL text: CREATE TABLE statements with columns, types, NOT NULL, PRIMARY KEY, UNIQUE and REFERENCES / FOREIGN KEY, up to 200,000 characters, e.g. "CREATE TABLE users (id int PRIMARY KEY, email text NOT NULL UNIQUE); CREATE TABLE orders (id int PRIMARY KEY, user_id int NOT NULL REFERENCES users(id));". Other statements are listed as skipped. |
| title | string | Title printed on the diagram and used in file names, up to 80 characters, e.g. "Shop database". |
| dialect | string | Which SQL quoting and type names to read: auto (default; accepts "x", `x` and [x]), postgres, mysql or sqlite. It also sets how names are matched: postgres folds unquoted names to lower case and keeps quoted names exact; the others ignore case. Example: postgres. |
We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Nov 8, 2026.
| page_size | string | PDF page: letter (default), a4 or tabloid (11 x 17 in). Landscape unless portrait needs fewer pages. |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ddl"
],
"properties": {
"ddl": {
"type": "string",
"maxLength": 400000,
"description": "The SQL DDL text: CREATE TABLE statements with columns, types, NOT NULL, PRIMARY KEY, UNIQUE and REFERENCES / FOREIGN KEY, up to 200,000 characters, e.g. \"CREATE TABLE users (id int PRIMARY KEY, email text NOT NULL UNIQUE); CREATE TABLE orders (id int PRIMARY KEY, user_id int NOT NULL REFERENCES users(id));\". Other statements are listed as skipped."
},
"title": {
"type": "string",
"maxLength": 400,
"description": "Title printed on the diagram and used in file names, up to 80 characters, e.g. \"Shop database\"."
},
"dialect": {
"enum": [
"auto",
"postgres",
"mysql",
"sqlite"
],
"type": "string",
"description": "Which SQL quoting and type names to read: auto (default; accepts \"x\", `x` and [x]), postgres, mysql or sqlite. It also sets how names are matched: postgres folds unquoted names to lower case and keeps quoted names exact; the others ignore case. Example: postgres."
},
"page_size": {
"enum": [
"letter",
"a4",
"tabloid"
],
"type": "string",
"description": "PDF page: letter (default), a4 or tabloid (11 x 17 in). Landscape unless portrait needs fewer pages."
}
}
}