DBM MCP Server
Uses GitHub as the source-control provider for accepted migration history, coordinating migration intent with the repository default branch and supporting source-control app setup.
Coordinates and verifies database migration intent for PostgreSQL, comparing structured schema changes against the accepted migration graph and reporting safe changes, stale bases, dependencies, and conflicts.
Integrates with SQLAlchemy schema metadata and migration workflows, allowing agents to submit structured SQLAlchemy schema changes for coordination before migration files are finalized.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
DBM
DBM coordinates database migration intent before migration files are finalized.
Developers and coding agents submit structured schema changes to a shared coordinator. DBM compares those changes with the accepted migration graph and other active work, then reports safe changes, stale bases, dependencies, and deterministic conflicts.
DBM is the migration control plane. It coordinates intent, verifies real schema state, authorizes deployment, and invokes Alembic inside an isolated runner. Git remains the source of accepted migration history; operators and CI do not invoke Alembic against shared environments directly.
Project status
DBM is an early open-source MVP under active development. Its first target stack is PostgreSQL, SQLAlchemy, Alembic, GitHub, FastAPI, and MCP. A capability-based provider interface keeps the coordinator independent of database, source-control, and CI vendors, and the live provider catalog distinguishes shipped capabilities from planned ones.
Related MCP server: terrabase
Core rule
AI reasons.
DBM verifies.
Developer approves.
DBM authorizes and orchestrates.
Alembic executes inside the DBM runner.Run the complete stack
The default Docker image runs the MCP server as a non-root user over Streamable HTTP. Docker Compose starts PostgreSQL, the coordinator API, and the MCP server:
export DBM_API_TOKEN=dev-token
docker compose up --buildServices:
Coordinator API:
http://localhost:8000OpenAPI:
http://localhost:8000/docsMCP endpoint:
http://localhost:8001/mcpMCP health:
http://localhost:8001/health
The tagged-image workflow publishes releases to GitHub Container Registry.
Local CLI
Install the project and inspect the available commands:
uv sync --extra dev
uv run dbm --helpAfter creating a project through the API, connect a repository:
uv run dbm init \
--project-id PROJECT_UUID \
--server http://localhost:8000 \
--alembic-config alembic.ini
uv run dbm inspect
uv run dbm providers
uv run dbm submit examples/intents/rename-name.jsonSet api_token in .dbm.toml when the coordinator requires authentication. This local file is ignored by Git.
Architecture
Coding agent or CLI
|
| structured intent
v
MCP server container --------> Coordinator API
|
v
PostgreSQL metadata
Git default branch: accepted migration history
DBM coordinator: proposed migration work
Alembic: execution engine inside the DBM runnerThe MCP server never receives application database credentials. Read-only inspection and CI-controlled migration execution use separate credentials and isolated services in follow-on specifications 0003 and 0004.
Agent integration
The project skill at .cursor/skills/dbm-migrations/SKILL.md teaches compatible coding agents to submit and check intent before generating migrations, require developer approval for semantic changes, and acquire a finalization lease.
Development
uv sync --extra dev
uv run pytest
uv run dbm-apiThe coordinator uses sqlite:///./dbm.db by default for local development. Copy .env.example and set DBM_DATABASE_URL to use PostgreSQL.
Start with the end-to-end user journey. See the MVP specification, implementation plan, and roadmap. Follow-on designs cover the source-control apps and setup console, read-only schema verification, CI-controlled deployment runner, and provider architecture.
License
Apache-2.0
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Review your AI agent's database changes on your schema, with plain-language risk, before they run.
Database change control: schemas, change scripts, approvals, rollback, drift and audit
AI agents propose database changes as reviewable requests — no direct write access.
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Related MCP Servers
- AlicenseAqualityDmaintenanceAnalyzes database migrations for risks like lock contention and data loss before they run. Supports Flyway and Liquibase formats, providing risk scores and rollback generation.694 npmMIT

terrabaseofficial
AlicenseNot gradedqualityDmaintenanceLLM-assisted, safety-gated Postgres migrations exposed as an MCP server, using a deterministic rule engine over Postgres's own parser AST for safety enforcement, with two-phase approval and append-only audit ledger.Apache 2.0- AlicenseAqualityBmaintenanceEnables safe database migration workflows by detecting frameworks, reviewing migration risk and drift, generating migration files with explicit approval, and providing rollback guidance—without ever applying migrations or executing rollbacks.75 npm1MIT
- AlicenseBqualityCmaintenanceEnables AI coding agents to perform deterministic database architecture audits and performance engineering for PostgreSQL and MySQL, covering migration analysis with schema health scoring, ESR-based composite index recommendations, N+1 query detection, EXPLAIN plan diagnosis, transaction and deadlock analysis, partitioning and archival design, and capacity or configuration tuning. It also generates phased Expand & Contract runbooks that turn blocking DDL into zero-downtime production migrations.8MIT