mctl is a command-line interface for managing multiple Minecraft servers with ease. It helps you initialize environments, install or remove servers, start or stop them, and configure server properties directly from your terminal. The tool is designed to automate repetitive administrative tasks, making Minecraft server management faster, cleaner, and more consistent across environments.
You will need Poetry if you want to install the project from the repo, or any other package manager when installed from PyPi.
Clone the repository and install the dependencies:
git clone git@github.com:cloud-stuff/minecraft-manager-mctl.git
cd mctl
poetry installRun the CLI using:
python src/mctl/cli/main.py --helpOr make it globally available:
alias mctl="python /path/to/cli/main.py"Usage: mctl [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell.
--help Show this message and exit.
Commands:
init Initialise the mctl environment.
server Manage Minecraft server instances.
start Start a specific server instance.
stop Stop a running server instance.
config Manage server configuration (get/set).Initialise the environment where mctl will store servers, configs, and downloads.
mctl init [OPTIONS]Options:
| Option | Description | Default |
|---|---|---|
-p, --path PATH |
Path to initialize environment | ~/.mctl |
-f, --force |
Override existing directories | False |
Example:
mctl init --path ~/minecraft-env --forceOutput:
Environment initialized at /home/user/minecraft-env
Manage Minecraft server instances.
Install a new Minecraft server.
mctl server install [OPTIONS] NAMEOptions:
| Option | Description | Default |
|---|---|---|
-t, --type |
Type of server software (e.g., vanilla, paper, spigot) | vanilla |
-v, --version |
Minecraft version or latest |
latest |
-m, --memory |
Maximum server memory | 2G |
--eula-accept |
Automatically accept Mojang's EULA | — |
--first-start |
Run once to generate world/configs, then exit | — |
Example:
mctl server install survival-base -t paper -v 1.21.1 --memory 4G --eula-acceptOutput:
✅ Installed server 'survival-base' (type=paper, version=1.21.1)
Remove an existing server.
mctl server remove NAMEExample:
mctl server remove survival-baseOutput:
Removed server 'survival-base'
Display server information.
mctl server info NAMEExample:
mctl server info survival-baseOutput:
Server: survival-base
Type: paper
Version: 1.21.1
Memory: 4G
Status: stopped
Start a Minecraft server.
mctl start NAMEExample:
mctl start survival-baseOutput:
Starting server 'survival-base'...
Server running on port 25565
Stop a running Minecraft server.
mctl stop NAMEExample:
mctl stop survival-baseOutput:
Stopping server 'survival-base'... Done.
Manage server properties.
Set a configuration value in server.properties.
mctl config set SERVER KEY VALUEExample:
mctl config set survival-base motd "Welcome to Survival!"Output:
Updated 'motd' = "Welcome to Survival!" in survival-base/server.properties
Retrieve a configuration value.
mctl config get SERVER KEYExample:
mctl config get survival-base max-playersOutput:
max-players = 20
mctl init
mctl server install base --eula-acceptCreates a full environment and installs the latest vanilla server.
mctl server install test -v 1.21.1 --first-start
mctl config set test online-mode false
mctl start testSets up a test server, disables online mode, and starts it for testing.
mctl start creative
mctl start survival
mctl config get survival motd
mctl stop creativeAllows parallel management of different servers from one CLI.
mctl stop survival
mctl config set survival max-players 10
mctl start survivalStops, updates, and restarts a production server safely.
🧾 License
MIT License © 2025 See LICENSE for details.
