Repository navigation
Releases
craftos-mcp 0.2.0
Big one. Games, a browser version, and the start of newer Minecraft versions.
Games
Three cabinets of games written in plain CC Lua, with tests that play them through monitor taps:
- Board: Ultimate Tic-Tac-Toe, Four in a Row, Reversi, Checkers, Dots and Boxes, Mancala, Fleet and Codebreaker, with a computer opponent on three levels
- Action: Snake, Blocks, Bricks, Lander and Mines
- Versus: Paddle, Trails and Artillery, two computers playing one match over rednet
They're in workspace/examples/games, and there's a highlight reel in docs/media/showcase.
Play in your browser
The engine now builds for the browser too (web/). You can play all of the above at https://rogiedoji.com/craftos without installing anything.
Minecraft 1.20.1
Pick it with "version": "1.20.1", CRAFTOS_VERSION or --mc 1.20.1. You get CC:Tweaked 1.121.0's behaviour (it passes 1362 of CC's 1363 tests at that version), 1.20.1 turtle data, goto, the newer error messages and so on. The mods still act like their 1.18.2 versions for now, that's next. 1.18.2 stays the default and is unchanged apart from fixes.
npm
npx -y craftos-mcp serve sets itself up the first time (engine from this release, the ROM built from the official CC:Tweaked jar) and runs the MCP server. npx craftos-mcp window, app, test and run work the same way.
Fixes
os.queueEventcopies its arguments now, like the real game does, on every version- turtles keep to their 8 ticks per move when your PC is busy
- a long catch-up of a Mekanism plant no longer trips "too long without yielding"
- the Linux engine is built on Ubuntu 22.04, so it runs on 22.04 and 24.04 now, not just very new distros
- the emulator's own files are hidden from programs, and the
simcommand only exists on computers you're driving yourself
craftos-mcp 0.1.1
Small one, mostly about matching real CC more closely.
- Programs can't see the emulator's own files under
/romanymore.ls romlooks like it does on a real computer again, and shell completion stopped suggesting things that don't exist in game. peripheral.find,peripheral.wrap,peripheral.getMethodsandos.epochgive CC's exact error back when you pass them the wrong thing. They'd lost their argument checks.textutils.serialiseoutput stays in the same order from run to run, so snapshot tests don't flicker.- Back to passing CC:Tweaked's own test suite (all but one
os.datetest, which is a Windows C library limit).
Grab the engine zip below or just run npm run setup again.
craftos-mcp 0.1.0
First public release! This started as a way to test my own ComputerCraft programs without launching the game every five minutes, and it kind of grew from there.
It's a CC:Tweaked 1.101.3 emulator (Minecraft 1.18.2) with the world around the computer simulated too, so programs that talk to modems, turtles and modded peripherals actually have something to talk to.
Getting it running
git clone https://github.com/Akkiruk/craftos-mcp
cd craftos-mcp
npm run setup
Setup grabs the engine zip below for your OS, builds the CC:Tweaked ROM from the official jar (it can't be shipped here) and tells you what to do next. Windows and Linux only for now, sorry Mac people.
Ways to use it
craftos-mcp windowopens a computer in a window, like CraftOS-PC, with monitors in their own windowscraftos-mcp appdoes the same in your browser, with buttons for world stuff (players joining, chat, the clock)craftos-mcp testruns your*.test.luafiles, handy in CI- or hook it up to Claude Code, Cursor or VS Code as an MCP server and let the agent write and test things for you
- inside a computer you drive, type
sim join Aliceorsim advance 60to poke the world
Mods
Each one is an addon you can turn off, so you don't end up writing code against a mod your pack doesn't have.
- Advanced Peripherals 0.7.31r
- Mekanism 10.2.5 + Generators: QIO, the fission reactor (it really does melt down if you leave it), turbines, the induction matrix, factories and the rest
- Create 0.5.1: train stations with schedules, gauges, the display link, plus Crafts & Additions
- Tom's Peripherals 1.2.1, GPU included
- Bigger Reactors and Extreme Reactors
- plain CC energy and fluid storage, for any modded block
Known rough edges
- 1.18.2 only for now. Newer versions are the next big thing I want to do.
- Some mechanics are set up in the world file rather than simulated (Create's stress network, multiblock building, recipes). docs/accuracy.md has the honest list.
- If something acts differently than in the real game, please open an issue with the "Differs from the real game" template. Every difference counts as a bug.
Big thanks to JackMacWindows for CraftOS-PC, which the engine is forked from.