AI Integration (MCP)

sqemo-mcp is a local MCP (Model Context Protocol) server that lets AI agents work with your ERDs: read and edit entities, attributes, and relationships; import and export SQL and DBML; generate and check physical names against your team standard; lint, auto-layout, and diff. It runs via npx — no separate install.

Requirements

Node.js 22 or later.

Client setup

Claude Code — add to .mcp.json at your project root:

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

Claude Desktop — add the same mcpServers entry to the config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Most other MCP clients (Cursor, etc.) use the same mcpServers JSON. Codex CLI instead uses TOML in ~/.codex/config.toml.

Sign in for server ERDs

No login is needed for local .erd.json files — every file tool works offline. To read or edit ERDs saved on the Sqemo server, sign in once from a terminal:

npx sqemo-mcp login    # email + password → refresh token stored
npx sqemo-mcp logout   # remove stored credentials

Credentials are stored in ~/.erdmaker/credentials.json; your password itself is never stored.

CI without an agent

The package doubles as an offline CLI for pipelines:

# fail the build on naming-standard violations (exit code 1)
npx sqemo-mcp lint schema.erd.json

# export to SQL or DBML on stdout
npx sqemo-mcp export schema.erd.json --format sql --dialect postgres > schema.sql

GitHub Actions:

- run: npx sqemo-mcp lint schema.erd.json

What agents can do

A few of the tools: get_erd_overview, upsert_entity, upsert_attribute, upsert_relationship, import_sql, import_dbml, export_sql, export_dbml, generate_physical_name, check_naming, lint_erd, auto_layout, diff_erds, and dictionary-proposal tools for suggesting new glossary words to your team standard.