Skip to content

AI-driven vibe based Minecraft building via MCP. Describe a build, watch your agent construct it in Minecraft.

License

Notifications You must be signed in to change notification settings

amenti-labs/vibecraft

Repository files navigation

VibeCraft logo

VibeCraft

AI-Powered Minecraft Building β€” Build structures through natural-language conversations with Claude.

License: MIT Python 3.10+ Minecraft 1.21+ Discord

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     MCP      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   WebSocket   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Claude    │◄────────────►│  VibeCraft  │◄─────────────►│  Minecraft  β”‚
β”‚  (AI Chat)  β”‚   Protocol   β”‚ MCP Server  β”‚    Bridge     β”‚ Client Mod  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                                  β”‚
                                                                  β–Ό
                                                           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                           β”‚  Minecraft  β”‚
                                                           β”‚   Server    β”‚
                                                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. You chat with Claude asking it to build something
  2. Claude sends commands to the VibeCraft MCP server
  3. The server forwards commands to the Fabric client mod via WebSocket
  4. The client mod executes commands in Minecraft as your player

Works with any Minecraft server β€” vanilla, Paper, Spigot, or modded. WorldEdit optional.


Quick Start

Prerequisites

  • Python 3.10+ with uv package manager
  • Java 21 (for Minecraft 1.21.x) or Java 17 (for 1.20.x)
  • jq for build script: brew install jq
  • Minecraft Java Edition with a launcher like Prism

1. Build the Client Mod

cd client-mod
./build.sh 1.21.1    # Replace with your Minecraft version

Output: build/release/vibecraft-client-0.1.0-mc1.21.1.jar

Supported versions
Minecraft Java
1.21.4 21
1.21.3 21
1.21.1 21
1.21 21
1.20.6 21
1.20.4 17
1.20.1 17

Run ./build.sh --list to see all versions.

2. Install with Prism Launcher

  1. Create instance: Add Instance β†’ Select Minecraft version β†’ OK
  2. Add Fabric: Edit β†’ Version β†’ Install Loader β†’ Fabric β†’ OK
  3. Add Fabric API: Mods β†’ Download mods β†’ Search "Fabric API" β†’ Select β†’ OK
  4. Add VibeCraft: Mods β†’ Add file β†’ Select vibecraft-client-*.jar
  5. Launch and join a world/server

3. Enable AI Control

In Minecraft chat:

/vibecraft allow

4. Install Python Dependencies

cd mcp-server
uv sync

5. Configure Claude Code

Add to ~/.claude.json:

{
  "projects": {
    "/path/to/vibecraft/agent": {
      "mcpServers": {
        "vibecraft": {
          "type": "sse",
          "url": "http://127.0.0.1:8765/sse"
        }
      }
    }
  }
}

6. Start MCP Server

cd mcp-server
./start-vibecraft.sh

7. Start Claude Code

cd agent
claude

You're ready! Ask Claude to build something:

"Build me a small stone cottage"


Detailed Setup

See docs/SETUP_GUIDE.md for:

  • Alternative launcher instructions
  • Stdio mode configuration
  • Troubleshooting
  • WorldEdit configuration

Configuration

Environment Variables

Variable Default Description
VIBECRAFT_CLIENT_HOST 127.0.0.1 Client mod WebSocket host
VIBECRAFT_CLIENT_PORT 8766 Client mod WebSocket port
VIBECRAFT_CLIENT_PATH /vibecraft WebSocket path
VIBECRAFT_WORLDEDIT_MODE auto auto, force, or off

WorldEdit Mode

  • off β€” Use vanilla /fill and /setblock commands only
  • auto β€” Detect WorldEdit availability, fall back to vanilla
  • force β€” Require WorldEdit, fail if not available

Set VIBECRAFT_WORLDEDIT_MODE=off if you don't have WorldEdit installed.

Client Mod Commands

Run these in Minecraft:

Command Description
/vibecraft status Show bridge status
/vibecraft allow Enable AI control
/vibecraft deny Disable AI control
/vibecraft token <value> Set authentication token
/vibecraft port <number> Change WebSocket port
/vibecraft restart Restart the bridge

Usage

Once connected, ask Claude to build things:

User: "Build me a small cottage near my position"
Claude: "I see these players online: Steve, Alex. Which player should I build near?"
User: "Steve"
Claude: *builds cottage using /fill and /setblock commands*

Run from the Agent Folder

For the best building experience, run Claude from the agent/ folder:

cd agent
claude

This folder has:

  • Pre-configured .mcp.json
  • Building skills and workflows
  • Material guides and templates

Troubleshooting

"Player not found"

Make sure you're using the exact player name (case-sensitive).

"Command dispatched" but nothing happens

The client mod might not be capturing command output. Update to the latest mod version.

"Unknown block type"

The block doesn't exist in your Minecraft version. Use blocks from your version.

WorldEdit commands fail

Set VIBECRAFT_WORLDEDIT_MODE=off if you don't have WorldEdit installed.

Connection failed

  1. Make sure Minecraft is running with the mod
  2. Run /vibecraft status to check the bridge
  3. Run /vibecraft allow to enable AI control
  4. Check that ports match (default: 8766)

Legacy Alternative: Server-Only Mode (RCON)

The client mod approach above works with any server. For headless environments or server-side automation without a Minecraft client, you can use direct RCON:

./setup-all.sh  # Starts Minecraft server in Docker with RCON

This is useful for CI/testing but has limitations (no multiplayer, requires server access). See docs/CONFIGURATION.md for details.


Project Structure

vibecraft/
β”œβ”€β”€ agent/                    # Run Claude here to BUILD in Minecraft
β”‚   β”œβ”€β”€ .claude/skills/       # Building skills and workflows
β”‚   β”œβ”€β”€ context/              # Material guides, templates
β”‚   β”œβ”€β”€ .mcp.json             # MCP server config
β”‚   └── CLAUDE.md             # Agent system prompt
β”‚
β”œβ”€β”€ client-mod/               # Fabric client mod (Java)
β”‚   β”œβ”€β”€ src/                  # Mod source code
β”‚   β”œβ”€β”€ build.gradle          # Gradle build config
β”‚   └── README.md             # Mod-specific docs
β”‚
β”œβ”€β”€ mcp-server/               # MCP server (Python)
β”‚   β”œβ”€β”€ src/vibecraft/        # Server source code
β”‚   β”œβ”€β”€ server_http.py        # SSE mode entry point
β”‚   β”œβ”€β”€ start-vibecraft.sh    # SSE mode launcher
β”‚   └── pyproject.toml        # Python dependencies
β”‚
└── README.md                 # This file

Contributing

Contributions welcome! See CONTRIBUTING.md.

License

MIT License - see LICENSE.

Support

Star History

Star History Chart


Happy building! 🧱

About

AI-driven vibe based Minecraft building via MCP. Describe a build, watch your agent construct it in Minecraft.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •