WildCraft 3D Studio & MCP
by 3rj4n
README.md
# WildCraft 3D Studio & MCP
A browser-based **Three.js 3D Animation Studio** and **Model Context Protocol (MCP) Server** featuring **856 reusable procedural 3D assets**, **21 world presets**, keyframe timeline animation, WebM video rendering, and real-time AI directing with Claude.

---
## Programming Languages & Tech Stack
| Layer | Language / Technology | Purpose |
| :--- | :--- | :--- |
| **Core Language** | **TypeScript (`.ts`, `.tsx`)** | Strict type-safe 3D asset builders, animation engine, state store, and backend MCP server |
| **3D Graphics & Rendering** | **Three.js (WebGL / GLSL / PBR)** | Procedural 3D meshes, `MeshStandardMaterial` / `MeshPhysicalMaterial`, `RoomEnvironment` IBL, Orbit & Transform gizmos |
| **Frontend UI** | **React 19 + JSX/TSX** | Interactive studio workspace, asset library sidebar, inspector panel, and keyframe timeline |
| **Styling & Markup** | **HTML5 + CSS3 (Tailwind CSS v4)** | Responsive dark-studio interface and Canvas 2D procedural texture synthesis |
| **State Management** | **Zustand** | Scene graph state, selection, undoable transforms, and local project persistence |
| **Backend & MCP Server** | **Node.js + Express + TSX** | Serves Vite dev/prod app, REST endpoints, SSE live viewport sync, and JSON-RPC 2.0 `/mcp` server |
| **Export & Media** | **Canvas `MediaRecorder` + `GLTFExporter`** | Client-side WebM video recording and `.glb` 3D model exporting |
---
## 3D Asset Library (856 Reusable Assets)
Every asset is 100% procedural (zero external asset 404s) and fully reusable—spawn unlimited independent copies, customize colors, resize, animate, or import your own `.glb`, `.gltf`, and `.obj` files.
| Category | Count | Highlights |
| :--- | :---: | :--- |
| **Props & 3D Shapes** | 248 | Kitchen counters, appliances & food (`prop_kitchen_island`, `prop_espresso`, `prop_layer_cake`), home decor & bathroom/bedroom sets, office tech (`prop_laptop`, `prop_arcade_cabinet`), school & instruments (`prop_grand_piano`, `prop_microscope`), street/store kiosks, sports & camping gear, plus **42 beveled/polyhedral 3D shapes** |
| **Characters** | 246 | Articulated humans (`teacher`, `explorer`, `superhero`, `astronaut`, `knight`, `wizard`, `ninja`), **225+ Roblox-style (`blox_*`) & Minecraft-style (`voxel_*`) avatars**, plus custom heroes (`blox_alex`, `blox_luna`, `blox_bolt`, `blox_the_admin`, `voxel_hoodie_hero`) |
| **Animals** | 238 | **238 articulated zoological species**: Wild Cats & Canines (`cheetah`, `snow_leopard`, `husky`), Bears & Woodland (`polar_bear`, `panda`, `red_panda`, `otter`), Exotic & Primates (`gorilla`, `orangutan`, `kangaroo`, `capybara`), Safari & Farm Hooved (`hippo`, `rhino`, `moose`, `camel`), Birds & Raptors (`flamingo`, `peacock`, `toucan`), Ocean & Marine (`dolphin`, `orca`, `hammerhead_shark`, `octopus`), Reptiles, Frogs & Bugs (`chameleon`, `axolotl`, `cobra`, `scorpion`) |
| **Nature & Landscapes** | 45 | Trees (`oak_tree`, `sakura_tree`, `willow_tree`, `maple_tree`, `bamboo_grove`), rivers/ponds/waterfalls, Red Rock Mesa, Coral Beach Cove, Crystal Cavern, Glacier Lake, Floating Sky Island, Molten Lava Caldera, Roblox & Voxel terrain chunks |
| **Buildings & Interiors** | 35 | Glass skyscrapers, malls, hospitals, hotels, villas, cottages, **8 open-stage cutaway building interiors** (Living Room, Kitchen, Bedroom, Classroom, Office, Cafe, Hospital Clinic, Tech Lab), Roblox Obby & Voxel Castle |
| **RPG Gaming Gear** | 17 | Broadswords, katana, glowing pixel sword, battleaxe, warhammer, elven bow, wizard staff, shields, blasters/rifles, potions, treasure chest, warp portal |
| **Vehicles** | 10 | Supercar, Electric SUV, Cyber Pickup, Sport Motorcycle, Cruiser Bike, Scooter, Adventure Voxel Truck, Car, Truck, Bicycle |
| **Space & Universe** | 9 | Orbiting Solar System, Earth, Saturn, Mars, Jupiter, Neptune, Spiral Galaxy, Black Hole, Space Rocket |
| **Dinosaurs & Mythical** | 8 | T-Rex, Triceratops, Brachiosaurus, Stegosaurus, Velociraptor, Ankylosaurus, Pteranodon, Mythical Dragon |
### 21 Built-in World Presets
`wildlife_adventure`, `tropical_jungle`, `african_savanna`, `forest`, `snow_mountain`, `desert`, `farm`, `countryside`, `ocean`, `island`, `city`, `fantasy_world`, `deep_space`, `rpg_arena`, `roblox_obby`, `minecraft_world`, `voxel_sunset_valley`, `interior_home`, `interior_school`, `interior_office`, and `scenic_wonders`.
---
## Getting Started (Local Setup)
### Prerequisites
- **Node.js** 18+ (recommended Node 20 or 22)
- **npm**
### Installation & Running
1. **Clone the repository**
```bash
git clone https://github.com/3rj4n/wildcraft-3d-studio-mcp.git
cd wildcraft-3d-studio-mcp
```
2. **Install dependencies**
```bash
npm install
```
3. **Configure environment (optional)**
Copy `.env.example` to `.env` if you customize `PORT` or `APP_URL`:
```bash
cp .env.example .env
```
4. **Start the development server (Studio UI + MCP Server on port 3000)**
```bash
npm run dev
```
Open `http://localhost:3000` in your browser.
5. **Type-check & production build**
```bash
npm run lint
npm run build
```
---
## Connecting Claude via MCP (AI Video Directing)
WildCraft runs a **Model Context Protocol (MCP)** JSON-RPC 2.0 endpoint at:
- **Streamable HTTP JSON-RPC:** `http://localhost:3000/mcp`
- **SSE Stream:** `http://localhost:3000/mcp/sse`
- **API Metadata:** `http://localhost:3000/api/mcp/info`
### Example Claude Desktop `claude_desktop_config.json`
```json
{
"mcpServers": {
"wildcraft-3d": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/mcp"]
}
}
}
```
### Available MCP Tools
- `list_threejs_assets` — Browse or search all 856 assets by category (`animals`, `characters`, `dinosaurs`, `nature`, `buildings`, `props`, `vehicles`, `space`, `gaming`)
- `get_asset_schema` — Inspect part counts, default colors, and supported animation presets
- `generate_environment` — Load any of the 21 world presets
- `spawn_asset_in_scene` — Place any character, prop, building, or vehicle in the live 3D viewport
- `animate_scene_object` — Change animation state (`walk`, `run`, `wave`, `talk`, `dance`, `jump`, `fly`, `sit`, `drive`), position, rotation, or scale
- `add_object_keyframe` — Choreograph timeline movement and animation transitions
- `set_camera_keyframe` — Control camera mode (`perspective_orbit`, `cinematic`, `follow`, `orthographic`, `fixed`) and camera pans
- `set_lighting_preset` — Switch atmosphere between `day`, `sunrise`, `sunset`, and `night`
- `render_scene_video` — Record the open browser WebGL viewport into a downloadable `.webm` video
- `export_scene_spec` — Export the complete active Three.js scene graph JSON
---
## Studio Controls Guide
1. **Add Assets:** Click or drag any item from the left **3D Asset Library** sidebar directly onto the 3D viewport floor.
2. **Transform & Recolor:** Click an object in the viewport (or Scene Outliner) to move, rotate, scale (`W` / `E` / `R` or toolbar gizmos), switch animations, or pick custom colors in the right **Inspector** panel.
3. **Animate & Film:** Scrub the bottom **Timeline Editor**, add object or camera keyframes, toggle **Cinema Mode**, and click **Render WebM** to export your animated 3D video.
---
## License
This project is licensed under the [MIT License](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues