
Three.js DevTools MCP
io.github.DmitriyGolub由 GitHub 帳號 DmitriyGolub 發布v0.2.1更新於 Oct 26, 2026
Inspect and edit Three.js scenes, materials, shaders, lights in real time from any AI agent
概覽
本機 MCP 伺服器,讓 AI 助理即時檢視並直接修改瀏覽器中的 Three.js 場景,再把變更轉成程式碼。
- 可以做什麼
- 檢視執行中 Three.js 場景的場景樹、物件、材質、著色器、貼圖、燈光與相機
- 即時預覽材質屬性、燈光、相機等變更,並提供變更前後程式碼與還原功能
- 除錯視覺化:線框、包圍盒、輔助物件,以及瀏覽器內的開發者面板
- 稽核網站畫布、貼圖、陰影、色彩空間與繪製呼叫問題,並擷取影格序列用於影片
- 將變更匯出為原生 Three.js 或 React Three Fiber 程式碼,並可在 Playwright 或 Puppeteer 測試中操作場景
- 適用情境
- 適合開發 Three.js 或 React Three Fiber 專案時使用:讓助理排查模型看不見、互動式調整外觀、稽核算圖效能,或錄製宣傳短片,而不必先改動專案程式碼。
- 執行需求
- 透過 npx(Node.js)以 stdio 在本機執行。需先啟動 Three.js 開發伺服器,連接埠會從 package.json 自動偵測或用 DEV_PORT 指定。預設會在橋接連接埠(BRIDGE_PORT,預設 9222)自動開啟瀏覽器,可將 BROWSER 設為 none 關閉;CHROME_PATH 與 HEADLESS 為選用。使用期間瀏覽器分頁必須保持開啟。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Three.js DevTools MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
threejs-devtools-mcp
[npm version] [license] [build] [MCP Registry]
MCP server for inspecting Three.js scenes in real time, trying changes live in the browser, and turning them into code. 69 tools cover objects, materials, shaders, textures, animation, performance and memory, plus website audits, video frame capture and Playwright helpers.
Zero changes to your project. Works with vanilla Three.js and React Three Fiber, on WebGLRenderer and WebGPURenderer.
Setup
1. Add the MCP server
Claude Code
Claude Desktop
Add to claude_desktop_config.json:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
VS Code (Copilot)
Add to .vscode/mcp.json:
OpenCode
Add to opencode.json in your project:
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
Look now vs. change the code
Every tool is labelled, so you and the AI always know what touches your files:
Every live-preview change is recorded. pending_changes returns each one as before → after with ready-to-paste code (vanilla Three.js and React Three Fiber) and where to find it in your project. revert_changes undoes them in the browser.
For websites and videos
web_audit: checks for a blurry canvas (pixel ratio, missing resize), battery drain (rendering while idle or off-screen), heavy textures (oversized, not KTX2), expensive shadows, wrong color space and too many draw calls. Each finding comes with the fix.capture_frames: records a frame sequence for promo clips and reels. Time is virtualised, so the output is perfectly smooth at 30/60 fps even if your scene renders slowly. You get theffmpegcommand for MP4/WebM.
Skills
Ready-made workflows show up as slash commands in Claude Code, Cursor and other clients: inspect-scene, try-look, apply-to-code, web-perf-audit, prepare-video, debug-invisible, playwright-setup.
Playwright & Puppeteer
Three ways to connect, same tools in all of them: your own browser (default), a Chrome launched by the server (HEADLESS / CDP_PORT, shareable with Playwright MCP), or your own tests:
See Browsers, Puppeteer & Playwright.
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.
Tip: name your objects
Unnamed objects show as (unnamed) in the scene tree. Named objects are easier to find and modify:
Documentation
- Tools reference — all 69 tools by mode, skills, parameters
- Browsers, Puppeteer & Playwright — connection modes, e2e tests, CI tips
- Advanced setup — animations, scene export, configuration, transports
- Cursor setup — step-by-step guide for Cursor
- Token-efficient workflow — best practices for saving context
License
MIT
來源:README.md,提交 8151443
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分