schema-viz
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@schema-viz show my database schema as an ER diagram"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
schema-viz MCP server
A local MCP server that renders a database schema as an interactive, dbdiagram.io-style ER diagram in your browser: draggable table cards, color-coded headers, PK/FK/unique badges, relationship lines, pan, and zoom. No internet, no account — it runs entirely on this machine.
How it works
You give it DBML (the same syntax as dbdiagram.io) — either inline text or a path to a
.dbmlfile. With no input it shows the bundledschema.dbml(the LLM-Tinder schema).It parses the DBML (small dependency-free parser in
lib/parseDbml.js), renders a self-contained HTML page, serves it from a local HTTP server (http://127.0.0.1:4477), and opens your browser.Call it again with an updated schema and the open tab auto-reloads.
Related MCP server: erdlens
Tools
Tool | What it does |
| Render & open a schema. Args: |
| Report whether the viewer is running and its URL. |
Register with Claude Code
A project-scoped .mcp.json is already created at the repo root pointing at
schema-mcp/index.js. Restart Claude Code (or approve the server when prompted)
and the schema-viz tools become available. Verify with /mcp.
To register it globally instead:
claude mcp add schema-viz -- node "$(pwd)/schema-mcp/index.js"Try it without MCP
cd schema-mcp
npm install
npm run demo # parses schema.dbml, serves it, opens the browserDiagram controls
Drag a table header to move it; relationship lines follow.
Drag the background to pan; scroll to zoom (or use the toolbar
+ / −).Auto-arrange re-packs the tables; Reset restores the default view.
Config
Port: set
SCHEMA_VIZ_PORT(default4477).
Slash commands (bonus)
commands/ holds the versioned source for the companion Claude Code slash commands:
schema.md→/schema— render the current project's.dbmlas the interactive diagram.xray.md→/xray— explain any project (structure, stack, backend, live runtime) and feed the visualizer's Infrastructure / How-it-was-built tabs viadisplay_schema'scontextarg.
These must live in ~/.claude/commands/ to work — this folder is the backup / source of truth.
Install with: cp commands/*.md ~/.claude/commands/
Tabbed dashboard (optional)
Pass a context object to display_schema to turn the diagram into a multi-tab dashboard:
Schema — the ER diagram (always present).
Infrastructure — cards of
{ title, rows: [[label, value]] }: database, auth, hosting, env var names (never values), MCPs. Reproducible from a project's files.How it was built —
buildSteps: [{ phase, items: [{ what, why }] }], a step-by-step story.
With no context, only the Schema tab shows (backward compatible). The /xray command assembles
this context automatically from the project.
Available Tools
2 toolsdisplay_schemaA
Render a database schema as an interactive, dbdiagram.io-style ER diagram (draggable table cards, relationship lines, pan/zoom) in the local browser. Accepts DBML text via dbml, or a path to a .dbml file via filePath. With neither, it shows the bundled project schema. The browser view live-reloads when you call this again with an updated schema.
Inputs: dbml, open, title, context, +1 more.
get_schema_viewer_statusA
Return whether the schema viewer server is running and its URL.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely separate concerns: one checks server status, the other renders a schema. There is no overlap or ambiguity in their purposes.
Both tool names follow a clear verb_noun snake_case pattern: get_schema_viewer_status and display_schema. The naming is consistent and predictable.
Two tools is borderline thin for a server, though each serves a clear purpose. The scope is narrow, but a stop-viewer or close-browser tool would make the set feel more complete.
The core workflow of rendering a schema and checking viewer status is covered. The lack of a way to close or stop the viewer is a minor gap that agents can work around by simply refreshing or leaving the browser tab.
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Repository knowledge graph MCP server for codebase understanding and debugging.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
The AI that understands raw data: Schema over your tables and databases, as MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that generates Mermaid diagrams with live browser preview, supports real-time rendering and SVG/PNG export.13-
- AlicenseAqualityCmaintenanceMCP server that reads your database schema from SQL DDL, Prisma, Drizzle, TypeORM, or SQLAlchemy, generates a Mermaid ER diagram, and writes it into your documentation, with drift detection to keep diagrams up-to-date.51MIT
- FlicenseAqualityDmaintenanceA static, read-only MCP server that exposes a database knowledge base (schema, relationships, workflows, and reasoning patterns) so Claude Code / Copilot can reason about a database without a live connection.10-
- AlicenseBqualityCmaintenanceMCP server for Sqemo, a web-based ERD tool with team naming standards. 34 tools: read/edit entities, attributes, and relationships; generate physical names from a shared glossary and naming rules; SQL (7 dialects) and DBML import/export; ERD lint, diff, and ALTER generation.36MIT