r/ComputerCraft • • 14d ago

I updated CraftOS to work as an MCP server for ai assisted coding. (Not here to debate AI.)

0 Upvotes

Okay so first before anything. If you don’t like AI or don’t like seeing it then just don’t use the tool and move on. This won’t be for everyone. This tool is also useful if you don’t use AI but the MCP part of it is the main reason I made it. I truly do not want to hear the same back and forth arguments about how bad AI is or is not. This post is not the place for it.

But if you DO use coding agents this makes your computer craft coding sessions SUPER reliable. if you use Claude Code / Cursor / Copilot for CC stuff you know the problem: it writes Lua it has never run, and you find the bugs when you try to run it in game. And then you’re sitting there trying to describe the issues to the agent and it can’t actually view the errors itself so it guesses and you go back and forth with it.

so I made craftos-mcp, a CC:Tweaked emulator the agent can drive itself. it runs the program, reads the terminal and monitors, taps buttons, changes the world under it (player walks up, chest fills, train arrives at a Create station, Mekanism reactor heats up, an hour passes) and writes and runs `*.test.lua` files, then fixes what broke and goes again until it actually works. in the video the agent tests and fixes a door controller, then I drop the same file into real minecraft and it works first try, zero code changes. setup is one line: `npx -y craftos-mcp serve`

it simulates rednet between several computers, turtles in a real block world, and peripherals from Advanced Peripherals, Create, Mekanism, Tom's Peripherals and Bigger/Extreme Reactors (MC 1.18.2, 1.20.1 partly). each mod is a switch so the agent only gets the ones your pack has

works without AI too: a window like CraftOS-PC, a browser tab with world buttons, or `craftos-mcp test` in CI. and some games I built with it are playable in the browser: https://rogiedoji.com/craftos

every difference from the real game is a bug to me, so tell me if you find one. engine is forked from CraftOS-PC, thanks JackMacWindows

https://github.com/Akkiruk/craftos-mcp


r/ComputerCraft • • Jan 25 '26

Sto creando uno script per gestire piu colonie usando ae2 minecolonies advanced peripherals e CC:tweaked sono quasi giunto al termine e penso di condividerlo a breve se qualcuno fosse interessato e avesse capacita di scrivere in lua mi scriva

Thumbnail reddit.com
0 Upvotes

r/ComputerCraft • • Jul 10 '25

YOUCUBE?????

0 Upvotes

i suck at coding and just want to have youcube in my world but it doesnt work. pls guide me throgh how to do it


r/ComputerCraft • • Jun 03 '25

java

1 Upvotes

Is there an addon that adds Java lenguage to CC: Tweaked?


r/ComputerCraft • • Sep 15 '26

Can y'all help me make an os?

0 Upvotes

I'm using cc tweaked for 1.21.1 btw To be specific i want help coding scripts i can use to control various parts of a base and general cc tweaked help. Sorry for the misleading title, i was dumb when i wrote it. This post will now be used to monitor my progress, please only comment if you have general advice.


r/ComputerCraft • • May 27 '15

Im an absolute layman, but I just want to make an AI.

0 Upvotes

I just want an AI like Jarvis or Murthar will mulitple monitors around my house and when I adress this "Jarvis" he will type back in chat or something like that. An AI to interact with anyway!
I found this! http://pastebin.com/N7fnvZ2t#
How would I apply this in CC, what do I type into the comp?


r/ComputerCraft • • Nov 12 '23

I made a mobile operating system.

0 Upvotes

No idea what I should add, I have a clock, random number generator, command list, shutdown command and i have no idea what i should add.

https://youtu.be/qUeAzBLPnMc?si=ygnGBarYDaXOIfPc


r/ComputerCraft • • Dec 22 '20

casino

0 Upvotes

I’m using ottomated source code for blackjack but for cashier he uses a vaccumator I think it’s called from thermal expansion i dont have that in the mod pack I’m using I’m wondering what’s a fix to this it won’t move to second screen


r/ComputerCraft • • Jul 27 '24

Too long without yielding (CC:Tweaked)

Post image
2 Upvotes

I was trying to play dfpwm files using the terminal, the first like 3 seconds play Well but then i got this too long without yielding error presicely "ain/cc/audio/dfpwm.lua:190: Too Long without yielding

I mean I know what this error means but I Was wondering If there Is a way to increase this timeout or Something like modifying the config file Please help me I can't Get a script to run


r/ComputerCraft • • May 19 '23

code for scrolling marquee, courtesy of ChatGPT

0 Upvotes

I was chatting with the ol' ai (sorry if these posts are getting redundant) but I asked it to make a computercraft function for me.

This is a scrolling marquee where the x,y position is provided, a max length a time index, a waittime, and text

it bounces a string back and forth within the length on the screen, waiting at the beginning and end for the time specified in waitTime. I suspect times need to be in whole integers for this to work correctly.

Here's the full conversation. https://sharegpt.com/c/gjQv1g8

and the TL;DR;

	function bouncingMarquee(x, y, maxWidth, time, title, waitTime)
			-- Get the title length
			local titleLength = #title

			-- If the title is shorter than maxWidth, center it
			if titleLength <= maxWidth then
			    local offset = math.floor((maxWidth - titleLength) / 2)
			    x = x + offset -- Adjust the x position to center the text
			    term.setCursorPos(x, y)
			    term.write(title)
			    return -- Early exit
			end

			-- Calculate the marquee position, considering bounce at both ends and the wait time
			local totalTravel = (titleLength - maxWidth + 1) * 2 + waitTime * 2
			local position = time % totalTravel
			if position >= waitTime and position < titleLength - maxWidth + 1 + waitTime then
			    position = position - waitTime
			elseif position >= titleLength - maxWidth + 1 + waitTime and position < totalTravel - waitTime then
			    position = totalTravel - waitTime - position - 1
			else
			    position = 0 -- during wait time, we show either start or end of the title
			end

			-- Extract the substring to display
			title = string.sub(title, position + 1, position + maxWidth)

			-- Move the cursor to the desired position and print the display string
			term.setCursorPos(x, y)
			term.write(title)
	end


	for i=0,1000 do
		bouncingMarquee(1, 1, 20, i, "This is a test of the marquee system, it should be long and bouncing", 1)
		os.sleep(0.1)
	end


	term.write("\n")

