Sqemo

io.github.sqemo由 GitHub 帳號 sqemo 發布v2.8.3更新於 Oct 25, 2026

Design ERDs with your team's naming standards: query/edit entities and relationships, SQL/DBML

已驗證STDIO僅桌面資料庫開發者工具

概覽

AI 產生的概覽

Sqemo 是本地 MCP 伺服器,讓 AI 助理依團隊命名詞表設計 ERD 並產生資料庫實體名稱。

可以做什麼
讀取與檢視 ERD:列出實體、關聯、領域和詞表詞條,取得 ERD 概觀或搜尋團隊詞典。檢查與產生名稱:依命名規範驗證邏輯名稱,並依詞表推導實體名稱。匯出與比較:產生七種方言的 CREATE TABLE SQL 或 DBML,比較兩份 ERD,並產生 ALTER 遷移指令碼。編輯模型:建立 ERD,新增或刪除實體、屬性、關聯、領域、詞表詞條和命名規則。檢查線上資料庫:匯入 PostgreSQL 或 MySQL 結構並檢查與模型的落差,僅讀取 information schema。在 CI 中執行 CLI 的 lint 與匯出指令。
適用情境
適合團隊希望助理在維持資料庫命名一致的前提下設計或編輯 ERD,或在撰寫 DDL 前檢查命名落差與資料庫結構落差。也適合擁有共用詞表、並在 CI 中以命名規則作為把關條件的團隊。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js 22 或更新版本。本機 .erd.json 檔案不需帳號;雲端 ERD 和 Pro 工具需透過 CLI 登入,可用互動式 OAuth 或電子郵件加密碼,也可使用 SQEMO_EMAIL 和 SQEMO_PASSWORD 環境變數。線上資料庫工具需要連線 URL。
安裝前請注意
雲端和 Pro 功能需要登入,憑證檔會保存更新權杖,SQEMO_PASSWORD 可透過環境變數提供。寫入類工具會建立、取代和刪除 ERD、實體、屬性、關聯、領域和詞表詞條,雲端寫入需要擁有者或編輯者權限。依 README 說明,資料庫連線 URL 僅由本機程序使用。請求上限用於限制助理陷入迴圈。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Sqemo,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

sqemo-mcp

[npm version] [npm downloads] [MCP Registry] [Node] [License: MIT]

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.

json
{ "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:

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.

[Building a database schema with an AI agent — without naming a single column (3:25)]

Full walkthrough with every tool call: Describe the work, get a governed schema.

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.

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)

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.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Cursor (.cursor/mcp.json)

json
{  "mcpServers": {    "sqemo": { "command": "npx", "args": ["-y", "sqemo-mcp"] }  }}

Login (cloud ERDs and Pro tools)

bash
npx sqemo-mcp login    # pick Google, GitHub, or email + passwordnpx sqemo-mcp logout   # removes stored credentials

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)

ToolDescription
list_erds / list_workspacesCloud ERDs and workspaces you belong to (login required)
get_erd_overviewName, dialect, entity/relationship/domain/glossary stats
list_entities / get_entityEntity list and full detail (attributes, keys, logical/physical mapping)
list_relationshipsRelationships with endpoints and cardinality
list_domainsDomain definitions (also from workspace standard glossaries)
search_dictionarySearch the team glossary (logical/physical words, abbreviations, synonyms)
check_namingCheck a logical name against the team naming standard
generate_physical_nameLogical name → physical name via glossary + naming rules
export_sqlCREATE TABLE SQL — mysql, postgres, cubrid, oracle, sqlserver, sqlite, h2
export_dbmlDBML text
validate_erd / lint_erdStructural validation and full lint (naming drift, referential integrity, duplicates)
diff_erdsDiff two sources (files, cloud ERDs, or raw SQL/DBML text) — dry-run before imports
export_alter_sqlMigration (ALTER) script from the physical diff against a baseline — renames stay renames via stable IDs, destructive changes come commented out (Pro)
list_proposalsGlossary 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.

ToolDescription
introspect_dbImport a live PostgreSQL/MySQL schema into an existing ERD (Pro)
check_db_driftCheck 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)

ToolDescription
create_erdNew ERD from scratch or from SQL/DBML text — to a file or the cloud
upsert_entity / delete_entityEntity editing with automatic physical-name derivation
upsert_attribute / delete_attributeAttribute editing — PK rules and FK propagation handled automatically
upsert_relationship / delete_relationshipRelationship editing with automatic FK derivation
upsert_domain / delete_domainDomain definition editing
upsert_dictionary_word / delete_dictionary_wordGlossary editing (standard-linked glossaries are protected)
update_naming_rulesNaming rule editing (delimiter, case, unknown-word handling)
import_sql / import_dbmlReplace an ERD from parsed SQL/DBML (IDs preserved)
auto_layoutAutomatic entity/table layout (dagre)
propose_dictionary_word / withdraw_proposalPropose 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):

bash
# Naming-standard check — exits 1 on violations, great as a CI gatenpx sqemo-mcp lint schema.erd.json
# Schema export to stdoutnpx sqemo-mcp export schema.erd.json --format sql --dialect postgres > schema.sqlnpx sqemo-mcp export schema.erd.json --format dbml > schema.dbml

Drift mode compares the model against a real database or a dump, and exits 1 when they disagree (Pro, requires login):

bash
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 postgresnpx sqemo-mcp lint --erd <cloud-erd-id> --db "$DATABASE_URL" --ignore 'tmp_*'

GitHub Actions example:

yaml
- run: npx sqemo-mcp lint schema.erd.json- run: npx sqemo-mcp lint schema.erd.json --db "${{ secrets.DATABASE_URL }}"

Environment variables

VariablePurpose
SQEMO_EMAIL / SQEMO_PASSWORDNon-interactive login for CI and SSH sessions (no browser needed)
ERDMAKER_HOMEOverride the credentials directory (default ~/.erdmaker)
ERDMAKER_SUPABASE_URLOverride the API URL (defaults to the Sqemo cloud)
ERDMAKER_SUPABASE_ANON_KEYOverride the API publishable key
ERDMAKER_MAX_REQUESTS_PER_MINUTEPer-minute request cap (default 120, 0 disables)
ERDMAKER_MAX_REQUESTS_PER_DAYDaily 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

License

MIT

來源:README.md,提交 b08b386

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v2.8.3最新Oct 16, 2026
  2. v2.8.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分