<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Donghyun Park</title>
    <description>The latest articles on DEV Community by Donghyun Park (@sqemo).</description>
    <link>https://dev.to/sqemo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4098182%2F634bba4c-b929-495e-a989-2ec0f7b472e5.png</url>
      <title>DEV Community: Donghyun Park</title>
      <link>https://dev.to/sqemo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sqemo"/>
    <language>en</language>
    <item>
      <title>An ERD MCP Server: AI Agents That Follow Your Naming Standard</title>
      <dc:creator>Donghyun Park</dc:creator>
      <pubDate>Fri, 28 Aug 2026 01:04:15 +0000</pubDate>
      <link>https://dev.to/sqemo/an-erd-mcp-server-ai-agents-that-follow-your-naming-standard-5dee</link>
      <guid>https://dev.to/sqemo/an-erd-mcp-server-ai-agents-that-follow-your-naming-standard-5dee</guid>
      <description>&lt;p&gt;AI agents already write database schemas. Ask Claude or Cursor for a feature and the migration file comes back with tables, columns, and foreign keys — named however the model's training data leans that day. &lt;code&gt;user_id&lt;/code&gt; here, &lt;code&gt;userId&lt;/code&gt; there, &lt;code&gt;usr_no&lt;/code&gt; when it read one too many legacy dumps. The agent isn't wrong; it just has no idea your team writes &lt;code&gt;cust_no&lt;/code&gt;, because your naming convention lives in a wiki the model has never seen.&lt;/p&gt;

&lt;p&gt;That's the actual problem an ERD MCP server solves. Not "AI can draw diagrams now" — but that schema work done by agents can follow the same standard as schema work done by people. This post explains what &lt;a href="https://www.npmjs.com/package/sqemo-mcp" rel="noopener noreferrer"&gt;sqemo-mcp&lt;/a&gt; does, how the naming part works, and — in the same honest-comparison spirit as our &lt;a href="https://sqemo.com/blog/dbdiagram-alternative" rel="noopener noreferrer"&gt;dbdiagram comparison&lt;/a&gt; — what it doesn't do yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an MCP server is, in one paragraph
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://modelcontextprotocol.io" rel="noopener noreferrer"&gt;MCP (Model Context Protocol)&lt;/a&gt; is the open standard for giving AI agents tools. A server exposes typed operations — "list entities," "add an attribute," "export SQL" — and any MCP-capable client (Claude Code, Claude Desktop, Cursor, Codex, and a growing list) can call them. Instead of the agent hallucinating your schema from half-remembered context, it reads the real one and edits it through operations that enforce your rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an agent can do with your ERD
&lt;/h2&gt;

&lt;p&gt;sqemo-mcp exposes 36 tools over your ERD files. Grouped by what they're for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read and edit the model.&lt;/strong&gt; &lt;code&gt;get_erd_overview&lt;/code&gt;, &lt;code&gt;get_entity&lt;/code&gt;, &lt;code&gt;upsert_entity&lt;/code&gt;, &lt;code&gt;upsert_attribute&lt;/code&gt;, &lt;code&gt;upsert_relationship&lt;/code&gt;, and their delete counterparts. The agent works on the same &lt;code&gt;.erd.json&lt;/code&gt; file you edit in the &lt;a href="https://app.sqemo.com" rel="noopener noreferrer"&gt;app&lt;/a&gt; — one source of truth, not a parallel copy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Import and export.&lt;/strong&gt; &lt;code&gt;import_sql&lt;/code&gt; and &lt;code&gt;export_sql&lt;/code&gt; in seven dialects (MySQL, PostgreSQL, Oracle, SQL Server, SQLite, H2, CUBRID), plus DBML both ways. Paste a raw &lt;code&gt;pg_dump -s&lt;/code&gt; or &lt;code&gt;mysqldump&lt;/code&gt; output and it parses. "Import this legacy dump and normalize the names against our word list" is a one-prompt task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate and check names.&lt;/strong&gt; &lt;code&gt;generate_physical_name&lt;/code&gt;, &lt;code&gt;check_naming&lt;/code&gt;, &lt;code&gt;search_dictionary&lt;/code&gt; — more on these below, because they're the point.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality and hygiene.&lt;/strong&gt; &lt;code&gt;lint_erd&lt;/code&gt;, &lt;code&gt;validate_erd&lt;/code&gt;, &lt;code&gt;diff_erds&lt;/code&gt;, &lt;code&gt;auto_layout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Propose, don't decree.&lt;/strong&gt; When the agent needs a word that isn't in the team word list, &lt;code&gt;propose_dictionary_word&lt;/code&gt; files a proposal into the team's &lt;a href="https://sqemo.com/docs/naming-standards" rel="noopener noreferrer"&gt;approval queue&lt;/a&gt; instead of silently inventing an abbreviation. A human approves it; then it's standard.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why the naming tools are the interesting part
&lt;/h2&gt;

&lt;p&gt;Most schema tools treat names as free text, so an agent's naming is only as good as its prompt. Sqemo treats the physical name as &lt;strong&gt;computed&lt;/strong&gt;: you register a word list (customer → &lt;code&gt;cust&lt;/code&gt;, number → &lt;code&gt;no&lt;/code&gt;) and naming rules once, and the physical column name is generated from the logical one — same input, same output, for humans and agents alike.&lt;/p&gt;

