Logo Threejs Devtools MCP

Threejs Devtools MCP

Cộng đồng
DmitriyGolub

Three.js MCP server — inspect and edit scenes, materials, shaders, lights in real time from any AI agent

Nhà phát hànhDmitriyGolub
Kho mãthreejs-devtools-mcp
Ngôn ngữTypeScript
Bản fork
11
Sao
108
Công cụ có sẵn
60
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Threejs Devtools MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 60 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    108 sao và 11 bản fork từ kho mã được liên kết.

threejs-devtools-mcp

npm version license build MCP Registry

MCP server for inspecting and modifying Three.js scenes in real time — 59 tools for objects, materials, shaders, textures, animations, performance monitoring, memory diagnostics, and code generation.

Zero changes to your project. Works with vanilla Three.js, React Three Fiber, and any framework.

Annotated screenshot

Setup

1. Add the MCP server

bash
claude mcp add threejs-devtools-mcp -- npx threejs-devtools-mcp

Add to claude_desktop_config.json:

json
{
  "mcpServers": {
    "threejs-devtools-mcp": {
      "command": "npx",
      "args": ["-y", "threejs-devtools-mcp"]
    }
  }
}

Add to .cursor/mcp.json in your project:

json
{
  "mcpServers": {
    "threejs-devtools-mcp": {
      "command": "npx",
      "args": ["-y", "threejs-devtools-mcp"]
    }
  }
}

Or use the HTTP transport — see Cursor setup guide.

Add to ~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "threejs-devtools-mcp": {
      "command": "npx",
      "args": ["-y", "threejs-devtools-mcp"]
    }
  }
}

Add to .vscode/mcp.json:

json
{
  "servers": {
    "threejs-devtools-mcp": {
      "command": "npx",
      "args": ["-y", "threejs-devtools-mcp"]
    }
  }
}

Add to opencode.json in your project:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "threejs-devtools-mcp": {
      "type": "local",
      "command": ["npx", "-y", "threejs-devtools-mcp"],
      "enabled": true
    }
  }
}

2. Start your dev server and open the browser

Start your Three.js dev server as usual (npm run dev). The MCP server auto-detects the port from package.json and opens a browser at localhost:9222 with the devtools bridge injected.

Keep the browser tab open. The MCP server talks to your scene through a WebSocket bridge. Close the tab = tools stop working.

3. Ask the AI about your scene

"show me the scene tree"
"why is my model invisible?"
"make the car red"
"check for memory leaks"
"what's my FPS?"
"generate a React component from character.glb"

In-browser overlay

A built-in devtools panel with live performance stats, interactive scene graph, material editor, and 3D object preview. Activated automatically or via the toggle_overlay tool.

Overlay panel

Tip: name your objects

Unnamed objects show as (unnamed) in the scene tree. Named objects are easier to find and modify:

js
// Three.js
mesh.name = "player";
jsx
// React Three Fiber
<mesh name="player" geometry={geometry} material={material} />

Documentation

License

MIT

Cài đặt

TypingMind
{
  "mcpServers": {
    "threejs-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "threejs-devtools-mcp"
      ]
    }
  }
}

