Skip to main content
These commands operate on the MCPJungle server process itself rather than on its registry contents. start launches the gateway, init-server prepares it for enterprise use, and version reports what is running.

start

Starts the MCPJungle HTTP server and MCP gateway.
mcpjungle start [flags]
The server listens on port 8080 by default and exposes the MCP proxy at /mcp. On first run in development mode, it automatically initializes itself — no additional setup is needed.

Flags

--port
string
TCP port to bind the HTTP server to. Overrides the PORT environment variable. Defaults to 8080.
--enterprise
boolean
default:"false"
Start the server in enterprise mode, which enables access control, authenticated clients, and user management. Equivalent to setting SERVER_MODE=enterprise. When using this flag on a fresh database, the server will print a reminder to run init-server before it can be used.
--prod
boolean
default:"false"
Deprecated alias for --enterprise. Use --enterprise instead.

Environment variables

The start command reads the following environment variables. A .env file in the working directory is loaded automatically if present.
VariableDescriptionDefault
PORTTCP port to bind to. Overridden by --port.8080
SERVER_MODEServer mode: development or enterprise. Overridden by --enterprise.development
DATABASE_URLFull DSN for the database connection (SQLite or Postgres).SQLite file in working directory
POSTGRES_HOSTPostgres host. When set, individual Postgres env vars are used to construct the DSN.
POSTGRES_PORTPostgres port.5432
POSTGRES_USERPostgres user.postgres
POSTGRES_PASSWORDPostgres password. Also readable from POSTGRES_PASSWORD_FILE.
POSTGRES_DBPostgres database name. Also readable from POSTGRES_DB_FILE.postgres
MCP_SERVER_INIT_REQ_TIMEOUT_SECSeconds to wait for an upstream MCP server to respond during registration.30
SESSION_IDLE_TIMEOUT_SECIdle timeout in seconds for stateful MCP sessions. Set to 0 for no timeout.-1 (no timeout)
OTEL_ENABLEDEnable OpenTelemetry tracing and metrics. Accepts true/1 or false/0.false in dev, true in enterprise
For POSTGRES_PASSWORD and POSTGRES_DB, you can use the _FILE variant (e.g., POSTGRES_PASSWORD_FILE=/run/secrets/pg_pass) to read the value from a file. This is useful for Docker secrets and Kubernetes secrets mounted as files.

Examples

Start in development mode (default):
mcpjungle start
Start on a custom port:
mcpjungle start --port 9000
Start in enterprise mode:
mcpjungle start --enterprise
Start with a Postgres database:
DATABASE_URL="postgres://user:password@localhost:5432/mcpjungle" mcpjungle start

Server modes

Development mode is designed for individual use. The server initializes itself automatically on first startup — no admin token or init-server step is needed. Access control is not enforced, meaning any client that can reach the server can call any tool.This mode is appropriate for local development and single-user deployments.

init-server

Initializes the MCPJungle server when running in enterprise mode. This command is run once, from your local machine, after the server has started.
mcpjungle init-server [--registry <url>]
init-server creates the admin user, generates the admin access token, and saves both the registry URL and token to ~/.mcpjungle.conf. After running this command, your CLI is authenticated as admin.
Run init-server only once. Re-running it on an already-initialized server will return an error. The admin access token is only displayed once — save it immediately.

Example

mcpjungle --registry http://your-server:8080 init-server
After this command completes, ~/.mcpjungle.conf is written with your credentials and subsequent commands work without the --registry flag.

version

Prints version information for both the CLI binary and the connected server.
mcpjungle version

Output

CLI Version: v1.2.3
Server Version: v1.2.3
Server URL:  http://127.0.0.1:8080
If the server is unreachable (for example, when running the CLI without a local server), the server version line is replaced with a message indicating the version could not be retrieved. You can also use the root-level --version flag for a condensed output:
mcpjungle --version