npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iflow-mcp/davidvanstory-babylonjs-mcp

v1.0.0

Published

MCP server for creating 3D objects with Babylon.js using text commands

Readme

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

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  Claude Desktop │────▶│   MCP Server     │────▶│  Browser App    │
│                 │     │  (stdio + WS)    │     │  (Babylon.js)   │
└─────────────────┘     └──────────────────┘     └─────────────────┘

Installation

  1. Clone the repository:
git clone <repository-url>
cd babylonjs-mcpV2
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

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.js

This 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 dev

Open 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

  1. Restart Claude Desktop
  2. Make sure the browser app shows "Connected" status
  3. 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 torus
    • name: unique identifier for the object
    • position: (optional) {x, y, z} coordinates
    • size: (optional) scale factor
    • color: (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 app

Scripts

  • npm run dev - Start development server
  • npm run build - Build everything
  • npm run build:server - Build MCP server only
  • npm run typecheck - Run TypeScript type checking
  • npm run test:simple - Serve vanilla HTML test page

Testing Without Claude

You can test the browser application standalone:

  1. Start only the dev server: npm run dev
  2. Open http://localhost:3000
  3. Use the command input to test locally (WebSocket connection will show as disconnected)

Troubleshooting

WebSocket Connection Issues

  1. Make sure the MCP server is running (node dist/mcp-stdio-server.js)
  2. Check that port 8080 is not in use by another application
  3. Look for errors in the browser console
  4. Check the MCP server logs in the terminal

Claude Desktop Not Finding the Server

  1. Ensure the path in claude_desktop_config.json is absolute
  2. Make sure the MCP server file exists at the specified path
  3. Restart Claude Desktop after configuration changes
  4. Check Claude Desktop logs for MCP-related errors

Build Errors

  1. Make sure all dependencies are installed: npm install
  2. Clear the dist folder and rebuild: rm -rf dist && npm run build
  3. Check TypeScript errors: npm run typecheck

License

MIT