maybe someone else would find it useful!


r/ComputerCraft • • Sep 19 '20

I need a ComputerCraft sorting program.

1 Upvotes

Hello , I need a sorting program . Do you have one?


r/ComputerCraft • • Jun 16 '26

Bee Movie copypaste in the computer chunkbanned me.

6 Upvotes

I was being very funny and hilarious and i was going to print the whole bee movie. DONT.

lost my 3 month hardcore world with no backups.

:/


r/ComputerCraft • • Jan 06 '25

How would i reset the torch/step counter back to 0?

Thumbnail
pastebin.com
0 Upvotes

r/ComputerCraft • • Sep 13 '23

How to get command output

0 Upvotes

How to get command autput and send it trought websocket

Here is code

local ws, err = http.websocket("wss://localhost")
local send = turtle.forward()

if ws then
while true do
local msg = ws.receive()
print(msg)
if msg then
local func = loadstring(msg)
if func then
local success, errMsg = pcall(func)
if not success then
print("Error while executing Lua function:", errMsg)
else
if send == msg then
print("done")
else
print("send")
local send = textutils.serialise(msg)
if send == msg then
print("not")
else
ws.send(send)
end
end
end
else
print("Invalid Lua function received.")
end
else
print("Failed to receive a message from the server.")
ws.close()
break
end
end
else
print("WebSocket connection error:", err)
end


r/ComputerCraft • • Dec 23 '21

Tape

0 Upvotes

I tried installing tapes but when i try to write one it says not installed.


r/ComputerCraft • • Jul 27 '23

GUI Programs ?

0 Upvotes

How to create programs with which I was trying to create a control to turn a farm on and off but I wanted to use buttons

I'm a beginner in Computercraft and also in the Lua language


r/ComputerCraft • • Sep 09 '24

How do i make a game engine?

3 Upvotes

So i want to make a game engine in game for a in-game souls like experience but i don't know how i would do that rn any help?


r/ComputerCraft • • Sep 28 '25

How many computers must run to make minecraft lag?

5 Upvotes

r/ComputerCraft • • Apr 29 '15

Build me a computer around graphics card

0 Upvotes

I have just been gifted a

MSI GTX 970 GAMING 4G GeForce GTX 970 4GB 256-Bit GDDR5 PCI Express 3.0 x16 HDCP Ready SLI Support G-SYNC Support Video Card

This will be my first time building a computer so I would like to hear from you on which hardware I should purchase in addition to the gtx 970. My budget is around 700$ but might be willing to add a hundred or so if it makes a difference. So let me know what you would do and where you would start if making a game machine based off this info. Ideally monitor and keyboard/mice are included.


r/ComputerCraft • • Sep 10 '26

Made a small tool for converting images to CC:Tweaked .nfp files in one go....

2 Upvotes

Made a small browser tool for CC:Tweaked that converts images to .nfp and generates Lua display code.


r/ComputerCraft • • May 11 '20

Peripherals++ nano swarm help

2 Upvotes

I’m currently trying to figure out how to use mostly the nano swarm from peripherals++. I am trying to first find out how to do the commands which I found. But the getInfectedEntity is asking for a number not a string so I’ll pan it out for you right below (I’m trying to use an example code from another thread)

antenna = peripheral.wrap(“top”)

Zombie = antennae.getInfectedEntity(“Zombie”)

Zombie.heal()

When ran it returns

Program:3: Bad argument #1 (expected number)

This is confusing as I’ve tried a lot of numbers and even the “entity ID” of a zombie (52:54) and tried the : doesn’t work so I tried 52.54 nothing happened I also tried just 54 and just 52. I looked into the Minecraft wiki and tried 32 didn’t work. So I’m more or less asking what is supposed to be there.

Some rules for answering A. Do not refer me to the wiki with no explanation- that does not help me B. Do not give me a code that does not have a physical ID- I more than have the actual code down but cannot wrap my head around what the number is supposed to be C. If you give me a code PLEASE try to test it- I would like to not have to tinker with the code and if it is a theoretical code please state that

Sorry for the wall of text though I think it can help get me the best answer possible not able to be explained by other threads


r/ComputerCraft • • Dec 27 '24

just made a server with CC tweaked, create, and more

2 Upvotes

please only join if you have time.

Its free to join with no micro transactions or anything!

https://discord.gg/PUWVAxuwSg


r/ComputerCraft • • Aug 06 '24

Looking for someone to make a YT vid for my app

0 Upvotes

i digress to much and have no software nor skills available to make a YT video, yet i need one to promote the program and what it can do, sure there's text, entire walls of text, but these days you need a videoclip and not just a song!

so, anyone willing to make such a video? as long as you don't overdo the ads i won't mind, i just want the video itself available to the public. intrested? reply here or send me a DM

the program in question is an OS -like app with network functions, should give at least a couple minutes of good content, might even be able to make a few videos depending on the level of detail you're willing to do.


r/ComputerCraft • • Oct 09 '16

Introduction To Computing - C1L1 - How Computers do math

Thumbnail
youtube.com
2 Upvotes