Environment variables
This page lists the MCRS_* environment variables that the server, developer tools, tests, benchmarks and build read, with their defaults. The server reads 16 of them. The variables of the client are on Client variables.
Public client plugin fields, including ClientRegistriesPlugin.defer_definitions, are described under Library configuration.
Server
Section titled “Server”The mcrs server binary reads the variables in the table below. When a variable is not set, the server uses the default. When a value does not parse, the server writes a warning to the log and also uses the default. MCRS_FORWARDING and MCRS_PROXY_UPSTREAMS are stricter. A value that does not parse stops the server, and so does MCRS_FORWARDING turned on with an empty MCRS_FORWARDING_SECRET. Connections, proxies and operators shows how to put the server behind a proxy with these three variables. The code is ServerSettings::read in crates/mcrs_minecraft_server_settings/src/server_settings.rs, which src/main.rs calls.
A variable that is on or off accepts on, 1, true or yes for on, and off, 0, false or no for off, in upper or lower case. Whitespace around a value is removed before it is read.
| Variable | Default | What it does |
|---|---|---|
MCRS_PORT |
25565 |
Port to listen on. The server listens on all interfaces (0.0.0.0). Allowed: 1 to 65535. |
MCRS_COMPUTE_THREADS |
plugin default | Size of the compute thread pool. A positive number. |
MCRS_WORLD_SEED |
0 |
World seed, signed or unsigned 64-bit. A negative seed keeps its bits, like a Java long. |
MCRS_WORLD_PRESET |
normal |
World preset, short (flat) or namespaced (minecraft:flat), lower-cased. |
MCRS_DEFAULT_GAMEMODE |
creative |
Game mode of a new player: survival, creative, adventure or spectator. |
MCRS_MOB_AI |
on | Whether mobs think. Off removes the mob brain plugin. |
MCRS_LAN_ANNOUNCE |
on | Whether the server announces itself on the local network. A server that listens on loopback never announces. |
MCRS_COMPRESSION_THRESHOLD |
256 |
Packet size in bytes from which packets are compressed. A negative number turns compression off. |
MCRS_ACCEPT_TRANSFERS |
off | Whether the server accepts players that another server transfers. |
MCRS_ENABLE_STATUS |
on | Whether the server answers status requests (the server list ping). |
MCRS_HIDE_ONLINE_PLAYERS |
off | Whether the status leaves out the names of online players. The counts stay. |
MCRS_FORWARDING |
off | Whether the server takes the player’s UUID, name, profile properties and address from a Velocity proxy (modern forwarding). When it is on, every login must come through the proxy. |
MCRS_FORWARDING_SECRET |
empty | The secret that the server shares with Velocity. The server uses the value exactly as it is and does not trim whitespace. |
MCRS_PROXY_UPSTREAMS |
empty | Exact IP addresses of trusted proxies, separated by commas. A connection from one of them must start with a PROXY protocol header, version 1 or 2, and the server takes the client address from that header. Leave the variable unset to turn the feature off. An empty value stops the server. |
MCRS_LOCAL_PACKS |
none | Comma-separated names of extra local data pack folders; see Add and check data packs for selection, precedence and validation. |
MCRS_SPAWN |
none | Join position as x,y,z in blocks, also read by the integrated server; see join-position rules. |
The server also reads ops.json, whitelist.json and ban files from the working directory. Those are files, so this table does not list them.
Developer tools
Section titled “Developer tools”The MCP launcher’s client workflow is described in Automate the client.
| Variable | Default | What it does |
|---|---|---|
MCRS_MCP_SESSION |
current directory | Session name for command-line calls to mcrs_minecraft_mcp. --session takes precedence. Handles belong to their session, and stop refuses another session’s handle unless forced. Stdio MCP servers use their own session. |
Tests, benchmarks and build
Section titled “Tests, benchmarks and build”| Variable | Used by | What it does |
|---|---|---|
MCRS_BLESS |
tests of mesh, render shader layouts, entity model and entity animation | 1 rewrites the generated or expected files. Model and animation tests accept any set value; mesh and shader-layout tests require exactly 1. Without it, stale files fail the check. |
MCRS_JAR_WORKERS |
online download test of the client jar crate | Number of download workers, default 4. This does not set the workers of the client binary. |
MCRS_CLIENT_JAR |
entity render test | Path to the client jar. |
MCRS_VANILLA_SERVER_JAR, MCRS_SCENE_CLIENT, MCRS_SCENE_ENTITIES |
scene_frames test of the client |
Server jar, another client binary, and where scene entities come from: summon, record or skip (the default). |
MCRS_MOLANG_CORPUS, MCRS_GPU_FUZZ_PROGRAMS |
Molang tests | Path to the corpus file, and the number of fuzz programs (default 10000). |
MCRS_BENCH_WORLD, MCRS_BENCH_AREA |
random_ticks_save bench |
A saved world directory, and <dimension> <x> <z> <radius> to load only that area. The center coordinates are blocks; the radius is columns. Without a world directory the bench skips the run. |
MCRS_BIN |
mob-bench/run.sh |
Path to the mcrs binary. The bench sets the server variables itself. |
MCRS_VANILLA_SERVER |
vanilla-server/run.sh |
Address of a vanilla server that the script gives to the mcrs join test. |
MCRS_DRAW_ONLY, MCRS_GPU_HOT, MCRS_SPLIT_DRAW |
stress_field example of entity render |
Draw only full_rigs or impostors, GPU hold workgroups (default 16384), and split the draw in two passes. |
MCRS_COMMIT_HASH |
build time of the network crate | Commit hash that the server reports. The crate reads it with option_env! when it is built, so the value at run time does not matter. |
Footnotes
Section titled “Footnotes”Sources and verification
Verified: 26.4-snapshot-7, 1cf84286c, 2026-11-30
- crates/mcrs_minecraft_server_settings/src/server_settings.rs
- src/main.rs
- docs/spec/proxy-forwarding.md
- docs/spec/proxy-protocol.md
- crates/mcrs_minecraft_client/src/dev_knobs.rs
- crates/mcrs_minecraft_client/src/native.rs
- crates/mcrs_minecraft_client_jar/src/native.rs
- crates/mcrs_minecraft_client_world/src/registries.rs
- crates/mcrs_minecraft_engine_server/src/server_network_plugin.rs
- crates/mcrs_minecraft_engine_shared/src/whitelist.rs
- crates/mcrs_minecraft_engine_shared/src/banlist.rs
- crates/mcrs_minecraft_mesh/src/pack.rs
- crates/mcrs_minecraft_render/src/shader_layout_emit.rs
- crates/mcrs_minecraft_entity_model/tests/it/mob_assets.rs
- crates/mcrs_minecraft_entity_animation/tests/it/mob_assets.rs
- crates/mcrs_minecraft_entity_render/tests/it/gpu/impostor_flip.rs
- crates/mcrs_minecraft_client/tests/scene_frames/main.rs
- crates/mcrs_minecraft_client/tests/scene_frames/run.rs
- crates/mcrs_minecraft_client/tests/scene_frames/client.rs
- crates/mcrs_molang/tests/it/corpus.rs
- crates/mcrs_molang_wgsl/tests/it/corpus.rs
- crates/mcrs_molang_wgsl/tests/it/gpu_fuzz.rs
- crates/mcrs_minecraft_server/benches/random_ticks_save.rs
- tools/mob-bench/run.sh
- tools/vanilla-server/run.sh
- crates/mcrs_minecraft_entity_render/examples/stress_field.rs
- crates/mcrs_minecraft_network/src/identity.rs
- tests/it/vanilla_server.rs
- issue #82
- crates/mcrs_minecraft_client/src/local_server.rs
- crates/mcrs_minecraft_server/src/lib.rs
- crates/mcrs_minecraft_datapack/src/root.rs
- crates/mcrs_minecraft_engine_server/src/configuration.rs
- crates/mcrs_minecraft_engine_player/src/consume_inbound_player_spawn.rs
- tools/mcrs_minecraft_mcp/README.md
- tools/mcrs_minecraft_mcp/src/main.rs
- tools/mcrs_minecraft_mcp/src/handle.rs