Skip to main content
Glama

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

get_dbml_syntax_guide

Returns the DBML syntax reference. Call it before writing or editing DBML.

list_diagrams

Lists your saved diagrams.

get_diagram

Fetches one diagram's DBML source and positions.

validate_dbml

Parses DBML and reports syntax errors and warnings, without saving.

create_diagram

Creates a diagram.

update_diagram

Replaces a diagram's DBML and/or renames it.

delete_diagram

Permanently deletes a diagram.

export_sql

SQL DDL (PostgreSQL, MySQL, SQL Server, Oracle) for a diagram or raw DBML.

export_laravel_migrations

Laravel migration files for a diagram or raw DBML.

export_laravel_models

Laravel Eloquent models (fillable, casts, relationships) for Laravel 10 or 11+.

export_mermaid

Mermaid erDiagram syntax.

export_plantuml

PlantUML entity syntax.

import_sql

Converts SQL DDL into DBML (save it with create_diagram / update_diagram).

import_mermaid

Converts Mermaid erDiagram syntax into DBML.

import_plantuml

Converts PlantUML entity syntax into DBML.

Good to know

  • The hosted server allows 60 requests a minute per token. Going over returns 429 with retry_after in 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 tools
create_diagramA

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_diagramA
DestructiveIdempotent

Permanently delete a diagram. This cannot be undone — confirm with the user before calling it.

Inputs: diagram_id (required).

export_laravel_migrationsB
Read-only

Generate Laravel migration files (one per table, plus a foreign-keys migration) for a diagram.

Inputs: diagram_id, dbml_source.

export_laravel_modelsB
Read-only

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_mermaidB
Read-only

Generate Mermaid erDiagram syntax for a diagram.

Inputs: diagram_id, dbml_source.

export_plantumlC
Read-only

Generate PlantUML entity syntax for a diagram.

Inputs: diagram_id, dbml_source.

export_sqlB
Read-only

Generate CREATE TABLE / ALTER TABLE SQL DDL for a diagram, in a given dialect.

Inputs: dialect, diagram_id, dbml_source.

get_dbml_syntax_guideA
Read-only

Read this before writing or editing any DBML — the exact syntax SchemaSketch accepts, with a full example.

Inputs: no named parameters.

get_diagramA
Read-only

Fetch one diagram by id, including its full DBML source and table positions.

Inputs: diagram_id (required).

import_mermaidA
Read-only

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_plantumlA
Read-only

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_sqlA
Read-only

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_diagramsA
Read-only

List the signed-in user's saved diagrams (id, name, last updated).

Inputs: no named parameters.

update_diagramA
DestructiveIdempotent

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_dbmlA
Read-only

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

    A3.8/5.0

    Scored across 15 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers