Postgres migration tools for AI coding agents
An MCP server and a skill file. With them, Claude Code, Cursor, Codex or any MCP client can audit a Laravel MySQL app and port it to PostgreSQL using rules tested on real MariaDB 11.8 and Postgres 17 servers. Models guess at this. These tools carry the tested answers. It runs on your machine and has no dependencies. Your schema and code are never uploaded.
Install (free)
claude mcp add tuskshift-pg-migrate -- npx -y --package=https://tuskshift.deed.page/tuskshift-pg-migrate-1.0.1.tgz tuskshift-pg-migrate
{
"mcpServers": {
"tuskshift-pg-migrate": {
"command": "npx",
"args": [
"-y",
"--package=https://tuskshift.deed.page/tuskshift-pg-migrate-1.0.1.tgz",
"tuskshift-pg-migrate"
]
}
}
}
[mcp_servers.tuskshift-pg-migrate] command = "npx" args = ["-y", "--package=https://tuskshift.deed.page/tuskshift-pg-migrate-1.0.1.tgz", "tuskshift-pg-migrate"]
Claude Desktop, one click: tuskshift-pg-migrate-1.0.1.mcpb. Skill for Claude Code, which gives the agent the audit → scan → convert → test → fix workflow: tuskshift-pg-migrate-skill.zip. Unzip it into ~/.claude/skills/. Raw package: tuskshift-pg-migrate-1.0.1.tgz, which also works as a CLI (tuskshift-pg-migrate scan ./app). Needs Node 18 or later.
Tools
| Tool | What the agent gets | Tier |
|---|---|---|
check_mysql_schema | Risks in a mysqldump, SHOW CREATE TABLE or Laravel migration: unsigned ranges, tinyint(1)→boolean, ENUM/SET, TIMESTAMP hour shifts, zero dates, _ci collations becoming case-sensitive, FULLTEXT, MyISAM, sequence resets | Free |
lookup_postgres_error | Cause and tested fix for the errors Laravel apps hit after the switch: 23505 duplicate key (sequence), 42803 GROUP BY, 22003 out of range, 42883 boolean = integer, zero dates, backticks and more | Free |
translate_mysql_query | MySQL SQL or a whereRaw fragment translated to Postgres, with the reason for every change | Free |
convert_mysql_schema | Runnable Postgres DDL: identity columns, indexes, FKs added after the data load, comments, setval lines, and a note on each lossy change | Pro |
scan_laravel_project | Every raw SQL call in the repo with file:line and its Postgres version, plus migration and config blockers (read-only) | Pro |
Free tier: the three free tools in full, translation up to 5 statements per call, a 2-table preview of the converter and the scan's totals plus its first 3 findings.
Tested, not guessed
Before each release, the test run sends real queries through the MCP tools and runs them on MariaDB 11.8 and Postgres 17. The results must match. In the 1.0.1 run (Oct 27, 2026):
- 24 of 24 translated queries returned identical rows on both servers. They include GROUP_CONCAT, DATE_FORMAT, TIMESTAMPDIFF, ON DUPLICATE KEY UPDATE, INSERT IGNORE, REPLACE INTO and JSON_EXTRACT.
- 6 of 6 raw SQL calls found by the project scan in a sample Laravel app returned identical rows after translation. All 13 expected findings were reported, and nothing under
vendor/was flagged. - 3 of 3 schema dumps (mysqldump, SHOW CREATE TABLE, phpMyAdmin) loaded on MariaDB, converted and ran cleanly on Postgres, with matching table counts.
- 19 of 19 protocol and free-tier checks passed, along with a run through the official MCP TypeScript SDK client.
Pro: $39 one-time
Pro unlocks the full schema conversion, the full project scan with every file:line and translation, and batch translation. The license key comes from Gumroad. Pass it to activate_license or set TUSKSHIFT_LICENSE_KEY. Buy Pro on Gumroad for $39. It's a one-time payment, and the key arrives by email. Without a key, every tool runs in free mode. For the human side of the move (rehearsal, data fixes, cutover and rollback runbooks), see the $49 Migration Kit.
Privacy and checksums
The package has no telemetry and no dependencies. The only network request is to api.gumroad.com/v2/licenses/verify. It runs when you activate a Pro key and at most weekly after that, and it sends only the key.
fd2771675282723313978fa136e203accad9c78f6f3908dfcc81f5e8bb4f310f tuskshift-pg-migrate-1.0.1.mcpb efaea38a14f1e880c024302584df17e7b1ef9f14163d18ec3e8878914e552228 tuskshift-pg-migrate-1.0.1.tgz f615107866d9ab9cb85ce98fe0614e7e9d86386a9e568b2cfe7f641000f556e7 tuskshift-pg-migrate-skill.zip