Default: SQLite
When no database configuration is provided, MCPJungle automatically creates a SQLite file namedmcpjungle.db in the directory where the process is started:
PostgreSQL
MCPJungle supports PostgreSQL for production workloads. You can configure the connection using either a full DSN or individual environment variables.Option 1: Connection DSN
Set theDATABASE_URL environment variable to a full Postgres connection string:
- Direct binary
- Docker
Option 2: Individual environment variables
If you prefer not to construct a full DSN, set the individual Postgres variables instead.POSTGRES_HOST is required; all other variables are optional and have sensible defaults.
_FILE variant, which reads the value from a file. This is useful for Docker secrets and similar secret-injection mechanisms:
| Variable | File variant | Default |
|---|---|---|
POSTGRES_USER | POSTGRES_USER_FILE | postgres |
POSTGRES_PASSWORD | POSTGRES_PASSWORD_FILE | (empty) |
POSTGRES_DB | POSTGRES_DB_FILE | postgres |
If both a variable and its
_FILE counterpart are set, the plain variable takes precedence.Variable precedence
When MCPJungle starts, it resolves the database connection in this order:DATABASE_URL— used as-is if setPOSTGRES_HOST(+ optional variables) — constructs a DSN ifPOSTGRES_HOSTis set- SQLite fallback — creates
mcpjungle.dbin the current directory
Production recommendations
The production Docker Compose file (docker-compose.prod.yaml) bundles a Postgres 17 container for convenience. For a real deployment, replace it with a managed database service and update the DATABASE_URL accordingly.