Skip to content
Get started

Minekube Games overview

View as Markdown

Minekube Games lets you write Minecraft games in TypeScript and Effect against the server’s real API, and change them while you play. Save, and the running Paper server swaps your game on the next tick while players stay connected. Every session is recorded as data: the devtools show it live, your coding agent reads it through MCP, and your tests replay it.

  • A plugin on the server. The Minekube plugin on Paper hosts your game in GraalJS. It loads each new bundle in a fresh context, and swaps only once it has loaded, so a broken bundle never replaces a working one.
  • Paper’s API as it is. Your game calls Paper’s own classes, typed from the server’s jars with their real names, overloads and nullability. There is no wrapper and no projection in between.
  • Effect for the game’s logic. Listeners, timers, fibers and commands belong to the scope of one revision of your game. When it is replaced, the scope closes and everything is cleaned up.
  • Rules apart from the server. A game is an Effect UI component: rules that import no Java, and a server half that turns Paper events into messages and implements Commands with Paper calls. The rules run in Bun, so you test them without a server.
  • Every session recorded. Each revision writes its messages, Model changes and Commands to a recording. Copy one into your project, and bun test replays it through your current rules.

Install the Minekube CLI once from the Minekube distribution:

Terminal window
bun add -g https://github.com/minekube/minekube/releases/latest/download/minekube-cli.tgz

Then mk init creates a project with everything above. Its SDK packages, @minekube/paper for a game and @minekube/velocity for a proxy bundle, come from the Minekube distribution, like the CLI.

Path Holds
src/<Name>.ts The rules: Component.define(...).logic(...) and the Command declarations
src/game.ts The server half: Paper events to messages, Command implementations, export default Paper.make(...)
src/<Name>.test.ts Stories and recording replays
recordings/*.ndjson Real sessions from the server, replayed by the tests
proxy/ A proxy bundle for the Velocity proxy, built the same way, if you asked for one
AGENTS.md, .agents/skills/minekube-games/ Instructions and the Minekube Games skill for your coding agent
.mcp.json The devtools’ MCP server, for your coding agent
types/paper, types/velocity The Paper and Velocity types, @minekube/paper-types and @minekube/velocity-types, for the platform versions vite.config.ts names. mk types (and mk dev . first) generates them; never edit them.
  • Paper’s API as it is. Use its classes, names and overloads directly. Don’t wrap or rename them.
  • Rules without the server. The rules module imports no Java, so it runs in Bun under Stories and replays. Paper appears only in src/game.ts.
  • Messages are data. Use the generated Schemas from @minekube/paper-types/schemas for Java values such as player UUIDs and enums.
  • No plugin code. If something cannot be done through the server’s API from TypeScript, it is a missing capability of the Minekube plugin. Report it to Minekube instead of working around it.
  • One dev server. Reuse the running one; your game reloads on save.

The proxy in front of your servers is code too. A proxy bundle runs in Velocity with the same runtime model: /lobby, kick fallback and routing between servers, swapped on save. Velocity finds its servers by labels and selectors, so a server can restart under a new key or run on another host and stay reachable.

Games is one of three Minekube products, and the other two take your game to players. The platform overview shows how they fit together.

  • Connect groups your servers into a network that players join at one address, through relays, with no open port. Deploy a version rolls your game out to the servers a label selector picks.
  • Minekube Cloud runs the servers on the Akua platform, on your machines or ours, from a free trial server to your own Kubernetes cluster.

Was this helpful?