Skip to content
Home Products
Tools
mpx-scan mpx-api mpx-db mpx-secrets-audit Compare Pricing Docs About GitHub

mpx-db

One CLI for all your databases. Stop juggling database GUIs.

npm version monthly downloads GitHub stars
npm i -g mpx-db

What it does

Query, migrate, inspect, and export from SQLite, PostgreSQL, and MySQL. Same commands, same interface.

Query Execution

Run SQL queries against any database. Clean, formatted output. JSON export for scripts and pipelines.

Schema Inspection

View tables, columns, indexes, foreign keys. Understand your database structure without clicking through menus.

Migration Management

Track schema changes over time. Apply, rollback, and version your database migrations with simple commands.

Data Export

Export to JSON, CSV, or SQL. Back up data, migrate between databases, or feed data into other tools.

Multi-Database

SQLite, PostgreSQL, MySQL — same commands for all. Switch databases with just a connection string.

AI-Native

MCPMCP (Model Context Protocol) — lets AI assistants like Claude and GPT use CLI tools directly. server mode, --json output, --schema discovery. Your AI can query databases directly.

Query a database
$ mpx-db query "SELECT * FROM users LIMIT 5" --db ./app.db

┌────┬──────────┬─────────────────────┬────────────┐
│ id │ username │ email               │ created_at │
├────┼──────────┼─────────────────────┼────────────┤
│ 1  │ alice    │ alice@example.com   │ 2026-01-15 │
│ 2  │ bob      │ bob@example.com     │ 2026-01-16 │
│ 3  │ charlie  │ charlie@example.com │ 2026-01-17 │
│ 4  │ diana    │ diana@example.com   │ 2026-01-18 │
│ 5  │ eve      │ eve@example.com     │ 2026-01-19 │
└────┴──────────┴─────────────────────┴────────────┘

5 rows returned (12ms)
Inspect schema
$ mpx-db schema users --db ./app.db

Table: users

Columns:
  id          INTEGER  PRIMARY KEY AUTOINCREMENT
  username    TEXT     NOT NULL UNIQUE
  email       TEXT     NOT NULL UNIQUE
  password    TEXT     NOT NULL
  created_at  TEXT     DEFAULT CURRENT_TIMESTAMP
  updated_at  TEXT

Indexes:
  idx_users_email (email)
  idx_users_username (username)

Foreign Keys: None
JSON output for AI agents & scripts
$ mpx-db query "SELECT * FROM users LIMIT 3" --db ./app.db --json

{
  "rows": [
    {"id": 1, "username": "alice", "email": "alice@example.com", "created_at": "2026-01-15"},
    {"id": 2, "username": "bob", "email": "bob@example.com", "created_at": "2026-01-16"},
    {"id": 3, "username": "charlie", "email": "charlie@example.com", "created_at": "2026-01-17"}
  ],
  "count": 3,
  "duration_ms": 8
}
Connect to PostgreSQL or MySQL
# PostgreSQL
$ mpx-db query "SELECT * FROM users" \
  --db postgres://user:pass@localhost/mydb

# MySQL
$ mpx-db query "SELECT * FROM users" \
  --db mysql://user:pass@localhost/mydb

# SQLite (default)
$ mpx-db query "SELECT * FROM users" --db ./app.db

Free vs Pro

FeatureFreePro
SQL queries & schema inspection
JSON output & MCP server
Database supportSQLite onlySQLite, PostgreSQL, MySQL
Migration management
Data export (JSON, CSV, SQL)
Backup & restore
← View All Tools

Related Tools

Always back up your database before running migrations or schema changes. mpx-db is a powerful tool — use with care.