sqemo-mcp
sqemo-mcp is an MCP server that lets AI agents model, lint, and export database schemas governed by a team's naming standard.
Model ERDs – create/edit entities, attributes, relationships, domains, and glossary words (physical names auto-derived from word list + naming rules).
Query & inspect – list ERDs/workspaces/entities/relationships/domains, get entity/ERD details, search the team dictionary.
Naming governance – check/generate physical names, lint for drift/unregistered words/duplicates/referential integrity, propose new glossary words.
Export & diff – export SQL (7 dialects) or DBML, diff two ERD sources, generate migration (ALTER) scripts with rename preservation (Pro).
Live database tools (Pro) – introspect a live PostgreSQL/MySQL schema, check drift against the model (read-only, credentials stay local).
Import & create – create ERDs from scratch/SQL/DBML, fully replace existing ERDs via import_sql/import_dbml.
CLI for CI – offline lint/export commands that exit 1 on violations, plus drift checks against a database or dump.
Works local or cloud – local .erd.json files need no account; cloud ERDs/Pro tools require
login.
Allows importing a live MySQL schema into an ERD, checking a MySQL database for drift against the physical model, and importing/exporting MySQL DDL.
Allows importing a live PostgreSQL schema into an ERD, checking a PostgreSQL database for drift against the physical model, and importing/exporting PostgreSQL DDL.
Supports creating ERDs from SQLite DDL and exporting the physical model as SQLite CREATE TABLE SQL.
sqemo-mcp
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.
{ "mcpServers": { "sqemo": { "command": "npx", "args": ["-y", "sqemo-mcp"] } } }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:
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 writtenCNTS 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.

Full walkthrough with every tool call: Describe the work, get a governed schema.
Related MCP server: schema-viz
Overview
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.
npm:
sqemo-mcpOfficial MCP Registry:
io.github.sqemo/sqemoWeb app: app.sqemo.com
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.
Installation
Claude Code (.mcp.json)
{
"mcpServers": {
"sqemo": { "command": "npx", "args": ["-y", "sqemo-mcp"] }
}
}Claude Desktop
Add the same mcpServers entry to your config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"sqemo": { "command": "npx", "args": ["-y", "sqemo-mcp"] }
}
}Login (cloud ERDs and Pro tools)
npx sqemo-mcp login # pick Google, GitHub, or email + password
npx sqemo-mcp logout # removes stored credentialslogin 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:
--passwordforces the email + password path,--provider google|githubforces 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 loginThe browser paths need a browser on the same machine (the callback returns to
127.0.0.1). Over SSH or in CI, use--passwordor theSQEMO_EMAIL/SQEMO_PASSWORDenvironment variables.
What you can do
36 tools in total.
Read (17 tools)
Tool | Description |
| Cloud ERDs and workspaces you belong to (login required) |
| Name, dialect, entity/relationship/domain/glossary stats |
| Entity list and full detail (attributes, keys, logical/physical mapping) |
| Relationships with endpoints and cardinality |
| Domain definitions (also from workspace standard glossaries) |
| Search the team glossary (logical/physical words, abbreviations, synonyms) |
| Check a logical name against the team naming standard |
| Logical name → physical name via glossary + naming rules |
| CREATE TABLE SQL — mysql, postgres, cubrid, oracle, sqlserver, sqlite, h2 |
| DBML text |
| Structural validation and full lint (naming drift, referential integrity, duplicates) |
| Diff two sources (files, cloud ERDs, or raw SQL/DBML text) — dry-run before imports |
| Migration (ALTER) script from the physical diff against a baseline — renames stay renames via stable IDs, destructive changes come commented out (Pro) |
| 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 |
| Import a live PostgreSQL/MySQL schema into an existing ERD (Pro) |
| 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 |
| New ERD from scratch or from SQL/DBML text — to a file or the cloud |
| Entity editing with automatic physical-name derivation |
| Attribute editing — PK rules and FK propagation handled automatically |
| Relationship editing with automatic FK derivation |
| Domain definition editing |
| Glossary editing (standard-linked glossaries are protected) |
| Naming rule editing (delimiter, case, unknown-word handling) |
| Replace an ERD from parsed SQL/DBML (IDs preserved) |
| Automatic entity/table layout (dagre) |
| Propose new glossary words for owner approval |
Cloud writes require owner or shared-editor permission and are protected by version CAS with 3-way auto-merge for concurrent edits.
CLI for CI pipelines
Offline, file-based subcommands (no login needed):
# Naming-standard check — exits 1 on violations, great as a CI gate
npx sqemo-mcp lint schema.erd.json
# Schema export to stdout
npx sqemo-mcp export schema.erd.json --format sql --dialect postgres > schema.sql
npx sqemo-mcp export schema.erd.json --format dbml > schema.dbmlDrift mode compares the model against a real database or a dump, and exits 1 when they disagree (Pro, requires login):
npx sqemo-mcp lint schema.erd.json --db "$DATABASE_URL" [--db-schema public] [--strict]
npx sqemo-mcp lint schema.erd.json --schema dump.sql --dialect postgres
npx sqemo-mcp lint --erd <cloud-erd-id> --db "$DATABASE_URL" --ignore 'tmp_*'GitHub Actions example:
- run: npx sqemo-mcp lint schema.erd.json
- run: npx sqemo-mcp lint schema.erd.json --db "${{ secrets.DATABASE_URL }}"Environment variables
Variable | Purpose |
| Non-interactive login for CI and SSH sessions (no browser needed) |
| Override the credentials directory (default |
| Override the API URL (defaults to the Sqemo cloud) |
| Override the API publishable key |
| Per-minute request cap (default |
| Daily request cap (default |
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
Live database guide — drift checks in CI, step by step
Plans — which tools need Pro
Feedback and bug reports: issues or hello@sqemo.com
License
Available Tools
36 toolsauto_layoutA
Auto-arranges entities by relationships (dagre LR). v5 has a single shared layout (no separate logical/physical placement — the removed view parameter had no other effect). Reference copies, notes, and relationship waypoints are not moved.
Inputs: source (required).
check_db_driftA
Checks whether a live database (url) or a schema dump (schemaSql) has drifted from the ERD's physical model. Errors: missing/extra tables and columns, PK/FK/NOT NULL mismatches. Warnings (strict promotes to errors): type/unique/auto-increment representation differences. Read-only; the database URL never leaves this process. Pro plan required; requires login.
Inputs: source (required), url, ignore, strict, +3 more.
check_namingA
Checks a logical name against the team naming standard (word list + rules). With physicalName, compares it to the generated name (providedMatches). With a {workspaceId} source, reads the latest workspace-standard master.
Inputs: source (required), logicalName (required), physicalName.
create_erdA
Creates a new ERD — empty or from SQL/DBML text. With a {file} target it saves locally; with {server:true} it saves to the server (login required). Pass workspaceId to bind it to that workspace's naming standard from the start.
Inputs: target (required), sql, dbml, name, +2 more.
delete_attributeC
Deletes an attribute.
Inputs: source (required), entityId (required), attributeId (required).
delete_dictionary_wordA
Deletes a glossary entry. Standard-linked (glossaryLink) dictionaries are rejected with dictionary_is_linked.
Inputs: source (required), entryId (required).
delete_domainA
Deletes a domain (attributes referencing it are unlinked).
Inputs: source (required), domainId (required).
delete_entityB
Deletes an entity (including its relationships).
Inputs: source (required), entityId (required).
delete_relationshipB
Deletes a relationship (including derived FKs).
Inputs: source (required), relationshipId (required).
diff_erdsA
Compares two ERD sources (entities/attributes/domains/relationships — unchanged omitted). A dry run before full-replace import_sql/import_dbml. A side freshly parsed from text has different ids, so most items appear as added/removed — matching the actual import behavior (full replace). summary aggregates entities only; see the arrays for domain/relationship changes.
Inputs: after (required), before (required).
export_alter_sqlA
Generates a migration (ALTER) script from the physical diff between a baseline and the current model — renames stay renames (stable-id matching), destructive changes come commented out, unsupported changes are flagged as [WARNING] comments. Baselines from the same project lineage ({file}/{erdId}) preserve renames; freshly parsed SQL/DBML text falls back to name matching. Pro plan required; requires login.
Inputs: after (required), before (required), dialect.
export_dbmlB
Exports the project as DBML text.
Inputs: source (required).
export_sqlA
Exports the physical model as CREATE TABLE SQL. Without dialect, uses the project dialect.
Inputs: source (required), dialect.
generate_physical_nameA
Generates a physical name from a logical name via the word list and naming rules (unregistered words go to warnings). With a {workspaceId} source, reads the latest workspace-standard master.
Inputs: source (required), logicalName (required).
get_entityA
Entity detail (attributes and physical mapping). Prefers entityId; otherwise exact logicalName match (first hit on duplicates).
Inputs: source (required), entityId, logicalName.
get_erd_overviewA
Returns an ERD summary (entity/relationship/domain/word-list stats, standard link status).
Inputs: source (required).
import_dbmlA
Fully replaces an existing ERD with the DBML parse result (project id preserved, dialect fixed to mysql). Rejected as invalid_source when no tables are found.
Inputs: dbml (required), source (required).
import_sqlA
Fully replaces an existing ERD with the SQL parse result (project id preserved). Rejected as invalid_source when no tables are found.
Inputs: sql (required), source (required), dialect.
introspect_dbA
Imports the schema of a live PostgreSQL/MySQL database into an existing ERD (full replace, project id preserved). Read-only — queries only the information schema/catalog; never reads table data. The database URL is used by this local process only and is never sent to Sqemo servers. Pro plan required; requires login.
Inputs: url (required), source (required), dbSchema.
lint_erdA
Lints the whole project — structure (PKs, attributes, descriptions, domains), referential integrity, duplicate physical names (including names that differ only by case, which collide on case-insensitive databases), duplicate logical entity names, identifier length limits (dialect-aware, tables/columns/indexes/FK constraints), auto-increment on non-integer column types (dialect-aware), and the naming standard (unregistered words, physical-name drift) in one pass. Quality/standards oriented, unlike validate_erd (structural validity).
Inputs: source (required).
list_domainsA
Lists domain definitions (name, data type). With a {workspaceId} source, reads the latest workspace-standard master.
Inputs: source (required).
list_entitiesB
Lists entities (logical name, physical name, attribute count).
Inputs: source (required).
list_erdsA
Lists server ERDs (owned/shared). Owner and shared editors can both write. Requires login — npx sqemo-mcp login.
Inputs: no named parameters.
list_proposalsA
Lists the workspace-standard proposal queue (word/domain, newest first, mine = my proposals). Filterable by status. Requires login.
Inputs: source (required), status.
list_relationshipsA
Lists relationships (endpoint entity names, cardinality, identifying flag).
Inputs: source (required).
list_workspacesA
Lists my workspaces (owner first) and whether a standard (word list + naming rules) exists. Requires login.
Inputs: no named parameters.
propose_dictionary_wordA
Proposes a new word for the workspace standard's word list (the owner approves/rejects in the web app). source is {workspaceId} or a standard-linked ERD ({file}/{erdId}, resolved via glossaryLink). Registered words return already_exists; a pending duplicate returns already_proposed. Requires login.
Inputs: source (required), logicalWord (required), physicalWord (required), note, +3 more.
search_dictionaryA
Partial-match word-list search across logical/physical/abbreviation/English/synonyms (case-insensitive, max 50). With a {workspaceId} source, reads the latest workspace-standard master.
Inputs: query (required), source (required).
update_naming_rulesA
Partially updates the naming rules (delimiter, case, unknown-word handling, self-reference role prefix). Existing physical names are not regenerated retroactively (noted in warnings) — set the rules before modelling.
Inputs: source (required), casing, separator, unknownWordMode, +1 more.
upsert_attributeA
Creates an attribute (no attributeId, logicalName required) or updates one (attributeId given, only provided fields change). primaryKey=true forces nullable=false and propagates child FKs. With a domain, the domain decides the data type. autoIncrement marks the column as identity — exported as AUTO_INCREMENT (mysql/cubrid/h2), IDENTITY(1,1) (sqlserver), or GENERATED BY DEFAULT AS IDENTITY (postgres/oracle); it applies to primary keys only.
Inputs: source (required), entityId (required), domain, unique, +7 more.
upsert_dictionary_wordA
Adds a glossary entry (upsert by logicalWord) or updates one (entryId given). Physical words are normalized to uppercase. Standard-linked (glossaryLink) dictionaries are rejected with dictionary_is_linked.
Inputs: source (required), logicalWord (required), physicalWord (required), entryId, +3 more.
upsert_domainA
Creates a domain (upsert by name) or updates one (domainId given). Existing description preserved when omitted.
Inputs: name (required), source (required), dataType (required), domainId, +1 more.
upsert_entityA
Creates an entity (no entityId, logicalName required) or updates one (entityId given, only provided fields change). The physical name is derived automatically.
Inputs: source (required), entityId, description, logicalName.
upsert_relationshipA
Creates a relationship (no relationshipId, source/targetEntityId required — FKs derived automatically) or updates one (relationshipId given). On update, sourceEnd/targetEnd take precedence; otherwise ends are re-derived from cardinality. onDelete/onUpdate set the FK referential actions ('noAction' reverts to the DB default); constraintName sets the FK constraint name (empty string reverts to auto-generation).
Inputs: source (required), onDelete, onUpdate, sourceEnd, +7 more.
validate_erdB
Validates project structure and referential integrity ({ valid, errors }).
Inputs: source (required).
withdraw_proposalA
Withdraws your own pending proposal. Proposals by others or already processed return not_found. Requires login.
Inputs: proposalId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 36 tools
All 36 tools target distinct resource-action pairs: list/get/upsert/delete for specific entity types, plus specialized operations like validate, lint, diff, import, and export. Related tools like validate_erd and lint_erd are clearly differentiated by structural vs quality focus, so there is no confusion.
Every tool name follows a consistent lowercase_snake_case verb_noun pattern (e.g., list_entities, upsert_attribute, export_sql, check_naming). The only slight deviation is 'auto_layout', but it still fits the overall convention, so naming is highly predictable.
With 36 tools, this server is well above the 25-tool threshold that typically indicates an excessive number for an MCP server. Although each tool has a clear role, the breadth makes the surface heavy and potentially overwhelming for agents.
The core lifecycle is well covered for entities, attributes, relationships, domains, and dictionary words, including create, read, update, and delete. However, there is no tool to delete an ERD itself, and ERD-level metadata updates are missing, which are notable gaps in a modeling tool.
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
19 Data/API/Code MCP tools: OpenAPI, GraphQL, cURL, SQL/ER, JSON-TS/Path/Diff, YAML, SemVer.
191MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
The AI that understands raw data: Schema over your tables and databases, as MCP tools.
Related MCP Servers
- AlicenseAqualityBmaintenanceSQL Server MCP server with AST-based query validation, read-only safety, schema exploration, ER diagram generation, and DBA toolkit integration (First Responder Kit, DarlingData, sp_WhoIsActive).128MIT
- FlicenseAqualityDmaintenanceA local MCP server that renders a database schema as an interactive, dbdiagram.io-style ER diagram in your browser.2-
- AlicenseNot gradedqualityBmaintenanceAn MCP server for AI assistants to programmatically create and manage Entity-Relationship Diagrams in StarUML, including full CRUD operations and PostgreSQL DDL generation.MIT
- AlicenseAqualityCmaintenanceMCP server that reads your database schema from SQL DDL, Prisma, Drizzle, TypeORM, or SQLAlchemy, generates a Mermaid ER diagram, and writes it into your documentation, with drift detection to keep diagrams up-to-date.51MIT