{
  "markdown": "# sqemo-mcp\n\n[![npm version](https://img.shields.io/npm/v/sqemo-mcp?color=2563eb)](https://www.npmjs.com/package/sqemo-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/sqemo-mcp?color=2563eb)](https://www.npmjs.com/package/sqemo-mcp)\n[![MCP Registry](https://img.shields.io/badge/MCP%20Registry-io.github.sqemo%2Fsqemo-2563eb)](https://registry.modelcontextprotocol.io/?search=sqemo)\n[![Node](https://img.shields.io/badge/node-%3E%3D22-339933)](#)\n[![License: MIT](https://img.shields.io/badge/license-MIT-lightgrey)](LICENSE)\n\n**MCP server for [Sqemo](https://sqemo.com)** — AI agents that follow your team's database naming standard.\n\nYour agent models in business terms (`\"Customer Number\"`); the column comes out as `cust_no`\nbecause *your* word list says `customer → cust`, `number → no` (case and delimiter are rules\ntoo, so `CUST_NO` is one setting away). Same input, same name, every\ntable, every agent. Overrides are allowed but flagged, and a CLI lint catches drift in CI.\n\n```json\n{ \"mcpServers\": { \"sqemo\": { \"command\": \"npx\", \"args\": [\"-y\", \"sqemo-mcp\"] } } }\n```\n\nWorks with Claude Code, Claude Desktop, Cursor, and any MCP client. Local `.erd.json` files\nneed no account; cloud ERDs and Pro tools need `npx sqemo-mcp login`.\n\n## What it looks like\n\n> *Model a discussion board where members post articles, a post can be a reply to another\n> post, and members comment on posts.*\n\nThe agent calls the tools with **logical** names and never types a column name:\n\n```jsonc\nupsert_entity    { logicalName: \"Post\" }\n// → { physicalName: \"POST\" }\n\nupsert_attribute { logicalName: \"Post Content\", domain: \"Content\" }\n// → { physicalName: \"POST_CNTS\" }          // Content → CNTS: from the team word list\n\nupsert_attribute { logicalName: \"Delete Flag\", domain: \"Flag\" }\n// → { physicalName: \"DELETE_YN\" }          // Flag → YN: same rule in every table\n\nlint_erd\n// → naming drift, missing words, referential integrity — before any DDL is written\n```\n\n`CNTS` and `YN` are not the agent's taste. They are your word list's abbreviations, applied the\nsame way they were applied in every other table your team has modelled. Domains carry the data\ntype, so `Content` is `varchar(1000)` everywhere it appears.\n\n[![Building a database schema with an AI agent — without naming a single column (3:25)](https://img.youtube.com/vi/MqHWtiHfBI0/maxresdefault.jpg)](https://youtu.be/MqHWtiHfBI0)\n\nFull walkthrough with every tool call: [Describe the work, get a governed schema](https://sqemo.com/docs/ai-walkthrough).\n\n## Overview\n\nAI agents can query and edit entities, relationships, and domains; generate physical names\nfrom a shared team glossary; import/export SQL (7 dialects) and DBML; and compare the model\nagainst a live database. Works with both local `.erd.json` files and ERDs stored on the\nSqemo cloud.\n\n- npm: [`sqemo-mcp`](https://www.npmjs.com/package/sqemo-mcp)\n- Official MCP Registry: `io.github.sqemo/sqemo`\n- Web app: [app.sqemo.com](https://app.sqemo.com)\n\n> Requires Node.js >= 22. Local-file tools work without any account or configuration.\n> Login is needed for cloud ERD tools, and for the tools marked (Pro) below.\n\n## Installation\n\n### Claude Code (`.mcp.json`)\n\n```json\n{\n  \"mcpServers\": {\n    \"sqemo\": { \"command\": \"npx\", \"args\": [\"-y\", \"sqemo-mcp\"] }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd the same `mcpServers` entry to your config file:\n\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n### Cursor (`.cursor/mcp.json`)\n\n```json\n{\n  \"mcpServers\": {\n    \"sqemo\": { \"command\": \"npx\", \"args\": [\"-y\", \"sqemo-mcp\"] }\n  }\n}\n```\n\n## Login (cloud ERDs and Pro tools)\n\n```bash\nnpx sqemo-mcp login    # pick Google, GitHub, or email + password\nnpx sqemo-mcp logout   # removes stored credentials\n```\n\n`login` asks how you want to sign in. Google and GitHub open a browser tab, complete a\nPKCE OAuth flow, and hand the session back through a one-shot loopback server on\n`127.0.0.1`; the third option takes an email and password in the terminal. Only a\nrefresh token is ever stored.\n\n- Credentials are stored in `~/.erdmaker/credentials.json` (mode 0600 on POSIX);\n  your password is never persisted.\n- **Non-interactive shortcuts:** `--password` forces the email + password path,\n  `--provider google|github` forces a browser path.\n- **Piped input skips the menu** and goes straight to email + password, so existing\n  automation keeps working: `printf 'email\\npassword\\n' | npx sqemo-mcp login`\n- The browser paths need a browser on the same machine (the callback returns to\n  `127.0.0.1`). Over SSH or in CI, use `--password` or the `SQEMO_EMAIL` /\n  `SQEMO_PASSWORD` environment variables.\n\n## What you can do\n\n36 tools in total.\n\n### Read (17 tools)\n\n| Tool | Description |\n|------|-------------|\n| `list_erds` / `list_workspaces` | Cloud ERDs and workspaces you belong to (login required) |\n| `get_erd_overview` | Name, dialect, entity/relationship/domain/glossary stats |\n| `list_entities` / `get_entity` | Entity list and full detail (attributes, keys, logical/physical mapping) |\n| `list_relationships` | Relationships with endpoints and cardinality |\n| `list_domains` | Domain definitions (also from workspace standard glossaries) |\n| `search_dictionary` | Search the team glossary (logical/physical words, abbreviations, synonyms) |\n| `check_naming` | Check a logical name against the team naming standard |\n| `generate_physical_name` | Logical name → physical name via glossary + naming rules |\n| `export_sql` | CREATE TABLE SQL — mysql, postgres, cubrid, oracle, sqlserver, sqlite, h2 |\n| `export_dbml` | DBML text |\n| `validate_erd` / `lint_erd` | Structural validation and full lint (naming drift, referential integrity, duplicates) |\n| `diff_erds` | Diff two sources (files, cloud ERDs, or raw SQL/DBML text) — dry-run before imports |\n| `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) |\n| `list_proposals` | Glossary proposal queue status (login required) |\n\n### Live database (2 tools)\n\nRead-only against your own database. Both query only the information schema —\nnever table data — and the connection URL is used by this local process only,\nnever sent to Sqemo servers.\n\n| Tool | Description |\n|------|-------------|\n| `introspect_db` | Import a live PostgreSQL/MySQL schema into an existing ERD (Pro) |\n| `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) |\n\n### Write (17 tools)\n\n| Tool | Description |\n|------|-------------|\n| `create_erd` | New ERD from scratch or from SQL/DBML text — to a file or the cloud |\n| `upsert_entity` / `delete_entity` | Entity editing with automatic physical-name derivation |\n| `upsert_attribute` / `delete_attribute` | Attribute editing — PK rules and FK propagation handled automatically |\n| `upsert_relationship` / `delete_relationship` | Relationship editing with automatic FK derivation |\n| `upsert_domain` / `delete_domain` | Domain definition editing |\n| `upsert_dictionary_word` / `delete_dictionary_word` | Glossary editing (standard-linked glossaries are protected) |\n| `update_naming_rules` | Naming rule editing (delimiter, case, unknown-word handling) |\n| `import_sql` / `import_dbml` | Replace an ERD from parsed SQL/DBML (IDs preserved) |\n| `auto_layout` | Automatic entity/table layout (dagre) |\n| `propose_dictionary_word` / `withdraw_proposal` | Propose new glossary words for owner approval |\n\nCloud writes require owner or shared-editor permission and are protected by\nversion CAS with 3-way auto-merge for concurrent edits.\n\n## CLI for CI pipelines\n\nOffline, file-based subcommands (no login needed):\n\n```bash\n# Naming-standard check — exits 1 on violations, great as a CI gate\nnpx sqemo-mcp lint schema.erd.json\n\n# Schema export to stdout\nnpx sqemo-mcp export schema.erd.json --format sql --dialect postgres > schema.sql\nnpx sqemo-mcp export schema.erd.json --format dbml > schema.dbml\n```\n\nDrift mode compares the model against a real database or a dump, and exits 1 when\nthey disagree (Pro, requires login):\n\n```bash\nnpx sqemo-mcp lint schema.erd.json --db \"$DATABASE_URL\" [--db-schema public] [--strict]\nnpx sqemo-mcp lint schema.erd.json --schema dump.sql --dialect postgres\nnpx sqemo-mcp lint --erd <cloud-erd-id> --db \"$DATABASE_URL\" --ignore 'tmp_*'\n```\n\nGitHub Actions example:\n\n```yaml\n- run: npx sqemo-mcp lint schema.erd.json\n- run: npx sqemo-mcp lint schema.erd.json --db \"${{ secrets.DATABASE_URL }}\"\n```\n\n## Environment variables\n\n| Variable | Purpose |\n|----------|---------|\n| `SQEMO_EMAIL` / `SQEMO_PASSWORD` | Non-interactive login for CI and SSH sessions (no browser needed) |\n| `ERDMAKER_HOME` | Override the credentials directory (default `~/.erdmaker`) |\n| `ERDMAKER_SUPABASE_URL` | Override the API URL (defaults to the Sqemo cloud) |\n| `ERDMAKER_SUPABASE_ANON_KEY` | Override the API publishable key |\n| `ERDMAKER_MAX_REQUESTS_PER_MINUTE` | Per-minute request cap (default `120`, `0` disables) |\n| `ERDMAKER_MAX_REQUESTS_PER_DAY` | Daily request cap (default `10000`, `0` disables) |\n\nThe request caps are a safety net against agents stuck in loops; exceeding them\nreturns a `rate_limited` error that tells the agent to stop and notify the user.\n\n## Errors\n\nAll tool errors return `{ code, message }` — e.g. `not_authenticated`, `no_permission`,\n`save_conflict` (retry after re-reading), `validation_failed`, `rate_limited`.\n\n## Links\n\n- [Sqemo](https://sqemo.com) — team naming standards + ERD design in the browser\n- [Live database guide](https://sqemo.com/docs/live-database) — drift checks in CI, step by step\n- [Plans](https://sqemo.com/pricing) — which tools need Pro\n- [sqemo-mcp on npm](https://www.npmjs.com/package/sqemo-mcp)\n- Feedback and bug reports: [issues](https://github.com/sqemo/sqemo-mcp/issues) or hello@sqemo.com\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 9991,
  "sha": "1e19e838d43cb041f0efb653b7c5d912c5a7ac4e6f5b938e5499cc563d8d41b0",
  "repo_slug": "sqemo/sqemo-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sqemo_sqemo_befeed7d/readme"
}