DBML for AI agents
Build, validate, review and convert database schemas written in DBML. One HTTP API, an MCP server at /mcp and a CLI, so an agent can model a schema, get errors with line and column, fix what the review finds, and ship SQL for Postgres, MySQL, SQL Server or Oracle. Free, no account.
Validate + parse
Syntax and semantic errors with line/column, or a JSON model of every table, column, index, ref and enum.
Review
18 deterministic checks: missing primary keys, unindexed and nullable foreign keys, type mismatches, naming drift, reserved words and more. Score 0-100.
Convert
DBML to postgres, mysql, mssql, oracle DDL. SQL (postgres, mysql, mssql, oracle, snowflake, schemarb) back to DBML.
MCP
Streamable HTTP at https://dbml.db.pit.world/mcp: 9 tools, same answers as the API.
Playground
Press Review.
Connect an agent
{
"mcpServers": {
"dbml": { "type": "http", "url": "https://dbml.db.pit.world/mcp" }
}
}
claude mcp add --transport http dbml https://dbml.db.pit.world/mcp
curl -s https://dbml.db.pit.world/api/v1/review -H 'content-type: application/json' \
-d '{"dbml":"Table users { id int [pk]\n email varchar }"}'
Full reference: docs · llms.txt · CLI npm i -g @profullstack/dbml