# orm-preflight

> orm-preflight is an open-source MCP server for developer tools. Reads TypeORM migration files and flags data loss, table locks and unsafe deploys. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Website:** https://sikandar100.github.io/orm-preflight/
- **Repository:** https://github.com/sikandar100/orm-preflight
- **MCP Registry name:** io.github.sikandar100/orm-preflight
- **Categories:** developer tools, databases
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "orm-preflight": {
      "command": "npx",
      "args": [
        "-y",
        "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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/orm-preflight
