# craftos-mcp [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/Akkiruk/craftos-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 2281  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/craftos-mcp

## Description
CC:Tweaked (ComputerCraft) emulator for testing and AI agents: run, test and screenshot Lua programs, monitors, modems, turtles and modded peripherals, as an MCP server or a command line.

## Tools
Capabilities this server exposes over MCP:

- **craftos_run** — Run a program in a fresh computer: terminal and monitor text, PNGs, golden snapshots
- **craftos_test** — Run `*.test.lua` files with the `ccunit` harness

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "craftos-mcp": {
    "command": "npx",
    "args": ["-y","craftos-mcp"]
  }
}
```

## Documentation

## What craftos-mcp does

craftos-mcp runs CC:Tweaked programs inside an emulator rather than in a Minecraft instance. It can create computers with terminals, monitors, turtles, wireless modems, and files, then execute Lua code against a simulated block world. The environment also supports rednet communication between computers and selected peripherals and blocks from mods including Create, Mekanism, and Advanced Peripherals.

The MCP interface exposes two main operations. `craftos_run` starts a program in a fresh computer and returns terminal and monitor text, PNG output, and golden snapshots. `craftos_test` discovers and runs `*.test.lua` files with the `ccunit` test harness. An AI agent can use these operations to run code, inspect displays, trigger interactions, and repeat tests while developing a program.

## How it works

The emulator uses the CC:Tweaked ROM built from the corresponding official CC:Tweaked files. Programs run against a virtual computer and its configured world, so testing does not require Minecraft. The command-line interface can print a program's screen output or run a complete test suite; the desktop and browser-oriented app views provide monitors, world state, computer tabs, network activity, and a 3D block view.

World configuration can describe monitors, blocks, modded devices, players, fuel, and inventory contents. Multiple computers can communicate over rednet. The simulated clock can be paused, advanced by ticks or larger time intervals, or accelerated. Named snapshots save and restore the complete world, and worlds can be exported as `.craftos-world` files.

## Setup and configuration

The npm commands require Node.js 22 or newer and support Windows x64, Linux x64, and macOS 11 or later on Intel and Apple silicon. Run `npx craftos-mcp` from the folder containing the Lua files; that folder acts as the computer's disk. Installing the package globally also allows the `craftos-mcp` command to be used without `npx`.

Useful entry points include:

- `npx craftos-mcp run program.lua` to execute one program
- `npx craftos-mcp test` to run all matching tests below the current folder
- `npx craftos-mcp window` to open a computer window
- `npx craftos-mcp app` to use the broader computer and world interface
- `npx craftos-mcp setup --verbose` to show setup steps

The first run downloads the required CC:Tweaked files and builds the ROM for the selected Minecraft version. Project choices are stored in `craftos.json`, which is also read by the command line and an AI agent. The project can select a Minecraft version and enable the mods present in its modpack.

## Tools and capabilities

- Run programs in fresh virtual computers.
- Execute `*.test.lua` files through `ccunit`.
- Read terminal and monitor text and produce PNG or golden-snapshot output.
- Configure monitors, including their position and dimensions.
- Simulate turtle movement, digging, building, fuel, blocks, and inventories.
- Connect multiple computers with wireless modems and rednet.
- Interact with players, buttons, modded peripherals, and world state.
- Pause, accelerate, or advance simulated time.
- Save, restore, and export complete worlds.

## Limitations and notes

The emulator is intended for CC:Tweaked development and testing, not as a Minecraft server. Compatibility depends on the selected Minecraft version, enabled mods, and the behavior implemented by the emulator. The project reports high coverage of CC:Tweaked's own tests and compatibility with a range of community libraries, programs, and operating systems.

The initial setup downloads CC:Tweaked files from the official source and may take about a minute. macOS may require manually approving the unsigned desktop application on first launch. The npm distribution targets Windows x64, Linux x64, and macOS 11 or newer.

_Full upstream README: https://allmcps.com/mcp/craftos-mcp/readme_

