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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DBM MCP Serversubmit migration intent to add nullable email column to users"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
This server cannot be deployed
Maintenance
Related MCP Connectors
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.
Scans schema metadata to classify PHI, score HIPAA readiness, and generate compliant migrations.
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
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.641 npmMIT

terrabaseofficial
AlicenseNot gradedqualityFmaintenanceLLM-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- AlicenseAqualityBmaintenanceA read-only MCP server for PostgreSQL schemas and their git history, enabling AI agents to inspect schema details, migrations, ERDs, missing indexes, circular foreign keys, and churn without write access.8AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceGives AI coding assistants, IDEs, and CI full PostgreSQL schema intelligence from an offline snapshot, enabling linting, query validation, migration safety analysis, and foreign key graph exploration without ever exposing database credentials.35BSD 2-Clause "Simplified"