MCP ExplorerExplorer

Blockbench Mcp Plugin

@jasonjgardneron 20 days ago
1 GPL-3.0
FreeCommunity
AI Systems
#blockbench#mcp-server
Adds MCP server to Blockbench

Overview

What is Blockbench Mcp Plugin

blockbench-mcp-plugin is a plugin that integrates an MCP server into Blockbench, allowing users to develop and test models with enhanced capabilities.

Use cases

Use cases include developing custom tools for AI agents, testing model interactions in real-time, and enhancing the workflow of 3D model creation within Blockbench.

How to use

To use blockbench-mcp-plugin, open Blockbench, navigate to File > Plugins, and load the plugin from the provided URL. Configure the MCP server settings under Blockbench settings.

Key features

Key features include easy installation via URL, configuration of the MCP server, support for plugin development, and the ability to add custom tools for enhanced functionality.

Where to use

blockbench-mcp-plugin is primarily used in game development and 3D modeling environments where Blockbench is utilized for creating and editing models.

Content

Blockbench MCP

https://github.com/user-attachments/assets/ab1b7e63-b6f0-4d5b-85ab-79d328de31db

Plugin Installation

Open Blockbench, go to File > Plugins and click the “Load Plugin from URL” and paste in this URL:

https://jasonjgardner.github.io/blockbench-mcp-plugin/mcp.js

Model Context Protocol Server

Configure experimental MCP server under Blockbench settings: Settings > General > MCP Server Port and MCP Server Endpoint

The following examples use the default values of :3000/mcp

Installation

Claude Desktop

claude_desktop_config.json

{
  "mcpServers": {
    "blockbench": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:3000/mcp"
      ]
    }
  }
}

VS Code

.vscode/mcp.json

Plugin Development

Contribution

Addition or modification of tools, prompts and resources is welcome. It should be a relatively-familiar process for Blockbench contributor/plugin authors; however, does require TypeScript compilation. Bun is recommended for the task.

Dev Setup

bunx @modelcontextprotocol/inspector

The Streamable HTTP transport URL defaults to __http://localhost:3000/mcp__

cd ./src/mcp
bun install
bun run build

Adding Tools

// ./src/mcp/server/tools.ts
import { z } from "zod";
import { createTool } from "@/lib/factories";

createTool({
    name: "tool_name",
    description: "Tool description for the AI agent"
    parameters: z.object({
        // Parameters required to execute your tool:
        examples: z.array({
            // Zod schema to collect arguments.
            // Does not have to be 1:1 with Blockbench
        })
    }),
    async execute({ examples }, { reportProgress }) {
        return JSON.stringify(examples.map((example, idx) => {
            reportProgress({
                progress: idx,
                total: examples.length
            });

            // Do something with parameters within current context.
            // Has access to Blockbench, electron, FastMCP, and other API
            // Return stringified results to report to AI agent context.

            return myExampleTransformFunction(example);
        }));
    }
});

Adding Resources

No factory function has been created yet. Refer to FactMCP’s documentation for Resource examples.

Add resource-related code to ./src/mcp/server/resources.ts

Adding Prompts

No factory function has been created yet. Refer to FactMCP’s documentation for Prompts examples.

Add prompt-related code to ./src/mcp/server/prompts.ts

Tools

No tools

Comments