Start in enterprise mode
You can enable enterprise mode in three ways:- CLI flag
- Environment variable
- Docker Compose
Initialize the server once
After the first boot in enterprise mode, runmcpjungle init-server once from your client machine to create the initial admin identity and authenticate your CLI.
For the exact bootstrap flow and command details, see:
Recommended runtime pattern
For a shared deployment, the recommended pattern is:- Run the standard
ghcr.io/mcpjungle/mcpjungle:latestimage. - Keep the CLI installed separately on operator machines.
- Point Mcpjungle at a separate PostgreSQL instance or cluster.
Run with Docker
For production, use the standard (minimal) Mcpjungle image. It is based ondistroless/base and contains only the mcpjungle binary.
Supply your database connection string with the DATABASE_URL environment variable:
Reverse proxies and localhost protection
If you put a reverse proxy in front of MCPJungle, check how it sets the upstreamHost header.
The MCP gateway enables DNS rebinding protection. When a connection reaches MCPJungle on a loopback address, such as 127.0.0.1 or ::1, the gateway requires a localhost value in the HTTP Host header. A public hostname in that header causes the MCP transport to return 403 Forbidden.
For loopback upstream connections, configure your proxy to send a local Host value, such as localhost:8080. Clients can continue connecting to the public URL, for example https://mcp.example.com/mcp.
For example, inside your existing Nginx server configuration, the /mcp location can use:
proxy_buffering off allows streaming responses to reach the client promptly. Adapt the backend address and port to your deployment. If your existing configuration uses proxy_set_header Host $host, replace that directive in the affected location. Apply the same upstream Host-header policy to any group MCP endpoints or legacy SSE endpoints you proxy over loopback.
Setting X-Forwarded-Host alone does not satisfy this check; the gateway inspects Host. The check also applies to loopback connections when MCPJungle listens on all interfaces (0.0.0.0).
Connections reaching MCPJungle on a non-loopback address, such as a container-network address, are not rejected by this particular check. Assess the backend connection as seen by MCPJungle, rather than assuming all proxies or container deployments need a Host-header change.
For background, see the MCP transport security guidance and the upstream localhost-protection option.
Graceful shutdown
Mcpjungle handlesSIGTERM for graceful shutdown. It closes all active stateful sessions, flushes telemetry, and stops accepting new connections before exiting.
Send SIGTERM to stop the server cleanly:
docker stop sends SIGTERM by default, so no extra flags are needed.
What enterprise mode enables
Even in enterprise mode, you can override metrics with
OTEL_ENABLED=false if needed, though that is not the recommended default for shared deployments.What to read next
Database
Configure PostgreSQL correctly for production use.
Observability
Scrape Prometheus-compatible metrics from the
/metrics endpoint.Governance overview
Understand enterprise mode, tokens, clients, and users.
Access control
Give each MCP client access only to the servers it should reach.