Công cụ có sẵn

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

  • object_details

    Get detailed info about a specific object by name, uuid, or path

  • material_list

    List all materials in the scene with type, color, transparency

  • material_details

    Get full properties of a material: color, maps, uniforms, defines

  • shader_source

    Get compiled vertex/fragment shader source and uniforms for a material

  • 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

  • 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?

  • 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?

  • 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?

  • 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?

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

  • 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?

    SHADER PATCHING RECIPE — when modifying materials via onBeforeCompile:

    1. Reset patch flags: mat._curvedWorldPatched = false; mat._windPatched = false;
    2. Delete old shader refs: delete mat.userData.shakeShader; stop old animations via mesh.userData._stopShake?.();
    3. ONE onBeforeCompile pass (never chain) — include curved world + your effect together
    4. Replace '#include <project_vertex>' with full transform: USE_BATCHING/USE_INSTANCING guards → effect in world space → curved world (worldPos.y -= dist²0.005) → viewMatrixworldPos → gl_Position
    5. Declare uniforms before main(): shader.vertexShader.replace('void main() {', 'uniform float uTime;\nvoid main() {')
    6. Set mat.customProgramCacheKey = () => 'effect-' + Date.now(); — forces recompilation
    7. mat.needsUpdate = tru
  • 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

  • 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?

  • 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?

  • 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?

  • 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?

  • 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?

  • skeleton_details

    List all skeletons/bones from SkinnedMesh objects in the scene

  • geometry_details

    Inspect geometry: vertices, attributes, indices, bounding box, morph attributes

  • 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?

  • raycast

    Cast a ray from camera through screen coordinates and return hit objects

  • 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?

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

  • remove_helper

    Remove a previously added debug helper

    Debug only — page reload will reset. No code changes needed.

  • 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?

  • 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?

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

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

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

  • 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).

  • postprocessing_list

    List post-processing passes from EffectComposer: render passes, shader passes, effects (bloom, SSAO, etc.)

  • console_capture

    Capture browser console output (log/warn/error). Returns last N messages. Call to check for runtime errors and warnings.

  • texture_preview

    Preview a specific texture as a PNG image. Use texture_list first to find names/UUIDs.

  • perf_monitor

    Record FPS and frame times for N seconds. Returns avg/min/max FPS, percentiles, spike and jank counts.

  • click_inspect

    Enable click-to-inspect mode. Cursor changes to crosshair — tell the user to click on an object in the 3D scene. Returns clicked object details.

  • scene_export

    Export scene or specific object as GLB. Requires GLTFExporter in your app (see error message for setup). Saves to screenshots/ folder.

  • gltf_to_r3f

    Convert a GLTF/GLB file to a ready-to-use React Three Fiber component (like gltfjsx)

  • take_screenshot

    Capture a screenshot of the current Three.js scene

  • annotated_screenshot

    Screenshot with labeled object names overlaid at their screen positions. Shows [M]esh, [L]ight, [G]roup, [C]amera tags. Great for AI to understand scene layout visually.

  • toggle_overlay

    Toggle a lightweight scene inspector overlay in the browser. Shows real-time FPS, draw calls, triangles, object count, scene tree, materials, and lights. Click objects in the tree to highlight them with wireframe. Debug only — page reload will reset.

    Debug only — page reload will reset. No code changes needed.

  • overlay_selected

    Get comprehensive details about the object currently selected in the overlay. Returns full material properties, geometry info, transforms, textures, uniforms, shadow settings — everything needed to understand and modify the object in code. The user must first select an object in the overlay by clicking on it.

  • bridge_status

    Check bridge connection and proxy status

  • set_dev_port

    Change the local dev server port the proxy forwards to

  • set_dev_url

    Connect to a remote Three.js app by URL for inspection and visual debugging. Source code changes are NOT possible in remote mode — only runtime/visual modifications.

Dùng MCP Threejs Devtools MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Threejs Devtools MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Threejs Devtools MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Threejs Devtools MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "threejs-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "threejs-devtools-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Threejs Devtools MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Threejs Devtools MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Threejs Devtools MCP giúp tôi làm việc này không?
Threejs Devtools MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Threejs Devtools MCP.

Câu hỏi thường gặp

Máy chủ MCP Threejs Devtools MCP dùng để làm gì?

Threejs Devtools MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Threejs Devtools MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Threejs Devtools MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Threejs Devtools MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Threejs Devtools MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Threejs Devtools MCP với TypingMind?

Threejs Devtools MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Threejs Devtools MCP cung cấp những công cụ nào trong TypingMind?

Threejs Devtools MCP cung cấp 60 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Threejs Devtools MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Threejs Devtools MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