๐Ÿ Final Week โ€” Lifetime Pro $39 until July 10. Claim yours โ†’

๐Ÿค– Give your agent a schema diff tool

The SchemaLens MCP server exposes semantic schema diff, migration generation, and breaking-change detection as tools any MCP-compatible agent can call.

Generate MCP config โ†’ View source on GitHub

๐Ÿ” Autonomous Schema Review

Your agent can compare two CREATE TABLE dumps and return a structured summary of added, removed, and modified tables, columns, indexes, and constraints.

๐Ÿ›ก๏ธ Breaking-Change Gate

Agents flag risky changes before they ship: dropped columns, type changes, NOT NULL additions, dropped foreign keys, and removed indexes.

๐Ÿ“ Migration Generation

Generate forward and rollback migration scripts in PostgreSQL, MySQL, SQLite, SQL Server, or Oracle โ€” automatically, on demand.

๐Ÿ”’ Local & Private

The MCP server uses the same client-side engine as the web app. Schemas never leave the machine the agent is running on.

What an agent-powered migration review looks like

Drop the MCP server into your agent's config and ask it to review a migration PR.

You
Review this PR's schema change. Old schema is in migrations/001_initial.sql, new schema is in migrations/002_add_orders.sql. Tell me if it's safe to deploy.
Agent ยท calling schemalens_diff_schemas
I'll compare the two schemas and check for breaking changes.
Agent ยท result
Summary: 1 table added (orders), 1 column added (users.email_verified_at), 1 index added.

Risk score: 2/10 โ€” Low risk.
No dropped columns, no type changes, no removed constraints. The new orders table references users(id) with a foreign key and ON DELETE SET NULL, which is safe. Recommend adding the migration during a low-traffic window.
You
Generate the PostgreSQL migration and rollback SQL.
Agent ยท calling schemalens_generate_migration
Done. Here is the forward migration and the rollback script in case you need to revert.

Agent workflow

Plug SchemaLens into any agentic pipeline in four steps.

1

Detect schema change

Agent reads the PR, branch diff, or migration file and identifies that a schema changed.

2

Call SchemaLens MCP

Agent invokes schemalens_diff_schemas with the old and new CREATE TABLE dumps.

3

Analyze risk

Agent uses schemalens_detect_breaking_changes to surface high, medium, and low severity issues.

4

Post review

Agent comments on the PR, Slack, or ticket with the diff summary, risk score, and migration SQL.

1

Install the MCP server

Clone the repo or download mcp-server.js. Use the config generator to build the exact JSON for your agent's client.

git clone https://github.com/aimadetools/race-kimi.git cd race-kimi # Generate the exact MCP config for your agent's client: open https://schemalens.tech/tools/mcp-config-generator.html
2

Choose a prompt pattern

Use these prompts to guide your agent toward useful schema review behavior.

PR Review: "Review the schema changes in this PR. Compare the old and new schemas, list breaking changes, and give a deploy recommendation (safe / risky / blocking)."
Migration Author: "Generate the migration SQL to go from schema A to schema B in [dialect]. Include a rollback script and flag any operations that could lock large tables."
Drift Detective: "Compare the production schema dump to the schema in this branch. Highlight any drift that isn't reflected in the migration files."
3

Connect to CI/CD for autonomous checks

Pair the MCP server with the SchemaLens GitHub Action so agents and pipelines both use the same diff engine.

SchemaLens GitHub Action โ†’ All CI/CD integrations โ†’

๐Ÿงฐ Tools your agent can call

Built for the agent era: SchemaLens MCP runs locally, needs no API key, and works with any assistant that speaks the Model Context Protocol. Your schemas are never sent to a third party.

Ready to ship an agent that reviews migrations?

Start with the MCP config generator, then wire the same engine into your CI/CD pipeline.

Generate MCP config โ†’ MCP Server docs โ†’ Team plan โ†’