You can put an AI in your Minecraft world tonight, running entirely on your own graphics card. No API key, no subscription, no data leaving the house. It will join like a real player — with a body, an inventory and hands — and it will genuinely try to help you.
It will also fail in two ways that produce no error message at all. Both cost us an evening. This guide exists mostly so they don’t cost you one.
What you need
- Minecraft: Java Edition (Bedrock and consoles won’t work — see the note at the end)
- Mindcraft — connects a language model to the game through Mineflayer, a library that lets code play as a player
- Ollama already serving, and Node.js
- A model. The purpose-built one is Andy-4, an 8-billion-parameter model fine-tuned for Minecraft agent play by a solo developer on a single RTX 3090 over three weeks.
An 8B model needs roughly 6–7 GB of VRAM at a q5 quantisation, so this works on far less hardware than most local-AI projects. Check what your machine can run →
Run a local server, not “Open to LAN”
The obvious move is to open a single-player world to LAN and point the bot at it. That doesn’t work: a LAN world is authenticated, and your bot has no Microsoft account to log in with.
Run a small local server in offline mode instead. It takes two minutes, and it gives you a persistent world that survives between sessions — which matters more than you’d think once you start testing.
online-mode=false
server-port=25565
spawn-protection=0
allow-flight=true
spawn-protection=0 lets the bot build near spawn; allow-flight=true stops the anti-cheat from
kicking it when Mineflayer’s pathfinding does something optimistic. Your normal Minecraft client
connects to it exactly as it would to any server.
Silent failure #1: the chat template
This is the one that will make you think the whole project is broken.
Every model on Ollama carries a chat template — the pattern that wraps your system prompt and
messages into the exact format the model was trained on. Pull up the template for the Andy-4 build on
Ollama and you find a DeepSeek template, written in Jinja, using DeepSeek’s special tokens
(<|User|>) — on a model built from Llama 3.1, served by Ollama, which renders Go templates.
It never renders. And Mindcraft’s system prompt — the documentation for every command the bot can use, plus its world state and inventory — is thrown away before the model reads a single word of it.
The symptom is not an error. The bot joins, chats vaguely, repeats itself, and never runs a command.
The fix is to rebuild the model with a correct Llama 3.1 template:
{{- if .System }}<|start_header_id|>system<|end_header_id|>
{{ .System }}<|eot_id|>
{{- end }}
{{- range .Messages }}
<|start_header_id|>{{ .Role }}<|end_header_id|>
{{ .Content }}<|eot_id|>
{{- end }}<|start_header_id|>assistant<|end_header_id|>
Create a derived model with that template and point your bot profile at it. The difference is immediate and total: commands start firing on the very next message.
The community that maintains the most active Mindcraft fork, mindcraft-ce, warns about this directly — their guidance for the Andy models is to avoid Ollama and use LM Studio instead. That’s a reasonable path too. But if you’d rather stay on Ollama, fix the template.
Silent failure #2: the context window
There’s a second one hiding behind the first.
Andy-4 ships with num_ctx set to 8192, even though the architecture supports 131,072. Mindcraft’s
system prompt is enormous — every command documented, plus the state of the world around the bot — so
at 8k your actual message is pushed out of the window before the model ever reads it.
Same symptom. No error. Silence.
Rebuild at 32k and it behaves. If a local model ever goes quiet on you for no visible reason, check the baked-in context setting before anything else — a model’s parameters can quietly cap it far below what the architecture supports.
The setting to leave alone (for now)
Mindcraft has an option called allow_insecure_coding. Turn it on and the model can write and execute
its own code on your machine to do things the built-in commands can’t — which is where the impressive
freeform building in other videos comes from.
The project’s own documentation says the sandbox is still vulnerable to injection attacks, and warns against connecting a bot with it enabled to any public server. We left it off, which is why our bot never built anything clever. If you turn it on, use a throwaway world and know exactly what you traded.
What it actually does — honestly
With both bugs fixed, here is what an 8B model on one consumer GPU really does.
It acts. Individual commands work: pathfinding to you, following, searching for blocks, gathering, crafting. And the genuinely impressive moment — it asked to craft a wooden pickaxe, the recipe failed for want of sticks, it noticed, crafted sticks, and crafted the pickaxe. A plan, a failure, a diagnosis and a correction, offline, on hardware you own.
It cannot hold a goal. It crafted six pickaxes, announcing “total three pickaxes now,” because nothing in the system ever told it the task was complete. Asked for ten oak logs, it followed us instead. Asked to craft a pickaxe and drop it, it crafted one and kept it. Told to “come here,” it replied with an observation about the terrain. It mangled our username in every single message.
That gap is the honest state of local agent models in mid-2026: capable of steps, not of plans.
And the fix isn’t a bigger model. It’s scaffolding. There’s a fork, mindcraft-mcgavin, built by someone who hit exactly this wall — and what he added tells you everything: a goal queue, persistent rules, a confidence engine, and prompts budgeted to fit a small context window. Bookkeeping, not intelligence.
A note on consoles
Xbox, PlayStation and Switch run Bedrock edition. Mindcraft needs Java, and a vanilla Java server can’t accept Bedrock clients. If you want to play from a console you’d need a plugin server running GeyserMC and Floodgate — doable, but a bigger project than this guide.
Is it worth doing?
As a co-op partner, not yet. It’ll follow you, chat, chop a tree and forget why.
As a way to feel exactly where local AI agents actually are — and to have something genuinely entertaining running on a spare GPU — it’s the cheapest and most instructive afternoon in local AI right now. It costs nothing to run, works with the internet unplugged, and nothing you type leaves your house.
Related: which GPU do you need · running a local LLM with Ollama · building local AI agents
