Babylon.js MCP Server
Allows AI assistants to create, delete, select, and list 3D objects (box, sphere, cylinder, cone, torus) in a Babylon.js scene, with customizable position, size, and color via WebSocket commands.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Babylon.js MCP Server
An MCP (Model Context Protocol) server that allows AI assistants like Claude to create and manipulate 3D objects in a Babylon.js scene through text commands.
Features
Create 3D objects (box, sphere, cylinder, cone, torus) with customizable properties
Delete objects by name
Select objects for highlighting
List all objects in the scene
Real-time WebSocket communication between MCP server and browser
React and vanilla JavaScript implementations
Related MCP server: Roblox Studio MCP Assistant
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Claude Desktop │────▶│ MCP Server │────▶│ Browser App │
│ │ │ (stdio + WS) │ │ (Babylon.js) │
└─────────────────┘ └──────────────────┘ └─────────────────┘Installation
Clone the repository:
git clone <repository-url>
cd babylonjs-mcpV2Install dependencies:
npm installBuild the project:
npm run buildUsage
1. Start the MCP Server
The MCP server needs to be running to bridge communication between Claude and the browser:
node dist/mcp-stdio-server.jsThis will:
Start the MCP server listening on stdio
Start a WebSocket server on port 8080
2. Start the Browser Application
In a new terminal, start the development server:
npm run devOpen http://localhost:3000 in your browser. You should see:
A 3D canvas with a ground plane
A command input interface
A WebSocket connection status indicator
3. Configure Claude Desktop
Add the following to your Claude Desktop configuration:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"babylonjs": {
"command": "node",
"args": ["/absolute/path/to/babylonjs-mcpV2/dist/mcp-stdio-server.js"]
}
}
}Replace /absolute/path/to/babylonjs-mcpV2 with the actual path to your project.
4. Test the Connection
Restart Claude Desktop
Make sure the browser app shows "Connected" status
In Claude, you can now use commands like:
"Create a red box named myBox"
"Delete myBox"
"List all objects"
"Select myBox"
Available Commands
The MCP server exposes the following tools:
create_object: Create a 3D object
shape: box, sphere, cylinder, cone, or torusname: unique identifier for the objectposition: (optional) {x, y, z} coordinatessize: (optional) scale factorcolor: (optional) {r, g, b} values (0-1)
delete_object: Remove an object by name
name: identifier of the object to delete
select_object: Highlight an object
name: identifier of the object to select
list_objects: Get all objects in the scene
Development
Project Structure
src/
├── core/ # Core business logic
│ ├── babylon-scene.ts # 3D scene management
│ ├── command-parser.ts # Text command parsing
│ ├── mcp-server.ts # MCP server implementation
│ ├── websocket-client.ts # WebSocket client for browser
│ └── types.ts # TypeScript types
├── react/ # React components
│ └── BabylonMCP.tsx # Main React component
├── vanilla/ # Vanilla JS implementation
│ └── index.ts # Browser entry point
├── mcp-stdio-server.ts # MCP server executable
└── App.tsx # React demo appScripts
npm run dev- Start development servernpm run build- Build everythingnpm run build:server- Build MCP server onlynpm run typecheck- Run TypeScript type checkingnpm run test:simple- Serve vanilla HTML test page
Testing Without Claude
You can test the browser application standalone:
Start only the dev server:
npm run devUse the command input to test locally (WebSocket connection will show as disconnected)
Troubleshooting
WebSocket Connection Issues
Make sure the MCP server is running (
node dist/mcp-stdio-server.js)Check that port 8080 is not in use by another application
Look for errors in the browser console
Check the MCP server logs in the terminal
Claude Desktop Not Finding the Server
Ensure the path in
claude_desktop_config.jsonis absoluteMake sure the MCP server file exists at the specified path
Restart Claude Desktop after configuration changes
Check Claude Desktop logs for MCP-related errors
Build Errors
Make sure all dependencies are installed:
npm installClear the dist folder and rebuild:
rm -rf dist && npm run buildCheck TypeScript errors:
npm run typecheck
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
- VULKDeprecatedio.github.devjoaocastro
Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
A browser 3D CAD for your AI: it scripts real-size models, uCAD builds them and returns pictures.
Build, edit and publish live 3D, AR and game scenes in ARClip from your AI assistant.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI agents to create and modify Unreal Engine blueprints using natural language commands. Supports blueprint creation, property modification, and real-time communication with Unreal Editor through WebSocket integration.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Roblox Studio in real-time, allowing creation and manipulation of game objects through natural language commands via an HTTP-based plugin system.3Apache 2.0
- AlicenseBqualityDmaintenanceAn MCP server that bridges AI clients with a frontend 3D visualization application to control model properties, lighting, and camera settings via WebSocket. It enables real-time manipulation of 3D scenes through natural language commands for scaling, rotating, and coloring models.611MIT
- AlicenseAqualityDmaintenanceEnables AI agents to control and manipulate live 3D scenes across frameworks like Three.js, A-Frame, and Babylon.js using a comprehensive set of object and environment tools. It features an integrated in-world chat system that allows for real-time scene modifications directly from within the 3D canvas.333MIT