CASE STUDY / 01 Released · v0.5.0

modn.

Mod manager for Cyberpunk 2077 on Windows.

A Rust CLI with a game-agnostic core and per-game rules written in Lua. It installs mods as transactions, so uninstall, update and rollback remove only the files it owns.

  • Rust
  • Lua
  • MCP
CASE STUDY

The problem

Modn manages mods for Cyberpunk 2077 on Windows. A manager writes files into a game installation, and a later uninstall must know which files are safe to remove.

Files installed by hand stay unmanaged. A conflicting package needs those files removed first.

CASE STUDY

How it works

The Rust core is game-agnostic. A Lua module in the official main bucket supplies the rules for each game.

Modn reads mod manifests from buckets, like Scoop. The official main bucket holds the first-party game modules and the Cyberpunk catalog.

  • Finds a registered game and reports the mods on disk, managed or not.
  • Installs ZIP and 7z packages from a bucket or a local file.
  • Runs every install as a transaction over one game installation.
CASE STUDY

Safe lifecycle

Every install has a dry run that you can review before it writes files.

Modn records each file it writes. Uninstall, update and rollback remove only what Modn owns.

An interrupted transaction blocks further writes until modn recover --yes rolls it back or finishes cleanup. If a recorded file changed, recovery stops and leaves it in place.

Modn adopts matching manual files only after explicit acknowledgement. Adoption records file claims and archive provenance.

  • modn install cet --dry-run previews a package.
  • modn list reports managed mods on disk.
  • modn recover --yes repairs an interrupted transaction.
CASE STUDY

Supported packages

Modn supports legacy .archive, CET, RED4ext, redscript, ArchiveXL and TweakXL packages.

A supported multi-file package is installed and uninstalled under one ownership record.

Unknown or unsupported layouts block the whole package. Existing files keep their unmanaged state until you remove them.

CASE STUDY

Components

The CLI backend covers games, buckets, search, install, update, list and uninstall.

A Windows desktop app uses the same CLI backend.

A scoped MCP companion exposes CLI operations over stdio. It opens no network listener.

CASE STUDY

Install

Run this command in PowerShell without administrator rights. It installs modn.exe, adds it to your user PATH and runs modn bucket update. Open a new terminal before you use modn.

irm https://github.com/modn-org/modn/releases/latest/download/install.ps1 | iex
LOCAL MCP COMPANION

Use with your agent

modn-mcp exposes CLI operations over stdio. It opens no network listener.

Writes need the server flag --allow-writes and approved: true on each request. The client must obtain user approval first.

  1. Build both binaries from the same revision: cargo build --locked -p modn-cli -p modn-mcp.
  2. Create a manager directory named modn outside every game directory. Set LOCALAPPDATA to its parent, then provision the bucket and game: $env:LOCALAPPDATA = 'C:\ModnMcp'; target/debug/modn.exe --state-dir C:\ModnMcp\modn bucket update; target/debug/modn.exe --state-dir C:\ModnMcp\modn game add cyberpunk-2077 --path C:\Games\Cyberpunk2077.
  3. Start the companion with the CLI backend, state directory and approved roots: target/debug/modn-mcp.exe --backend C:\src\modn\target\debug\modn.exe --state-dir C:\ModnMcp\modn --allow-root C:\Games --allow-root C:\ModArchives.
  4. Configure a client that supports local MCP stdio servers. Use absolute executable paths and keep the backend and manager directory fixed for the server lifetime.

Source: https://github.com/modn-org/modn at v0.5.0