zerolock-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Use zerolock-mcp to audit PostgreSQL 14-17 and MySQL 8.0/8.4 DDL migrations offline for ACCESS EXCLUSIVE lock queues, full table rewrites, non-concurrent indexes, and missing lock_timeout guards, rewrite hazardous migrations into multi-phase zero-downtime Expand/Contract + Rollback scripts, estimate QPS outage blast radius, and scan Prisma/Drizzle/Flyway migration directories.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| audit_sql_migration_locksA | Audits PostgreSQL 14-17 and MySQL 8.0/8.4 DDL statements for ACCESS EXCLUSIVE lock queues, full table rewrites, non-concurrent index builds, unvalidated foreign keys, and missing lock_timeout guards. |
| generate_zero_downtime_ddlA | Rewrites hazardous SQL migrations into multi-phase Expand/Contract runbooks using CREATE INDEX CONCURRENTLY, NOT VALID + VALIDATE CONSTRAINT, lock_timeout, ALGORITHM=INSTANT, and emergency Rollback scripts. |
| estimate_ddl_blast_radiusA | Estimates lock duration in seconds, connection-pool exhaustion risk, and blocked read/write query counts given SQL DDL statements, target table row count, and production QPS. |
| audit_migration_directoryB | Recursively scans Prisma, Drizzle, Flyway, or raw .sql migration directories for CRITICAL and HIGH deployment lock-queue and full-table-rewrite hazards. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| review-pr-migration-locks | Audit a pull-request SQL migration for ACCESS EXCLUSIVE lock queues, table rewrites, and connection-pool exhaustion before deployment. |
| rewrite-zero-downtime-runbook | Convert a blocking ORM-generated PostgreSQL or MySQL migration into a safe Phase 1 Expand + Phase 2 Validate/Contract + Rollback runbook. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| 16 PostgreSQL & MySQL Zero-Downtime DDL Hazard Rules | Structured catalog of the 16 lock-queue, table-rewrite, and online-DDL rules enforced by zerolock-mcp. |
| PostgreSQL 14-17 & MySQL 8.0 Zero-Downtime Migration Playbook | Reference guide for lock_timeout, CREATE INDEX CONCURRENTLY, NOT VALID + VALIDATE CONSTRAINT, and MySQL ALGORITHM=INSTANT. |
TDQS
Scored across 4 tools
Each tool targets a distinct input/action pair: auditing raw DDL statements, generating a zero-downtime rewrite, estimating runtime blast radius from row counts/QPS, and recursively scanning a migration directory. The two 'audit' tools are separated cleanly by input type (inline SQL vs. a directory path), so misselection risk is minimal.
All four names follow a verb_noun snake_case pattern (audit_/generate_/estimate_ + domain object) and use the same vocabulary (ddl, migration, lock) as the descriptions. No mixed casing or verb-style drift.
Four tools is a tight, purposeful surface for a migration-safety domain: analyze, rewrite, quantify risk, and batch-scan. Nothing is redundant and each tool maps to a distinct stage of the workflow.
The surface covers the core lifecycle — detect hazard, rewrite safely, estimate impact, and sweep a directory — with rollback generation folded into the rewrite tool. Minor gaps remain, such as validating or re-checking an already-applied migration and no explicit support beyond PostgreSQL/MySQL, but these are workable around existing tools.