Manual Setup
Prerequisites
- Docker (for shadow containers — required for all engines except SQLite and DuckDB)
Install
Steps
Initialize a connection
Point Mori at your production database. The interactive setup walks you through engine, provider, and credentials.For a non-interactive setup, you can pass a connection string directly:This saves the connection config to
mori.yaml. No containers or connections are created yet.Start the proxy
- Connects to your production database
- Discovers schema and structure (SQL engines dump tables/types/sequences; Firestore discovers collections; Redis scans key prefixes)
- Spins up a shadow database (Docker container, local file copy, or emulator)
- Replicates structure to shadow (SQL engines replay schema; Firestore seeds documents; Redis starts empty)
- Detects and replicates extensions to shadow (PostgreSQL — auto-installs via
apt-getif needed; use--imageonmori initfor custom images) - Offsets auto-increment sequences to prevent PK collisions (SQL engines only)
- Starts the proxy and listens on a local port
--port to pick a specific port, or let Mori auto-assign. Subsequent starts are faster since the shadow already exists.If complex queries over large tables are slow, you can limit how many rows Mori hydrates from prod per query:Point your app at Mori
Swap your application’s connection string to point at
127.0.0.1 on the proxy port. Same driver, same protocol — your app won’t know the difference.Stop Mori
Closes the connection to prod and spins down the shadow container. State is persisted for future runs.
Enabling the MCP Server
Start Mori with the MCP server for AI agent integration:http://127.0.0.1:9000/mcp and get engine-specific tools (SQL queries, Redis commands, or Firestore operations) — all safely routed through the proxy.
Lifecycle
For AI Agents
If you’re setting up Mori with an AI coding agent, download theskill.md file and add it to your project root. Point your agent at it — it contains everything needed to install, initialize, and start Mori.
skill.md and handle the rest autonomously.
