An MCP (Model Context Protocol) server for Ariga Atlas, enabling AI assistants to interact with Atlas migration tools through the Model Context Protocol.
This package provides a bridge between AI assistants (like Claude) and Atlas, allowing them to manage database migrations, validate schemas, and perform other database-related operations using Atlas commands.
- migrate-apply: Apply pending migration files to a database
- migrate-diff: Generate new migration files by comparing current state to desired schema
- migrate-lint: Run analysis on migration directory to detect issues
- migrate-new: Create new empty migration files
- migrate-status: Report current migration status of a database
- migrate-validate: Validate migration directory integrity and consistency
- Atlas CLI must be installed and available in your PATH
- Node.js 18 or higher
Add this server to your MCP client configuration. For Claude Desktop, add to your config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"atlas": {
"command": "npx",
"args": ["-y", "@mpreziuso/mcp-atlas"]
}
}
}The -y flag automatically installs or updates the package without prompting.
Once configured, your AI assistant can use Atlas commands through the MCP protocol. Example interactions:
- "Check the migration status of my database"
- "Create a new migration file"
- "Apply pending migrations to the database"
- "Validate the migration directory"
- "Generate a migration diff from my schema"
The MCP server wraps these Atlas CLI commands:
atlas migrate apply- Apply migrationsatlas migrate diff- Generate migration diffsatlas migrate lint- Lint migration filesatlas migrate new- Create new migrationatlas migrate status- Check migration statusatlas migrate validate- Validate migrations
MIT
Michele Preziuso mpreziuso@kaosdynamics.com