Let an AI build Minecraft models, textures and animations directly inside Blockbench — through the Model Context Protocol.
BlockbenchMCP gives an AI assistant a live connection to a running Blockbench window. The model can start a project from the start screen, build geometry (bones + cubes), paint textures procedurally, author keyframe animations (including GeckoLib), install Blockbench plugins, move the camera, and take screenshots so it can look at its own work and refine it — all without you touching the editor.
It was used to model, texture and animate a full GeckoLib grizzly bear (walk / run / sleep / attack) end-to-end from a single prompt.
- How it works
- Features
- Requirements
- Installation
- Connecting your AI client
- Tool reference
- Example: an animated GeckoLib bear
- Troubleshooting
- Security
- Limitations
- Development
- License
There are two pieces:
| Piece | Runs where | Responsibility |
|---|---|---|
Bridge plugin — plugin/blockbench_mcp.js |
Inside Blockbench (desktop) | Hosts a local HTTP endpoint on 127.0.0.1:8787 (built on Node's net module) and runs each command against the Blockbench API on the renderer thread. |
MCP server — src/ → dist/ |
A Node process your AI client launches | Exposes Blockbench as MCP tools (stdio transport) and forwards every call to the bridge. |
┌────────────┐ stdio (MCP) ┌──────────────────┐ HTTP 127.0.0.1:8787 ┌─────────────────────┐
│ AI client │ ──────────────▶ │ blockbench-mcp │ ──────────────────────▶ │ Blockbench + plugin │
│ (Claude…) │ ◀────────────── │ (Node server) │ ◀────────────────────── │ (live editor) │
└────────────┘ └──────────────────┘ └─────────────────────┘
- 🧱 Modeling — create bones (groups) and cubes one at a time or in bulk (
add_groups/add_cubesbuild a whole posed skeleton in one call), with full rotation and inflate; edit/move/reparent/delete, and read the outliner tree. - 🎨 Texturing — create textures, paint procedurally (pixels, rects, lines, circles, ellipses, polygons, dither, noise, gradients), auto-shade every cube face with
detail_cubes(no flat or untextured gaps), and place features in face-relative coordinates withpaint_faces. - 🎬 Animation — create animations, add keyframes in bulk for any bone/channel with interpolation control (linear / catmullrom / step / bezier).
- 📸 Vision —
screenshot,screenshot_views(several angles at once) andget_texturereturn images inline so the model can see and iterate, andcheck_modelaudits for problems. - 🧠 Guidance —
get_guidereturns a modeling/texturing playbook so the AI builds detailed, rotated models instead of a few flat boxes. - 🧩 Plugins — search, install (by store id, URL, or file) and uninstall Blockbench plugins, so the AI can set up formats like GeckoLib itself.
- 🔧 Escape hatch —
execute_scriptruns arbitrary Blockbench JS for anything not covered by a dedicated tool. - 🟢 40 tools total, all over a single local connection.
- Blockbench desktop app, version 4.8+ (the web app cannot host the bridge — see Limitations).
- Node.js 18+ (for global
fetch). - An MCP-capable client (Claude Code, Claude Desktop, Cursor, etc.).
- Open the desktop Blockbench app.
- File ▸ Plugins ▸ Load Plugin from File and select
plugin/blockbench_mcp.js. (Alternatively copy it into your Blockbenchpluginsfolder.) - On first start the plugin asks for network permission (it needs the
netmodule to host the local server). Choose “Always allow for this plugin.” - A toast confirms “MCP server started on port 8787.”
- Toggle the server any time: Tools ▸ Start / Stop MCP Server
- Change the port: Settings ▸ General ▸ MCP Server Port (default
8787)
Verify it's up:
curl http://127.0.0.1:8787/ping
# {"ok":true,"protocol":1,"blockbench_version":"5.x.x","is_app":true,"has_project":false}git clone https://github.com/sosadly/blockbench-mcp.git
cd blockbench-mcp
npm install
npm run buildPoint your client at dist/index.js over stdio. Use an absolute path.
Claude Code — .mcp.json in your project (or claude mcp add):
{
"mcpServers": {
"blockbench": {
"command": "node",
"args": ["/absolute/path/to/blockbench-mcp/dist/index.js"],
"env": { "BLOCKBENCH_MCP_PORT": "8787" }
}
}
}Claude Desktop — claude_desktop_config.json:
{
"mcpServers": {
"blockbench": {
"command": "node",
"args": ["C:\\path\\to\\blockbench-mcp\\dist\\index.js"]
}
}
}| Env var | Default | Purpose |
|---|---|---|
BLOCKBENCH_MCP_PORT |
8787 |
Must match the plugin's port setting. |
BLOCKBENCH_MCP_HOST |
127.0.0.1 |
Bridge host. |
| Group | Tools |
|---|---|
| Status & guidance | get_status, get_guide, list_formats |
| Project | new_project, set_project_meta, save_project, export_project, load_project, close_project |
| Geometry | add_group, add_cube, add_groups, add_cubes, edit_element, delete_element, list_outliner, get_element, check_model |
| UV & textures | create_texture, paint_texture, detail_cubes, paint_faces, apply_texture, set_cube_uv, import_texture, resize_texture, list_textures, get_texture |
| Animation | create_animation, add_keyframe, add_keyframes, list_animations, remove_animation |
| View | set_camera_angle, screenshot, screenshot_views |
| Plugins | list_plugins, install_plugin, uninstall_plugin |
| Escape hatch | execute_script |
Conventions: coordinates are Blockbench units; rotations are degrees; texture pixel ops use a top-left origin with y pointing down. add_cube returns each face's resolved UV rect; detail_cubes then base-coats every face and paint_faces lets you paint features (eyes, nose, claws) in coordinates relative to a face, so you don't compute absolute UVs by hand.
The sequence an AI follows for “make a textured GeckoLib bear that can walk, run, sleep and attack”:
Blockbench shows “server stopped” and Start does nothing.
The plugin needs the net module. When you click Start MCP Server, Blockbench shows a permission dialog — choose “Always allow for this plugin.” If you previously denied it, revoke and retry from the plugin's context menu, or restart Blockbench.
MCP tools fail with “Cannot reach Blockbench on 127.0.0.1:8787”.
Make sure Blockbench is open, the plugin is loaded, and the server is running (green toast / curl .../ping works). Confirm the port in the plugin settings matches BLOCKBENCH_MCP_PORT.
“Unknown format … the matching plugin must be installed.”
Plugin formats like GeckoLib's geckolib_model require install_plugin { "id": "geckolib" } first. Run list_formats to confirm the id appeared.
Console 404s about about.md / the plugin store.
Harmless — Blockbench tries to fetch store metadata for the side-loaded plugin and gets a 404. It does not affect the bridge.
- The bridge binds to
127.0.0.1only — it is not reachable from your network. execute_scriptruns unsandboxed JavaScript inside Blockbench. Only connect MCP clients you trust, and prefer the dedicated tools overexecute_scriptwhere possible.
- Desktop only. The bridge relies on Node modules (
net), which the Blockbench web app does not expose to plugins. - One Blockbench window. The bridge talks to whichever project is currently active.
- Box-UV packing is up to the caller;
add_cubereturns resolved face UVs to make this manageable.
npm run dev # tsc --watch
npm run build # one-off compile to dist/- MCP tool definitions live in
src/tools.ts; the HTTP client insrc/client.ts; the server entry insrc/index.ts. - Bridge command handlers live in
plugin/blockbench_mcp.jsunder thecommandsobject — add a handler there and a matching tool intools.tsto extend the surface. - The Blockbench API used by the bridge is documented in the official type definitions.
Built with the Model Context Protocol. Not affiliated with Blockbench or GeckoLib.