&lt;p&gt;That changes what the agent is asked to do. It doesn't guess that your team abbreviates "customer" as &lt;code&gt;cust&lt;/code&gt; — it says "Customer Number" and &lt;code&gt;generate_physical_name&lt;/code&gt; returns &lt;code&gt;cust_no&lt;/code&gt;, per your rules, deterministically. And because the correct name is computable, drift is detectable: &lt;code&gt;check_naming&lt;/code&gt; and &lt;code&gt;lint_erd&lt;/code&gt; flag any column that deviates from what the word list would generate. The agent's output is held to the same standard as a human's — mechanically, not by code-review vigilance. If you want the fuller argument for generating names from a word list, that's &lt;a href="https://sqemo.com/blog/database-naming-conventions" rel="noopener noreferrer"&gt;its own post&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Node.js 22+, no install — it runs via &lt;code&gt;npx&lt;/code&gt;. For Claude Code, add to &lt;code&gt;.mcp.json&lt;/code&gt; at your project root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"sqemo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sqemo-mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude Desktop and most other clients take the same &lt;code&gt;mcpServers&lt;/code&gt; JSON; the &lt;a href="https://sqemo.com/docs/mcp" rel="noopener noreferrer"&gt;docs page&lt;/a&gt; has per-client paths. Local &lt;code&gt;.erd.json&lt;/code&gt; files work fully offline with no account. To let an agent touch ERDs saved on the Sqemo server, sign in once with &lt;code&gt;npx sqemo-mcp login&lt;/code&gt; — credentials are stored locally, and your password itself never is.&lt;/p&gt;

&lt;h2&gt;
  
  
  The same enforcement, without an agent
&lt;/h2&gt;

&lt;p&gt;The package doubles as a plain CLI, which is how the standard reaches CI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx sqemo-mcp lint schema.erd.json   &lt;span class="c"&gt;# exit code 1 on naming violations&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put that in a GitHub Action and a pull request that drifts from the word list fails the build — the same check the agent runs interactively, enforced mechanically on every merge. There's also &lt;code&gt;export&lt;/code&gt; for generating SQL or DBML in a pipeline. If you're deciding what artifact should be the source of truth in the first place, we wrote about &lt;a href="https://sqemo.com/blog/dbml-vs-sql-ddl" rel="noopener noreferrer"&gt;DBML vs SQL DDL&lt;/a&gt; — the &lt;code&gt;.erd.json&lt;/code&gt; model sits a layer above both, and the CLI derives either from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do (yet)
&lt;/h2&gt;

&lt;p&gt;Honest limits, so you can decide with eyes open:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's a local stdio server, not a hosted one.&lt;/strong&gt; It runs on your machine via &lt;code&gt;npx&lt;/code&gt;. There's no remote HTTPS endpoint yet, so clients that only support hosted MCP servers can't connect — remote MCP is on our roadmap, not shipped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The server code is open, the app isn't.&lt;/strong&gt; The MCP server is on &lt;a href="https://www.npmjs.com/package/sqemo-mcp" rel="noopener noreferrer"&gt;npm&lt;/a&gt; and the &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;official MCP Registry&lt;/a&gt; (&lt;code&gt;io.github.sqemo/sqemo&lt;/code&gt;); the web app itself is not open source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three tools are paid.&lt;/strong&gt; &lt;code&gt;export_alter_sql&lt;/code&gt; (migration ALTER scripts from a baseline diff) and the two live-database tools, &lt;code&gt;introspect_db&lt;/code&gt; and &lt;code&gt;check_db_drift&lt;/code&gt; (checking the ERD against a real database), are Pro features ($9/mo). The other 33 tools, including everything above, work on the free plan.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where this fits
&lt;/h2&gt;

&lt;p&gt;If your schema work is entirely human and entirely solo, an MCP server is a nice-to-have. The moment either stops being true — an agent writes your migrations, or more than one person names columns — the question becomes how the standard gets enforced. Our answer: make the correct name computable, then let humans, CI, and agents all be checked against the same computation. &lt;a href="https://app.sqemo.com" rel="noopener noreferrer"&gt;Try it in the app&lt;/a&gt; (no signup), or point your agent at &lt;code&gt;npx sqemo-mcp&lt;/code&gt; and ask it to import your schema. If you'd rather see the whole thing end to end first, the &lt;a href="https://sqemo.com/docs/ai-walkthrough" rel="noopener noreferrer"&gt;walkthrough&lt;/a&gt; goes from an empty project to standards-compliant DDL — including the case most tools get wrong, a post that replies to another post. It's also a &lt;a href="https://youtu.be/MqHWtiHfBI0" rel="noopener noreferrer"&gt;three-and-a-half-minute video&lt;/a&gt;, if reading is not your thing today.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is an ERD MCP server?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An MCP (Model Context Protocol) server that exposes your entity-relationship diagram to AI agents as typed tools — list entities, add an attribute, import SQL, export DBML, check a name against the naming standard — so the agent reads and edits the real model instead of guessing the schema from context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which AI clients work with sqemo-mcp?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any MCP-capable client that supports local stdio servers: Claude Code, Claude Desktop, Codex CLI, Cursor, and others. It runs via npx (Node.js 22 or later) with a one-line mcpServers entry; no separate install.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the Sqemo MCP server free?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. 33 of its 36 tools, including import, export, naming generation, and lint, work on the free plan with no account for local .erd.json files. Three tools are Pro ($9/month): export_alter_sql, introspect_db, and check_db_drift.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it a hosted (remote) MCP server?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not yet. sqemo-mcp is a local stdio server that runs on your machine via npx. Clients that only support hosted HTTPS MCP endpoints can't connect today; remote MCP is on the roadmap.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://sqemo.com/blog/erd-mcp-server" rel="noopener noreferrer"&gt;sqemo.com&lt;/a&gt;. Sqemo is an ERD tool that enforces database naming conventions — free in the browser, no signup.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>database</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
