Three.js DevTools MCP
v0.2.1Inspect and edit Three.js scenes, materials, shaders, lights in real time from any AI agent
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scene_tree
List all objects in the Three.js scene tree. Returns compact text tree by default (saves tokens). Set compact=false for full JSON.
| Parameter | Type | Description |
|---|---|---|
compact | boolean | Compact text tree (default: true). Set false for full JSON with positions/geometry. |
depth | number | Max tree depth (default: 3) |
maxChildren | number | Max children per node (default: 15 compact, 100 JSON) |
types | array | Filter by type: Mesh, Light, Group, etc. |
object_details
Get detailed info about a specific object by name, uuid, or path
| Parameter | Type | Description |
|---|---|---|
name | string | Object name (first match) |
path | string | Dot path: "Scene.MyGroup.MyMesh" |
uuid | string | Object UUID |
material_list
List all materials in the scene with type, color, transparency
material_details
Get full properties of a material: color, maps, uniforms, defines
| Parameter | Type | Description |
|---|---|---|
name | string | Material name |
uuid | string | Material UUID |
shader_source
Get compiled vertex/fragment shader source and uniforms for a material
| Parameter | Type | Description |
|---|---|---|
materialName | string | Material name |
materialUuid | string | Material UUID |
shader_list
List all compiled shader programs with their material associations
texture_list
List all textures: size, format, wrap, filter settings
texture_details
Get detailed info about a specific texture
| Parameter | Type | Description |
|---|---|---|
name | string | Texture name |
uuid | string | Texture UUID |
renderer_info
Get renderer stats: draw calls, triangles, memory, capabilities
set_material_property
Set a material property (color, roughness, wireframe, etc.). IMPORTANT: This is a runtime-only preview (lost on reload). Before calling, ASK the user whether they want a runtime preview or a persistent code change. Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
property * | string | Property name: color, emissive, roughness, metalness, opacity, transparent, wireframe, visible, side, depthWrite, depthTest, alphaTest, flatShading, fog |
name | string | Material name |
uuid | string | Material UUID |
value | New value (hex string for colors, number for scalars, boolean for flags) |
set_uniform
Set a shader uniform value on a ShaderMaterial — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
uniform * | string | Uniform name (e.g. uHorizonColor, uOpacity) |
name | string | Material name |
uuid | string | Material UUID |
value | New value: hex string for Color, {x,y,z} for Vector3, number for float |
set_object_transform
Set position, rotation, scale, or visibility of a scene object — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
name | string | Object name |
position | array | [x, y, z] |
rotation | array | [x, y, z] in radians |
scale | array | [x, y, z] |
uuid | string | Object UUID |
visible | boolean | Show/hide object |
set_light
Modify light properties: color, intensity, position, shadows — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
castShadow | boolean | Enable/disable shadows |
color | string | Light color (#RRGGBB) |
groundColor | string | Ground color for HemisphereLight (#RRGGBB) |
intensity | number | Light intensity |
name | string | Light name |
position | array | [x, y, z] |
uuid | string | Light UUID |
highlight_object
Highlight an object for debugging (wireframe or visibility toggle). Runtime only — for visual inspection, not persisted. Debug only — page reload will reset. No code changes needed.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Enable/disable highlight (default: true) |
mode | string | Highlight mode (default: wireframe) |
name | string | Object name |
uuid | string | Object UUID |
run_js
Execute arbitrary JavaScript with access to scene, renderer, camera. Returns the result. Runtime only (lost on reload). If the code mutates scene state, ASK the user first: runtime preview or persistent code change? Debug only — page reload will reset. No code changes needed.
| Parameter | Type | Description |
|---|---|---|
code * | string | JavaScript code. Available vars: scene, renderer, camera, gl. Use return for results. |
performance_snapshot
Get detailed performance analysis: draw calls, triangles, instanced meshes, object counts by type
instanced_mesh_details
Inspect an InstancedMesh: count, max instances, geometry, sample transforms, custom attributes, instance colors
| Parameter | Type | Description |
|---|---|---|
name | string | InstancedMesh name |
sampleCount | number | Number of instances to sample (default: 5, max: 20) |
startIndex | number | First instance index to sample (default: 0) |
uuid | string | InstancedMesh UUID |
set_instanced_mesh
Modify InstancedMesh properties: count, visibility, frustumCulled — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
count | number | Number of visible instances |
frustumCulled | boolean | Enable/disable frustum culling |
name | string | InstancedMesh name |
uuid | string | InstancedMesh UUID |
visible | boolean | Show/hide entire mesh |
camera_details
Get active camera properties: type, position, FOV, near/far, aspect
set_camera
Modify camera: position, rotation, FOV, near/far, zoom — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
aspect | number | Aspect ratio (PerspectiveCamera) |
bottom | number | Bottom plane (OrthographicCamera) |
far | number | Far clipping plane |
fov | number | Field of view (PerspectiveCamera) |
left | number | Left plane (OrthographicCamera) |
near | number | Near clipping plane |
position | array | [x, y, z] |
right | number | Right plane (OrthographicCamera) |
rotation | array | [x, y, z] in radians |
top | number | Top plane (OrthographicCamera) |
zoom | number | Zoom factor |
fog_details
Get scene fog settings: type (Fog/FogExp2), color, near/far or density
set_fog
Modify scene fog: color, near/far (Fog) or density (FogExp2), background color — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
background | string | Scene background color (#RRGGBB) |
color | string | Fog color (#RRGGBB) |
density | number | Fog density (FogExp2 type) |
far | number | Fog far distance (Fog type) |
near | number | Fog near distance (Fog type) |
renderer_settings
Get renderer configuration: toneMapping, exposure, colorSpace, shadowMap, pixelRatio
set_renderer
Modify renderer: toneMapping, exposure, colorSpace, shadows — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
localClippingEnabled | boolean | Enable local clipping planes |
outputColorSpace | string | Output color space (srgb, srgb-linear) |
pixelRatio | number | Device pixel ratio |
shadowMapEnabled | boolean | Enable shadow mapping |
shadowMapType | number | Shadow map type (0=Basic, 1=PCF, 2=PCFSoft, 3=VSM) |
sortObjects | boolean | Sort objects before rendering |
toneMapping | number | Tone mapping algorithm (0-7) |
toneMappingExposure | number | Exposure level |
animation_details
List all AnimationMixers, their actions, clips, weights, and playback state
set_animation
Control animation: mixer timeScale, action play/stop/pause/weight. Runtime only — for testing. Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
actionPaused | boolean | Pause/unpause action |
actionTimeScale | number | Action time scale |
actionWeight | number | Action weight (0-1) |
clipName | string | Target action by clip name |
mixerIndex | number | Mixer index (default: 0) |
play | boolean | Play the action |
stop | boolean | Stop the action |
time | number | Mixer current time |
timeScale | number | Mixer global time scale |
skeleton_details
List all skeletons/bones from SkinnedMesh objects in the scene
geometry_details
Inspect geometry: vertices, attributes, indices, bounding box, morph attributes
| Parameter | Type | Description |
|---|---|---|
name | string | Object name (owning mesh) |
uuid | string | Object UUID (owning mesh) |
morph_targets
List all meshes with morph targets, their target names and current influence values
set_morph_target
Set morph target influence on a mesh — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
influence * | number | Influence value (0-1) |
index | number | Morph target index |
name | string | Mesh name |
targetName | string | Morph target name (from dictionary) |
uuid | string | Mesh UUID |
raycast
Cast a ray from camera through screen coordinates and return hit objects
| Parameter | Type | Description |
|---|---|---|
x * | number | Normalized device X coordinate (-1 to 1, 0 = center) |
y * | number | Normalized device Y coordinate (-1 to 1, 0 = center) |
maxHits | number | Maximum hits to return (default: 10) |
layer_details
Show camera layer mask and objects with non-default layer assignments
set_layers
Set layers on an object or camera — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Enable or disable the layer |
layer | number | Layer number (0-31) to enable/disable |
mask | number | Set layer mask directly (bitmask) |
name | string | Object name |
target | string | "camera" to target the camera |
uuid | string | Object UUID |
add_helper
Add a visual debug helper to a scene object. Types: box, axes, skeleton, arrow, grid, polar_grid, camera, directional_light, spot_light, point_light, hemisphere_light, plane Debug only — page reload will reset. No code changes needed.
| Parameter | Type | Description |
|---|---|---|
color | number | Color as hex number (default: 0x00ff00) |
direction | array | [x, y, z] direction for ArrowHelper/PlaneHelper |
divisions | number | Grid divisions (GridHelper, default: 10) |
length | number | Arrow length (ArrowHelper, default: 1) |
origin | array | [x, y, z] origin for ArrowHelper |
size | number | Size for AxesHelper/GridHelper/LightHelpers (default: 1) |
target | string | Target object name |
targetUuid | string | Target object UUID |
type | string | Helper type (default: box) |
remove_helper
Remove a previously added debug helper Debug only — page reload will reset. No code changes needed.
| Parameter | Type | Description |
|---|---|---|
helperId * | string | Helper ID returned by add_helper |
set_texture
Modify texture properties: wrap, filter, anisotropy, repeat, offset, colorSpace — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
anisotropy | number | Anisotropic filtering level (1-16) |
colorSpace | string | Color space (srgb, srgb-linear) |
flipY | boolean | Flip texture vertically |
magFilter | number | Mag filter (1003=Nearest, 1006=Linear) |
minFilter | number | Min filter (1003=Nearest, 1006=Linear, 1008=LinearMipmapLinear) |
name | string | Texture name |
offset | array | [x, y] offset |
repeat | array | [x, y] repeat |
rotation | number | Rotation in radians |
uuid | string | Texture UUID |
wrapS | number | Wrap S mode (1000=Repeat, 1001=ClampToEdge, 1002=Mirrored) |
wrapT | number | Wrap T mode |
shadow_details
Inspect shadow maps: global settings, per-light shadow config (bias, mapSize, camera frustum), cast/receive objects
set_shadow
Modify shadow settings — runtime-only preview (lost on reload). ASK the user first: runtime preview or persistent code change? Runtime preview — lost on page reload. You MUST ask the user first: runtime preview only, or also update source code?
| Parameter | Type | Description |
|---|---|---|
bias | number | Shadow bias (light only, e.g. -0.0001) |
blurSamples | number | Shadow blur samples (light only) |
cameraBottom | number | Shadow camera bottom (DirectionalLight) |
cameraFar | number | Shadow camera far plane |
cameraLeft | number | Shadow camera left (DirectionalLight) |
cameraNear | number | Shadow camera near plane |
cameraRight | number | Shadow camera right (DirectionalLight) |
cameraTop | number | Shadow camera top (DirectionalLight) |
castShadow | boolean | Enable/disable shadow casting |
mapSize | array | [width, height] shadow map resolution |
name | string | Object/light name |
normalBias | number | Shadow normal bias (light only) |
radius | number | Shadow blur radius (light only) |
receiveShadow | boolean | Enable/disable shadow receiving |
uuid | string | Object/light UUID |
scene_background
Inspect scene background, environment map (IBL), color management, backgroundBlurriness/Intensity
find_objects
Search scene objects by type, material, visibility, name pattern, or custom property. Returns matching objects with details.
| Parameter | Type | Description |
|---|---|---|
hasGeometry | boolean | Filter objects with/without geometry |
limit | number | Max results (default: 50, max: 200) |
material | string | Material name or type to filter by |
minChildren | number | Minimum number of children |
namePattern | string | Regex pattern to match object names |
property | string | Custom property name to check on the object |
type | string | Object type: Mesh, Group, InstancedMesh, Light, etc. |
value | Expected value for the custom property | |
visible | boolean | Filter by visibility |
memory_stats
Detailed GPU memory analysis: geometry buffers, texture VRAM, instance data, top textures by size
dispose_check
Find potential memory leaks: orphaned geometries/textures not in scene but tracked by renderer, hidden objects with geometry
toggle_wireframe
Toggle wireframe on all materials or a specific object. Runtime only — for visual debugging. Debug only — page reload will reset. No code changes needed.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | true=wireframe on, false=restore original, omit=toggle |
name | string | Object name (omit for whole scene) |
uuid | string | Object UUID |
bounding_boxes
Show/hide axis-aligned bounding boxes for scene objects. Runtime only — for debugging frustum culling and object bounds. Debug only — page reload will reset. No code changes needed.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | Remove all bounding boxes |
color | number | Box color as hex (default: 0x00ff00) |
enabled | boolean | true=show (default), false=remove all |
limit | number | Max boxes to add (default: 50) |
name | string | Target object name (omit for all meshes) |
onlyVisible | boolean | Only visible objects (default: true) |
recursive | boolean | Include children of target |
uuid | string | Target object UUID |
env_map_details
Inspect environment maps: scene.environment, scene.background, per-material envMap, IBL settings
scene_diff
Compare scene state over time. First call saves a snapshot, second call shows what changed (added/removed/modified objects, transforms, materials, lights).
| Parameter | Type | Description |
|---|---|---|
action | string | snapshot=save state, diff=compare with saved, auto=snapshot if none saved, diff if exists (default: auto) |
postprocessing_list
List post-processing passes from EffectComposer: render passes, shader passes, effects (bloom, SSAO, etc.)
gltf_to_r3f
Convert a GLTF/GLB file to a ready-to-use React Three Fiber component (like gltfjsx)
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Absolute or relative path to the .glb or .gltf file |
preload | boolean | Add useGLTF.preload() call (default: true) |
typescript | boolean | Generate TypeScript (default: true) |
take_screenshot
Capture a screenshot of the current Three.js scene
| Parameter | Type | Description |
|---|---|---|
height | number | Height in pixels |
width | number | Width in pixels |
bridge_status
Check bridge connection and proxy status
set_dev_port
Change the dev server port the proxy forwards to
| Parameter | Type | Description |
|---|---|---|
port * | number | The dev server port (e.g. 3000, 5173, 8080) |