Database
MCPJungle supports SQLite (default) and PostgreSQL. Use eitherDATABASE_URL for a full DSN or the individual POSTGRES_* variables to build the DSN from parts.
Full PostgreSQL connection string. When set, MCPJungle connects to PostgreSQL and ignores any When this variable is not set and
POSTGRES_* variables.POSTGRES_HOST is also not set, MCPJungle falls back to an embedded SQLite database file (mcpjungle.db) in the current working directory.Optional path to the SQLite database file to use when When this variable is set, MCPJungle uses that exact path instead of auto-detecting
DATABASE_URL and POSTGRES_HOST are not set. If this variable is not set, MCPJungle defaults to ./mcpjungle.db. The --sqlite-db-path CLI flag takes precedence over this variable.mcpjungle.db.PostgreSQL host. Required when using the individual
POSTGRES_* variables instead of DATABASE_URL. If this variable is not set, MCPJungle does not attempt to build a PostgreSQL DSN from the other POSTGRES_* variables.PostgreSQL port.
PostgreSQL username. If both
POSTGRES_USER and POSTGRES_USER_FILE are set, POSTGRES_USER takes precedence.Path to a file containing the PostgreSQL username. Useful with Docker secrets. MCPJungle reads the file and trims surrounding whitespace.
PostgreSQL password. If both
POSTGRES_PASSWORD and POSTGRES_PASSWORD_FILE are set, POSTGRES_PASSWORD takes precedence. The password can be empty.Path to a file containing the PostgreSQL password.
PostgreSQL database name. If both
POSTGRES_DB and POSTGRES_DB_FILE are set, POSTGRES_DB takes precedence.Path to a file containing the PostgreSQL database name.
Database resolution order
When the server starts it resolves the database connection in this order:DATABASE_URL— used as-is if set.POSTGRES_HOST+ optionalPOSTGRES_*variables — MCPJungle constructs a DSN ifPOSTGRES_HOSTis set.--sqlite-db-path— uses the configured SQLite file path if the CLI flag is set.SQLITE_DB_PATH— uses the configured SQLite file path if the environment variable is set.- SQLite fallback — creates or opens
mcpjungle.dbin the current working directory, while still recognizing an existing legacymcp.db.
Server
TCP port the HTTP server listens on. The
--port CLI flag takes precedence over this variable.Server operating mode. Accepted values are
development and enterprise (case-insensitive). The --enterprise CLI flag takes precedence over this variable.The value
production is accepted for backward compatibility but is deprecated. Use enterprise instead.Maximum number of seconds MCPJungle waits for a newly registered MCP server to respond to its initialization request before aborting. Must be a positive integer. Increase this value if you register STDIO servers that take a long time to start up.
Observability
Enables Prometheus-compatible OpenTelemetry metrics. When enabled, metrics are exposed at the
/metrics HTTP endpoint. Accepted values are true, 1, false, and 0 (case-insensitive).In enterprise mode this defaults to true. In development mode it defaults to false. Setting this variable explicitly overrides the mode-based default.Additional key-value attributes attached to all emitted OTel metrics. Use the standard These attributes are appended to the resource description alongside the automatically detected service name, host, and process attributes.
key=value,key2=value2 format defined by the OpenTelemetry specification.Connections
Idle timeout in seconds for stateful MCP sessions. A stateful session is kept open between tool calls to avoid cold-start overhead (see Session modes).
This setting has no effect on stateless connections, which are the default and are closed immediately after each tool call.
Docker
Docker image tag used when pulling
ghcr.io/mcpjungle/mcpjungle in the provided Docker Compose files.Set this when you want to lock your mcpjungle deployment to a specific version when using one of the provided docker compose files.