This MCP server, io.github.sqemo/sqemo, provides functionality for Sqemo to design ERDs by querying and editing entities and relationships using SQL and DBML. It is presented with topics covering data modeling, database design, naming conventions, and multiple database engines (MySQL, Oracle, PostgreSQL).
๐ ๏ธ Key Features
Design ERDs with team naming standards
Query and edit entities and relationships
Output/interaction via SQL and DBML
Model Context Protocol (MCP) server
๐ Use Cases
ERD design aligned to consistent naming conventions
Maintaining and updating database schemas through entities/relationships
Working with SQL/DBML representations in database design workflows
โก Developer Benefits
DBML and SQL-focused tooling for schema modeling
Supports common database engines listed in topics: MySQL, Oracle, PostgreSQL
Integrates as an MCP server for Model Context Protocol workflows
โ ๏ธ Limitations
Available documentation excerpt cuts off after โAI agents that folloโ, so additional capabilities beyond ERD/SQL/DBML are not specified.
MCP server for Sqemo โ AI agents that follow your team's database naming standard.
Your agent models in business terms ("Customer Number"); the column comes out as cust_no
because your word list says customer โ cust, number โ no (case and delimiter are rules
too, so CUST_NO is one setting away). Same input, same name, every
table, every agent. Overrides are allowed but flagged, and a CLI lint catches drift in CI.
Works with Claude Code, Claude Desktop, Cursor, and any MCP client. Local .erd.json files
need no account; cloud ERDs and Pro tools need npx sqemo-mcp login.
What it looks like
Model a discussion board where members post articles, a post can be a reply to another
post, and members comment on posts.
The agent calls the tools with logical names and never types a column name:
jsonc
upsert_entity { logicalName:"Post"}// โ { physicalName: "POST" }
upsert_attribute { logicalName:"Post Content", domain:"Content"}// โ { physicalName: "POST_CNTS" } // Content โ CNTS: from the team word list
upsert_attribute { logicalName:"Delete Flag", domain:"Flag"}// โ { physicalName: "DELETE_YN" } // Flag โ YN: same rule in every table
lint_erd
// โ naming drift, missing words, referential integrity โ before any DDL is written
CNTS and YN are not the agent's taste. They are your word list's abbreviations, applied the
same way they were applied in every other table your team has modelled. Domains carry the data
type, so Content is varchar(1000) everywhere it appears.
AI agents can query and edit entities, relationships, and domains; generate physical names
from a shared team glossary; import/export SQL (7 dialects) and DBML; and compare the model
against a live database. Works with both local .erd.json files and ERDs stored on the
Sqemo cloud.
Requires Node.js >= 22. Local-file tools work without any account or configuration.
Login is needed for cloud ERD tools, and for the tools marked (Pro) below.
login asks how you want to sign in. Google and GitHub open a browser tab, complete a
PKCE OAuth flow, and hand the session back through a one-shot loopback server on
127.0.0.1; the third option takes an email and password in the terminal. Only a
refresh token is ever stored.
Credentials are stored in ~/.erdmaker/credentials.json (mode 0600 on POSIX);
your password is never persisted.
Non-interactive shortcuts:--password forces the email + password path,
--provider google|github forces a browser path.
Piped input skips the menu and goes straight to email + password, so existing
automation keeps working: printf 'email\npassword\n' | npx sqemo-mcp login
The browser paths need a browser on the same machine (the callback returns to
127.0.0.1). Over SSH or in CI, use --password or the SQEMO_EMAIL /
SQEMO_PASSWORD environment variables.
What you can do
36 tools in total.
Read (17 tools)
Tool
Description
list_erds / list_workspaces
Cloud ERDs and workspaces you belong to (login required)
Structural validation and full lint (naming drift, referential integrity, duplicates)
diff_erds
Diff two sources (files, cloud ERDs, or raw SQL/DBML text) โ dry-run before imports
export_alter_sql
Migration (ALTER) script from the physical diff against a baseline โ renames stay renames via stable IDs, destructive changes come commented out (Pro)
list_proposals
Glossary proposal queue status (login required)
Live database (2 tools)
Read-only against your own database. Both query only the information schema โ
never table data โ and the connection URL is used by this local process only,
never sent to Sqemo servers.
Tool
Description
introspect_db
Import a live PostgreSQL/MySQL schema into an existing ERD (Pro)
check_db_drift
Check a live database or a schema dump against the ERD's physical model โ missing/extra tables and columns, PK/FK/NOT NULL mismatches (Pro)
Write (17 tools)
Tool
Description
create_erd
New ERD from scratch or from SQL/DBML text โ to a file or the cloud
upsert_entity / delete_entity
Entity editing with automatic physical-name derivation
upsert_attribute / delete_attribute
Attribute editing โ PK rules and FK propagation handled automatically
upsert_relationship / delete_relationship
Relationship editing with automatic FK derivation
upsert_domain / delete_domain
Domain definition editing
upsert_dictionary_word / delete_dictionary_word
Glossary editing (standard-linked glossaries are protected)
Non-interactive login for CI and SSH sessions (no browser needed)
ERDMAKER_HOME
Override the credentials directory (default ~/.erdmaker)
ERDMAKER_SUPABASE_URL
Override the API URL (defaults to the Sqemo cloud)
ERDMAKER_SUPABASE_ANON_KEY
Override the API publishable key
ERDMAKER_MAX_REQUESTS_PER_MINUTE
Per-minute request cap (default 120, 0 disables)
ERDMAKER_MAX_REQUESTS_PER_DAY
Daily request cap (default 10000, 0 disables)
The request caps are a safety net against agents stuck in loops; exceeding them
returns a rate_limited error that tells the agent to stop and notify the user.
Errors
All tool errors return { code, message } โ e.g. not_authenticated, no_permission,
save_conflict (retry after re-reading), validation_failed, rate_limited.
Links
Sqemo โ team naming standards + ERD design in the browser