blockbench-mcp
Enables AI assistants to control Blockbench projects via MCP, allowing them to create and delete cubes and inspect model structure. Provides tools for project info, element listing, and cube manipulation.
README
BlockbenchMCP
:uk: English · :ru: Русский
Connect Blockbench to AI assistants (OpenCode, Claude, and others) via the Model Context Protocol (MCP). The AI can directly control your active Blockbench project: create and delete cubes, inspect the model and its element structure.
Architecture
AI assistant (MCP) ←→ mcp-server (Node.js) ←Socket.IO:9999→ mcp-plugin (Blockbench)
apps/mcp-plugin— Blockbench plugin. Receives commands over Socket.IO (port9999) and executes them in the current project.apps/mcp-server— MCP server. Implements the MCP protocol over stdio and forwards commands to the plugin.packages/shared— shared TypeScript types.
Tools
| Tool | Description |
|---|---|
blockbench.hello |
Checks the connection to Blockbench |
blockbench.get_project_info |
Info about the current project (format, texture size, element/texture/animation counts) |
blockbench.list_elements |
Lists elements (cubes) in the project with uuid and name |
blockbench.add_cube |
Creates a cube (position, size, auto-UV, shade, color, uv_offset) |
blockbench.remove_element |
Removes an element by name or uuid |
Installation
Prerequisites
- Blockbench (current version, tested on 5.x)
- Node.js 20+
- pnpm (
npm install -g pnpm)
1. Build
git clone https://github.com/Golub4ik-Official/blockbench-mcp.git
cd blockbench-mcp
pnpm install
pnpm build
Artifacts are written to:
apps/mcp-plugin/dist/mcp_socketio_plugin.js— the plugin fileapps/mcp-server/dist/index.js— the MCP server
For end users: a ready-built plugin file (
mcp_socketio_plugin.js) is attached to every release — no build required.
2. Install the Blockbench plugin
- Open Blockbench.
- File → Plugins → Load Plugin from File → select
apps/mcp-plugin/dist/mcp_socketio_plugin.js. - Enable the plugin (checkbox next to "MCP Plugin").
- After it loads, the "MCP Commands" panel appears (on the right) — it shows the command history and connection status.
3. Configure the MCP server in your assistant
Register the MCP server in your assistant's config. OpenCode example (opencode.json):
{
"mcp": {
"blockbench": {
"type": "local",
"command": ["node", "C:/path/to/blockbench-mcp/apps/mcp-server/dist/index.js"],
"enabled": true
}
}
}
Claude Desktop example (claude_desktop_config.json):
{
"mcpServers": {
"blockbench": {
"command": "node",
"args": ["/path/to/blockbench-mcp/apps/mcp-server/dist/index.js"]
}
}
}
4. Usage
- Open Blockbench and create a project (File → New → Block model).
- Start or restart your assistant so it picks up the MCP server.
- Ask the assistant, for example: "Create a generator like in Industrial Craft 2 — case, front panel, and an output slot."
- Cubes are added to the active Blockbench project.
Development
# Watch-build the plugin (rebuilds on changes)
cd apps/mcp-plugin && pnpm dev
# Rebuild the MCP server
cd apps/mcp-server && pnpm build
After editing plugin code, rebuild it and reload it in Blockbench: File → Plugins → Master → Reload.
Releases
Releases are created from tags. The GitHub Actions workflow builds the plugin and attaches mcp_socketio_plugin.js to the release:
git tag v0.3.0
git push origin v0.3.0
Troubleshooting
- "ERROR: Blockbench plugin is not connected" — the plugin is not loaded or Blockbench is closed. Load the plugin and check the "MCP Commands" panel.
- Port 9999 is busy — close the conflicting process or restart the MCP server.
- Timed out — Blockbench did not respond within 30 seconds. Make sure a project is open and the plugin is active.
- The
addElementmethod is not found — use the current plugin version (from a release); old builds used a broken API for older Blockbench versions.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。