Skip to main content
Glama
possibly6

safe-migrations-mcp

by possibly6

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SAFE_MIGRATIONS_HOMENoOverride the default state directory (~/.safe-migrations-mcp/) with this path.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
inspect_schemaA

Inspect a database or ORM schema file.

connection examples:

  • sqlite:///path/to/app.db OR ./app.db

  • postgresql://user:pw@host/db

  • mysql://user:pw@host/db

  • ./prisma/schema.prisma

  • ./drizzle/schema.ts

Results are cached locally for 60s unless refresh=True.

inspect_configC

Parse and summarize a config file (YAML/JSON/.env/Prisma/TOML/text).

propose_migration_or_editA

Propose a DB migration OR a config edit. Returns a proposal_id you pass to apply_change.

Args: kind: 'db' or 'config' connection: (db) connection string or schema-file path request: (db) natural-language intent, e.g. "add column email of type TEXT not null default '' to users" sql: (db) raw SQL — takes priority over request path: (config) path to the file being edited new_content: (config) full new file contents

Nothing is written. Call simulate_impact(proposal_id) next, then apply_change with the one-time confirmation_token returned by the simulation step.

simulate_impactA

Dry-run a proposal. DB proposals execute inside a rolled-back transaction to surface errors and count affected rows. Config proposals show full diff + key delta. All results include risk flags and whether explicit confirmation is required.

generate_rollbackA

Produce exact undo SQL (for DB proposals) or a restore plan (for config).

Either pass an existing proposal_id, or pass raw sql (+ optional connection for better schema-aware rollbacks).

apply_changeA

Apply a proposal. Requires the one-time confirmation token from simulate_impact.

Before writing, snapshots the affected file (configs) or the SQLite file, then executes inside a transaction where possible. Logs an audit entry.

get_change_historyC

Return the audit log of applied changes (most recent last).

cleanup_stateB

Prune old proposal metadata, secret payloads, and snapshots from local state.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/possibly6/safe-migrations-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server