API & MCP
Everything a person can do on Opsdeck Schema Diff & Migration Generator (PostgreSQL, MySQL, SQLite), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://opsdeckschemadiff.usefulweb.site/api/v1/calculate– run Opsdeck Schema Diff & Migration Generator (PostgreSQL, MySQL, SQLite)GET https://opsdeckschemadiff.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Opsdeck Schema Diff & Migration Generator (PostgreSQL, MySQL, SQLite)
Paste the current and the new CREATE TABLE / CREATE INDEX / ALTER TABLE statements: the tool reads both into a schema model, lists every change per table and writes an ordered migration script for PostgreSQL, MySQL/MariaDB or SQLite plus the reverse (rollback) script. Dropped tables and columns, narrowed types, new NOT NULL, unique, foreign-key and check constraints are flagged. Both scripts are verified by applying them to the model. It is the schema diff of the Opsdeck Database desk.
| Field | Type | Default | Description |
|---|---|---|---|
source | textarea | "-- Shop schema, version 1\nCREATE TABLE customers (\n id integer PRIMARY KEY,\ | Current schema (DDL). CREATE TABLE, CREATE INDEX and ALTER TABLE statements of the version that is deployed now. |
target | textarea | "-- Shop schema, version 2\nCREATE TABLE customers (\n id integer PRIMARY KEY,\ | New schema (DDL). The version you want to migrate to. |
dialect | select (postgresql, mysql, sqlite) | "postgresql" | SQL dialect |
renames | textarea | — | Rename hints (optional). A diff cannot tell a rename from drop + add. One hint per line keeps the data: table.old -> new for a column, old -> new for a table. |
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://opsdeckschemadiff.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
opsdeck_schema_diff - Local stdio connector:
node src/mcp-stdio.ts --tool=opsdeck-schema-diff
{
"mcpServers": {
"opsdeck-schema-diff": { "type": "http", "url": "https://opsdeckschemadiff.usefulweb.site/mcp" }
}
}