Explore Minecraft server internals from a desktop app, the command line, or your coding agent.
Lantern is not an official Minecraft product. It is not approved by or associated with Mojang or Microsoft.
Getting started · Usage · MCP setup · Development
- Browse decompiled Java, trace method calls, and inspect field references, tags, and registry keys.
- Compare source code and datapack files between Minecraft versions.
- Search by keywords or meaning with local embedding models and rerankers.
- Ask a chat model to investigate the code using Lantern's tools.
Build the CLI and MCP server with Rust and Cargo. Install Java 21 or newer for decompilation, then run the interactive setup:
cargo build --release --locked -p lantern-cli -p lantern-mcp
./target/release/lantern setupSetup downloads selected Minecraft versions from 26.1 onward, decompiles them with Vineflower, builds indexes, and optionally generates embeddings. Chat configuration is optional.
The desktop app runs on Linux, Windows x86_64, and Apple Silicon macOS. Install development libraries for GTK 4.22+, Pango 1.56+, and GtkSourceView 5, plus GLib development tools. On macOS:
brew install gtk4 gtksourceview5 pkgconfOn Windows, install Rust's MSVC toolchain and Visual Studio's Desktop development with C++ tools, then dot-source the GTK setup script in PowerShell:
. ./scripts/setup-windows.ps1The script downloads a pinned, checksum-verified gvsbuild GTK stack and configures the current shell. Run it again in each new PowerShell session. Then, on any supported platform:
cargo run --release --locked -p lantern-uiThe first-run wizard guides you through versions, models, and optional chat setup. Indexes, models, and settings live in Lantern's platform data directory. Commands use the selected version's index; --db or LANTERN_DB overrides it.
./target/release/lantern class Creeper
./target/release/lantern callers Creeper.tick
./target/release/lantern ask "How do villagers summon an iron golem?"
./target/release/lantern compare 26.1 26.2 Creeper
./target/release/lantern --helpSemantic search requires embeddings. Comparison accepts two downloaded, decompiled versions or two source directories. The desktop app provides the same browsing, search, and comparison workflows.
Index an existing JAR and source tree
Use the inner server JAR containing net/minecraft classes. Sources and datapack data are optional; their directories should contain net/ and minecraft/, respectively.
./target/release/lantern index --jar /path/to/server-inner.jar \
--src /path/to/decompiled --data /path/to/data --version VERSIONAfter setup, register Lantern with your coding agent. The chosen client's CLI (claude or codex) must be available on PATH:
./target/release/lantern setupmcp claudecode
./target/release/lantern setupmcp codexRun the command for your client, then start a new session and use /mcp to check the connection. Claude Code registration uses user scope. You can also inspect registration with claude mcp get lantern or codex mcp list.
Lantern locates lantern-mcp beside its CLI and registers absolute paths to the server and selected index. Use --mcp-bin /path/to/lantern-mcp or --db /path/to/lantern.db to override them. The client starts the stdio server automatically.
Important
The MCP server is for your own agent on your own machine. Do not host it on the internet or offer it as a service: it hands decompiled Minecraft code to whoever queries it. See Disclaimer.
Try: “Use Lantern to inspect Creeper and trace its explosion logic to the Java source.” See the Claude Code and Codex MCP documentation for client configuration.
With the desktop build dependencies installed:
cargo check --workspace --all-targets --locked
cargo clippy --workspace --all-targets --locked
cargo test --workspace --locked
cargo +nightly fmt --all -- --checkFormatting requires nightly Rustfmt for crate-level import grouping. CI also lints GitHub workflows with actionlint. Clippy currently reports warnings without treating them as errors.
Setup → About shows the app version and checks published stable releases on request. The CLI reports its version with lantern --version.
GitHub Actions builds CLI/MCP and desktop archives for Linux, Windows, and macOS. GTK is a separate runtime dependency. Matching version tags create draft releases after checks pass. See release instructions for publishing and platform-specific runtime requirements.
Lantern is not an official Minecraft product. It is not approved by or associated with Mojang or Microsoft.
Lantern contains no Minecraft code. It downloads the server from Mojang's own servers to your machine and decompiles it there, for your personal use. The Minecraft EULA applies to the game files and everything made from them.
- Keep it to yourself. Do not share or publish the server jar, the decompiled sources, the indexes (
index.dbholds the decompiled code) or the vectors made from them. That includes uploading them to a repository or attaching them to a release. - Run the MCP server locally. It is meant for your own coding agent over stdio. Do not host it, expose it on a network, or offer it as a service to others.
- Mind where the code goes. With a cloud chat model or a cloud coding agent, the code Lantern looks up is sent to that provider. Use a local model if that is a concern.
Licensed under GPL-3.0-only. Bundled Lucide icons, IBM Plex Sans, and Lilex retain their respective licenses.