SchemaSketch MCP Server
This server lets AI agents read and edit your SchemaSketch database diagrams and convert them to and from various schema formats.
Read the DBML syntax guide, list diagrams, and fetch a diagram's DBML source and table positions
Validate DBML syntax and semantic warnings before saving (read-only, never touches the server)
Create, update (with optional renames and optimistic version checks), and permanently delete diagrams
Export diagrams or raw DBML to SQL DDL (PostgreSQL, MySQL, SQL Server, Oracle), Laravel migrations, Laravel Eloquent models (Laravel 10 or 11+), Mermaid, and PlantUML
Import SQL DDL, Mermaid, or PlantUML into DBML (read-only; save separately with create/update)
Converts SchemaSketch diagrams or raw DBML into Laravel migration files and Eloquent models, including fillable fields, casts, and relationships for Laravel 10 or 11+.
Exports SchemaSketch diagrams or DBML to Mermaid erDiagram syntax and imports Mermaid erDiagram syntax back into DBML.
Exports SchemaSketch diagrams or raw DBML as MySQL SQL DDL.
Exports SchemaSketch diagrams or raw DBML as PostgreSQL SQL DDL.
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., "@SchemaSketch MCP Server Convert my ecommerce diagram to Laravel migrations and Eloquent models"
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.
SchemaSketch MCP server
Lets AI agents (Claude, Cursor, Windsurf, Gemini and any other MCP client) read and edit your SchemaSketch database diagrams: list them, read and write DBML, validate it, and convert to and from SQL, Laravel migrations and Eloquent models, Mermaid and PlantUML.
1. Get a token
Sign in at schemasketch.dev/app (free), click Connect AI agent, and generate a token. Choose Read & edit, or Read-only if the agent should only look; read-only tokens hide the tools that change diagrams.
Related MCP server: liz-whiteboard-mcp
2. Connect your agent
Run it locally (npm)
Needs Node 18 or newer. Add this to your MCP client's config:
{
"mcpServers": {
"schemasketch": {
"command": "npx",
"args": ["-y", "schemasketch-mcp-server"],
"env": { "SCHEMASKETCH_TOKEN": "your-token" }
}
}
}Instead of a token you can set SCHEMASKETCH_EMAIL and SCHEMASKETCH_PASSWORD; the
server then logs in by itself. A token is safer, since it can be read-only, expires, and
can be revoked without changing your password.
Or use the hosted server (no install)
Clients that support remote MCP servers with a custom header can connect directly:
{
"mcpServers": {
"schemasketch": {
"url": "https://mcp.schemasketch.dev/mcp",
"headers": { "Authorization": "Bearer your-token" }
}
}
}In Claude Code: claude mcp add --transport http schemasketch https://mcp.schemasketch.dev/mcp --header "Authorization: Bearer your-token"
Claude Desktop
Download schemasketch.mcpb and drag it onto Claude Desktop; it asks for your token.
Tools
The same 15 tools in every setup:
Tool | Does |
| Returns the DBML syntax reference. Call it before writing or editing DBML. |
| Lists your saved diagrams. |
| Fetches one diagram's DBML source and positions. |
| Parses DBML and reports syntax errors and warnings, without saving. |
| Creates a diagram. |
| Replaces a diagram's DBML and/or renames it. |
| Permanently deletes a diagram. |
| SQL DDL (PostgreSQL, MySQL, SQL Server, Oracle) for a diagram or raw DBML. |
| Laravel migration files for a diagram or raw DBML. |
| Laravel Eloquent models (fillable, casts, relationships) for Laravel 10 or 11+. |
| Mermaid |
| PlantUML entity syntax. |
| Converts SQL DDL into DBML (save it with |
| Converts Mermaid |
| Converts PlantUML entity syntax into DBML. |
Good to know
The hosted server allows 60 requests a minute per token. Going over returns
429withretry_afterin seconds.An invalid or expired token returns a message telling you to create a new one.
Agents work better with the SchemaSketch skill installed:
npx skills add SchemaSketch-dev/schemasketch-skills(more install options).
Full documentation: schemasketch.dev/docs
Source and issues
Source: github.com/SchemaSketch-dev/schemasketch-mcp-server. Report problems in its issues or at hello@schemasketch.dev. Changes are listed in CHANGELOG.md.
License
MIT
Available Tools
15 toolscreate_diagramAInspect
Create a new diagram. The DBML is validated first: syntax errors or relationships to missing tables/columns mean nothing is saved; warnings are returned with the result.
Inputs: name (required), dbml_source.
delete_diagramADestructiveIdempotentInspect
Permanently delete a diagram. This cannot be undone — confirm with the user before calling it.
Inputs: diagram_id (required).
export_laravel_migrationsBRead-onlyInspect
Generate Laravel migration files (one per table, plus a foreign-keys migration) for a diagram.
Inputs: diagram_id, dbml_source.
export_laravel_modelsBRead-onlyInspect
Generate Laravel Eloquent model files (fillable, casts, and inferred relationships including belongsToMany through plain pivot tables) for a diagram.
Inputs: diagram_id, dbml_source, laravel_version.
export_mermaidBRead-onlyInspect
Generate Mermaid erDiagram syntax for a diagram.
Inputs: diagram_id, dbml_source.
export_plantumlCRead-onlyInspect
Generate PlantUML entity syntax for a diagram.
Inputs: diagram_id, dbml_source.
export_sqlBRead-onlyInspect
Generate CREATE TABLE / ALTER TABLE SQL DDL for a diagram, in a given dialect.
Inputs: dialect, diagram_id, dbml_source.
get_dbml_syntax_guideARead-onlyInspect
Read this before writing or editing any DBML — the exact syntax SchemaSketch accepts, with a full example.
Inputs: no named parameters.
get_diagramARead-onlyInspect
Fetch one diagram by id, including its full DBML source and table positions.
Inputs: diagram_id (required).
import_mermaidARead-onlyInspect
Convert Mermaid erDiagram syntax into DBML text. Read-only — never touches the server; pass the result to create_diagram or update_diagram to actually save it.
Inputs: mermaid (required).
import_plantumlARead-onlyInspect
Convert PlantUML entity syntax into DBML text. Read-only — never touches the server; pass the result to create_diagram or update_diagram to actually save it.
Inputs: plantuml (required).
import_sqlARead-onlyInspect
Convert CREATE TABLE / ALTER TABLE SQL DDL into DBML text. Read-only — never touches the server; pass the result to create_diagram or update_diagram to actually save it.
Inputs: sql (required).
list_diagramsARead-onlyInspect
List the signed-in user's saved diagrams (id, name, last updated).
Inputs: no named parameters.
update_diagramADestructiveIdempotentInspect
Replace a diagram's DBML source (and/or rename it). This overwrites the whole source — fetch it with get_diagram first if you need to edit rather than replace it outright, and pass its version as base_version so you never overwrite someone else's newer change. New DBML is validated first: errors mean nothing is saved; warnings are returned with the result.
Inputs: diagram_id (required), name, renames, dbml_source, +1 more.
validate_dbmlARead-onlyInspect
Parse DBML and report syntax errors plus semantic warnings (duplicate names, dangling refs, unrecognized/mismatched types) before saving it. Read-only — never touches the server.
Inputs: dbml_source (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool has a clearly distinct resource+action: CRUD on diagrams (list/get/create/update/delete), read-only converters (import_sql/import_mermaid/import_plantuml), generators (export_* per format), plus validate_dbml and get_dbml_syntax_guide. The import/export prefixes make directionality explicit, so import_plantuml vs export_plantuml cannot be confused. The descriptions actively reinforce the read-only vs persisted-write boundary.
Uniform snake_case verb_noun pattern throughout: list/get/create/update/delete_diagram, import_*/export_*, validate_dbml. The only mild irregularity is get_dbml_syntax_guide being longer, but it still follows verb_noun and reads clearly.
Fifteen tools for a diagram editor with multi-format import/export is well-scoped: 5 CRUD, 3 imports, 5 exports, plus validation and a syntax guide. Each tool maps to a distinct format or lifecycle operation rather than duplicating another.
Core lifecycle is fully covered: list/get/create/update/delete, validation, syntax help, three import formats and five export formats. Minor gaps exist such as no duplicate/rename-only helper (rename is folded into update_diagram) and no per-table or partial-edit operation, forcing whole-source replacement, but these are workable.
Maintenance
Related MCP Connectors
Read and edit DB Planner database schemas, diagrams and board layouts as an AI agent.
Generate, edit, and export data-architecture diagrams from your AI. Column lineage, PNG in chat.
Software diagrams for developers, teams and agents — give your AI agents diagramming superpowers.
Create, edit and organize hand-drawn diagrams (flowcharts, ER, architecture) from any AI agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate UML diagrams from text descriptions using PlantUML, supporting multiple output formats (PNG, SVG, PDF), syntax validation, and diagram source extraction.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read and edit entity-relationship diagrams and SQL database schemas on the liz-whiteboard collaborative whiteboard through natural language, supporting table, column, and relationship management.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, update, and delete Draw.io diagrams, allowing automated generation of architectural diagrams, flowcharts, and visual documentation.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to format SQL, explain queries in plain English, analyze schemas, build queries from natural language, and generate migrations, all without requiring a database connection.550 npmMIT