PgVouch
Safe PostgreSQL migrations: schema drift, lock analysis, safe rewrites, data checksums.
Connector by Shubh-Sgr · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/shubh-sgr-pgvouch
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.
- Tools
- 7 read · 0 write · 0 deleteRead-only
- Secrets
- 2 (API keys, tokens or passwords)
- Install scripts
- Not scanned yet
- Runs as
- Node.js package
Tools by what they do 7
Read from the source code; the running server may list different tools.
Read 7 · Look things up without changing anything.
analyze_lockscheck_lock_queuedetect_driftfind_differing_rowsplan_migrationsuggest_safe_rewriteverify_data
Secrets and settings it asks for
Secrets: values you paste in that let it act as you.
SOURCE_DATABASE_URLTARGET_DATABASE_URL
Other settings (environment variables or headers).
PGVOUCH_LLM
Tools (7)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
analyze_locksAnalyze migration lock impactread-onlyParse a SQL migration with PostgreSQL's own parser and predict, per statement: the table lock taken, whether it blocks reads/writes, whether it scans or rewrites the table, and a risk level using the target table's size. Also warns about missing lock_timeout and CONCURRENTLY inside transactions.
check_lock_queueIs it safe to run this migration right now?read-onlyLive check on the TARGET: for each statement, compares the table lock it needs with the locks other sessions hold or are waiting for right now (pg_locks, full Postgres conflict table), and lists open transactions that CREATE INDEX CONCURRENTLY would wait for. Verdict: safe_now or would_wait (with the sessions: pid, user, application, state, transaction age, lock mode). Never returns other sessions' query text and never terminates anything. Without pg_read_all_stats, states and ages are unknown ('limited' visibility).
detect_driftDetect schema driftread-onlyCompare the SOURCE (reference) and TARGET PostgreSQL schemas: tables, columns, types, nullability, defaults, indexes, constraints, sequences. Returns every difference with a severity. 'missing' = in source but not target; 'extra' = only in target.
find_differing_rowsFind the exact differing rowsread-onlyFor one table, bisect mismatched chunks (binary search over checksums) to find the exact rows that differ: missing on target, extra on target, or changed (with the changed column names). By default returns primary keys and column names only, not values.
plan_migrationPlan a safe migrationread-onlyBuild an ordered, safe migration plan that makes TARGET match SOURCE. If an LLM is configured, its plan must pass a validator (objects exist, only allow-listed statements, no unsafe DDL) and then a shadow run: PgVouch starts a disposable local Postgres container, copies the target's schema (no data) into it, applies the plan as a non-superuser and checks the result matches SOURCE. Otherwise the deterministic rules-only plan is returned. `plan.acceptedBy` and the first lines of `sql` say how the plan was accepted. Risk and reversibility are computed by PgVouch. The source and target databases a…
suggest_safe_rewriteRewrite risky DDL safelyread-onlyRewrite risky DDL into safe, non-blocking steps using deterministic rules (CREATE INDEX CONCURRENTLY, NOT VALID + VALIDATE, expand/contract for NOT NULL columns and type changes, batched backfills). Returns a commented script that starts with SET lock_timeout and statement_timeout. It is NOT executed.
verify_dataVerify data with chunked checksumsread-onlyProve that table data is identical on source and target by comparing MD5 hashes of primary-key chunks computed inside Postgres (no rows are transferred). Returns per-table status and the key ranges of mismatched chunks, plus a check that every identity/serial sequence on the target is ahead of its data (a sequence left behind makes the next INSERT fail with a duplicate key). If the target is still being replicated to, set recheck: differences are looked at again after a delay and only those that never catch up are reported. Use find_differing_rows to drill into a mismatched table.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit
- Oct 4, 2026 (24 days ago)
- Last release
- Oct 4, 2026 (24 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Registry name
io.github.Shubh-Sgr/pgvouch- Version
- 0.4.4
- Auth
- API key
- Packages
- npm pgvouch
- License
- Apache-2.0
- Repository
- github.com/Shubh-Sgr/pgvouch
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Cite this page
PgVouch MCP server. Agent Mart. https://agentmart.dev/connectors/shubh-sgr-pgvouch (last updated 2026-10-24)