Skip to content
MCP server

orm-preflight

Reads TypeORM migration files and flags data loss, table locks and unsafe deploys

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
1.2.0
Listing updated
2 days ago

About orm-preflight

orm-preflight is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

The motivating bug is specific: when a column's type or length changes, TypeORM's generator drops the column and adds it again, so every existing value is lost, yet the migration looks harmless in review and passes on an empty test database. orm-preflight inspects migration files for that and for other hazards before they are merged.

It reads the files only. No database, no network, and migrations are never run, so the maintainers say it is safe on pull requests from forks. Each finding states what will happen, why, and a safer alternative, such as altering a column type in place. Rules are grouped by hazard, for example a dropped column or table, a possible rename that loses data, and adding a NOT NULL column with no default. Locking claims are checked on PostgreSQL 14 to 18.

It runs from the command line with Node.js 20 or newer, offers an init command for adopting it on projects with existing history, and is also available as a Claude Code plugin and this MCP server so an agent can check each migration it writes.

Install

Run in a terminal

claude mcp add orm-preflight -- npx -y orm-preflight

Add to claude_desktop_config.json

{
  "mcpServers": {
    "orm-preflight": {
      "command": "npx",
      "args": [
        "-y",
        "orm-preflight"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "orm-preflight": {
      "command": "npx",
      "args": [
        "-y",
        "orm-preflight"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "orm-preflight": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "orm-preflight"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "orm-preflight": {
      "command": "npx",
      "args": [
        "-y",
        "orm-preflight"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "orm-preflight": {
      "command": "npx",
      "args": [
        "-y",
        "orm-preflight"
      ]
    }
  }
}

What it does

Drop-and-recreate detection
Catches a column dropped and re-added in one migration.
NOT NULL checks
Flags new NOT NULL columns without a default.
Lock hazards
Warns about index builds that block writes.
Fix guidance
Each finding gives the reason and a safe alternative.
File-only analysis
Needs no database or network and never runs migrations.
Init for legacy projects
Lets teams adopt it without fixing past migrations.

Good for

  • Review a pull request that changes a column length
  • Stop an agent from writing a data-losing migration
  • Gate CI on migration safety
  • Find index builds that would lock a busy table
  • Adopt checks on a project with existing migrations

Pricing

Open source

Open-source npm package

Prices change. Check sikandar100.github.io before you buy.

orm-preflight FAQ

Does it connect to my database?

No. It reads migration files only and never runs them.

What does it need?

Node.js 20 or newer; install with npm install --save-dev orm-preflight.

Which ORM does it check?

TypeORM migrations.

Can an AI agent use it?

Yes, through the MCP server or a Claude Code plugin, so the agent can check migrations it writes.

Is orm-preflight free?

Yes. orm-preflight is open source, so you can use and self-host it for free.

How do I add orm-preflight to Claude Code?

Run this command in your terminal: claude mcp add orm-preflight -- npx -y orm-preflight

What are the best alternatives to orm-preflight?

The closest alternatives to orm-preflight are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to orm-preflight

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools