PlugWiki
erd-editor logo

ERD Editor MCP Server: Setup for Claude Code, Codex and Other Apps

OfficialLocal
Getnpm@dineug/erd-editor-mcpdineug/erd-editor

Lets Claude Code, Codex and other assistants design your database schema in ERD Editor, live in your editor or straight on disk.

ERD Editor is a diagram tool for VS Code, JetBrains IDEs, Obsidian and the browser. This is its own server, so your assistant can add tables and columns, link them, import SQL and read the schema back as SQL. If an editor has the diagram open, changes appear on the canvas. If not, they are written to the file.

It runs on your computer with no account. Ask the assistant to edit through the tools and not to rewrite the file itself.

Good for

  • Developers who design schemas and want an assistant to draw them
  • Teams who keep ERD files in their repo and want them updated with code
  • VS Code, JetBrains or Obsidian users who already use ERD Editor

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install erd-editor MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the erd-editor MCP server to Claude Code. Run this command:
    
    claude mcp add --transport stdio erd-editor -- npx -y @dineug/erd-editor-mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js 22.12+, Node.js.

Read-only mode: There is no read-only mode. Keep the diagram file in version control.

Start the server in your project folder, because it resolves relative diagram paths against its working directory. Keep ERD Editor and the server updated together: if their protocols differ, the server refuses to connect and says which to update. The README shows commands for Claude Code and Codex; other client configs here are adapted from the package name and are generated. The claude mcp add command is copied from the package README; the .mcp.json block is adapted from it and generated.

From the project README. Source.

Tools

  • Lists the diagrams the agent can reach

    Shows which ERD documents are open in a connected editor or found on disk.

    Try: “Which ERD diagrams are open?”

    Files · erd_list_documents

  • Opens a diagram, or creates a new one

    Opens a document by path. With create set, it makes a missing file and adds .erd.json to a name with no extension.

    Try: “Create a new diagram called shop.”

    Write · erd_open_document

  • Lists tables, groups, memos and dictionary rows

    Pages through the diagram's tables by ID, 100 at a time, then groups, memos and dictionary rows, and can find tables by name or comment.

    Try: “Find tables with 'order' in the name.”

    Read · erd_list

  • Reads tables or other items by ID or name

    Returns the full details of the tables or entities you name, and lists any it had no room for.

    Try: “Show the users table.”

    Read · erd_get

  • Reads the whole diagram as SQL, JSON or a snapshot

    Returns the document as a snapshot, SQL for one of eight databases, JSON or its scripts, or the DDL of just the tables you name. Reads stop at 40,000 characters.

    Try: “Show the PostgreSQL DDL for the orders table.”

    Read · erd_read

  • Lists naming problems the dictionaries find

    Reports forbidden words, unknown words, synonyms, duplicate names and type mismatches, with what to use instead.

    Try: “Check my column names against the dictionary.”

    Read · erd_list_checks

  • Saves the open diagram

    Saves the diagram when the connected editor, such as VS Code, keeps edits unsaved until saved.

    Try: “Save the diagram.”

    Write · erd_save

  • Undoes the agent's last edit

    Reverts the agent's most recent edit, or a whole batch at once, and leaves your own edits alone.

    Try: “Undo that last change.”

    Write · erd_undo

  • Redoes an undone edit

    Re-applies an edit that was just undone.

    Try: “Redo it.”

    Write · erd_redo

  • Adds a table

    Adds a new table to the diagram.

    Try: “Add a table named customers.”

    Write · erd_add_table

  • Removes a table

    Removes a table together with its relationships and indexes.

    Try: “Remove the old_logs table.”

    Delete · erd_remove_table

  • Renames a table

    Changes a table's physical name.

    Try: “Rename users to accounts.”

    Write · erd_change_table_name

Read from the source code

Permissions

high risk · 4 things to watch

High risk

The assistant can add, change and remove tables, columns and relationships in your diagram, and imports can replace the whole diagram. Keep the diagram file in version control and review changes before you save.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can remove tables and columns from your diagram file

    Tools such as erd_remove_table, erd_remove_columns and the import tools delete or replace parts of the diagram. erd_undo reverts the agent's own edits, so keep the file in git. npmjs.com

  • The imports replace the whole diagram by default

    The SQL, GraphQL, DBML, AML and JSON imports replace the current diagram unless you ask for append mode. Say 'append' in your prompt if you want to keep what is there. npmjs.com

  • Without an editor it writes straight to the file

    When no editor holds the diagram, edits are written to the .erd.json file on disk. Open the diagram in your editor to see changes live. npmjs.com

  • Edits in a closed JetBrains IDE can be overwritten

    The README says a JetBrains IDE does not reload an open diagram, so close it there before the agent edits the file. Obsidian prefers the agent's edit over an unsaved one. npmjs.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyNo read-only mode is documented. The read tools (list, get, read, list_checks) only read, but the edit tools are always on.
Sign-in and keysNo credentials. The server looks for running editors under ~/.erd-editor/ide/.

Questions

Is it official?

Yes. It is the ERD Editor project's own server, published from the same repository as the editor.

Is it free?

Yes. The server is MIT licensed and needs no account or API key.

What do I need to run it?

Node.js 22.12 or later. npx downloads the server the first time your assistant starts it, and you start it in your project folder because relative paths resolve there.

Does it work without VS Code or JetBrains open?

Yes. With no editor holding the diagram, it edits the file on disk instead. With an editor open, changes appear live.

Can it edit a database directly?

The README describes diagram editing, SQL import and SQL output. It does not mention connecting to a live database.

Can I undo what the agent did?

Yes, for its own edits through erd_undo, and one undo reverts a whole batch. In VS Code the change stays unsaved until you or Auto Save save it.

Which clients does it work in?

The README shows setup for Claude Code and Codex and says any MCP client can run it as a stdio server.

What databases can it write SQL for?

The README says reads can return SQL for any of eight databases.

Information

updated Nov 2, 2026

Publisher
Official
Package
@dineug/erd-editor-mcp
Registry
npm
Transport
stdio
Auth
None
Version
1.1.1
License
MIT
Last commit
Oct 30, 2026
Open issues
2

WebsiteGitHubnpmChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 3
  1. @dineug/erd-editor-mcp README · npmjs.com
  2. npm package metadata · registry.npmjs.org
  3. ERD Editor repository · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.