Set up Mindcraft with any model
Mindcraft is an LLM-driven Minecraft bot built on Mineflayer. These steps follow the official README.
Requirements
- Minecraft Java Edition (README: up to v1.21.11, recommends v1.21.6)
- Node.js v18 or v20 LTS (README warns v24+ may break native dependencies)
- An API key for one provider, or Ollama for local models
Install and run
- Download the latest release or clone the repo.
- Rename
keys.example.jsontokeys.jsonand fill in the key for your provider (you only need one). - Run
npm installin the folder. - Start a world and Open to LAN on port
55916. - Run
node main.js.
Switching models
Set the model field in a profile such as andy.json, e.g. "model": "gemini-2.5-pro". Each provider needs its key in keys.json:
| Provider | keys.json variable |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Google Gemini | GEMINI_API_KEY |
| Anthropic | ANTHROPIC_API_KEY |
| xAI (Grok) | XAI_API_KEY |
| DeepSeek | DEEPSEEK_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| Groq (not Grok) | GROQCLOUD_API_KEY |
| Ollama (local) | none |
Free local option
Install Ollama, then pull Mindcraft's fine-tuned model:
ollama pull sweaterdog/andy-4:micro-q8_0 && ollama pull embeddinggemma
Safety
Code writing is off by default. The README warns not to connect to public servers with allow_insecure_coding enabled, because LLM-written code runs on your computer.
Joining an online server
Set host/port in settings.js. You need an official Microsoft/Minecraft account for the bot, and the profile name must exactly match the Minecraft account name.
Sources: Mindcraft README · Mindcraft FAQ