threejs-editor-mcp
This server lets an AI agent create, inspect, edit, and manage Three.js projects through MCP tools, with human collaboration via a sandboxed editor.
Project management: list, create (empty or pong), open, inspect, check, copy, and export projects.
Scene editing: apply revision-checked batches of scene changes such as adding/removing/updating objects, replacing scripts, and updating project settings.
Live diagnostics: check project errors/warnings and record Play diagnostics per revision.
Asset import: store GLB, PNG, or JPEG assets with size and type validation.
Human/agent sync: pull and push project snapshots with revision/conflict handling, preserving dirty changes.
Workspace support: work with linked local projects or managed projects, including multi-file ESM/TypeScript, shaders, WebGL/WebGPU, and revision-bound assets.
Provides tools for creating, editing, running, and inspecting Three.js game projects, including scene hierarchy management, transform controls, asset import (GLB/PNG/JPEG), and project export.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@threejs-editor-mcp Create a new Three.js project with a rotating cube"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
threejs-editor-mcp
English | 简体中文
Build and tune Three.js projects with an AI Agent inside DeepSeek Harness. The Agent edits source. You inspect the live scene, move objects, adjust parameters, and press Play in the same chat card. Both sides work on the same project revision.
Watch the 80-second showcase · Install · Migrate from V1 · Add a community case
What 0.2.0 adds
Open an authorized local project as a Linked Workspace and edit it in place.
Build multi-file ESM, TypeScript, GLSL, WGSL, and TSL for WebGL or WebGPU.
Keep Scene, Properties, TransformControls, parameters, source files, and Runtime diagnostics tied to one revision.
Run project code in a nested sandbox that owns its renderer, loop, input, assets, and GPU cleanup.
Agent edits source
-> Editor reloads the revision
-> You adjust the scene or parameters
-> Play runs that revision
-> Runtime evidence informs the next Agent turnRelated MCP server: BrowserCard-AI-Broker
Architecture
flowchart LR
Agent["Harness Agent"] -->|"model-visible tools"| Host["dsh-uni-editor"]
Host --> Server["threejs-editor-mcp<br/>stdio server"]
Server --> Store["project.json<br/>diagnostics.json<br/>assets/"]
Server -->|"resources/read"| App["MCP App Sandbox<br/>Three.js Editor"]
App -->|"app-only tools"| Host
Human["Human"] --> AppThe Editor uses the official three npm package. It is a product-owned,
lightweight editor inspired by the official Three.js Editor; no Editor source
is vendored and no separate web service is required.
Install
Install the MCP Apps Host and this MCP Server:
dsh plugin --profile web add @creative-dswork/dsh-uni-editor
npm install --global threejs-editor-mcp@0.2.0
threejs-editor-mcp --root /absolute/path/to/threejs-projectsOr run the Server without a global install:
npx --yes threejs-editor-mcp@0.2.0 --root /absolute/path/to/threejs-projectsFor a global install, configure the mcp-apps row in
~/.dsh/profiles/web/cordis.patch.yml (or
$DSH_HOME/profiles/web/cordis.patch.yml when set) and replace the initial
[]:
- id: mcp-apps
config:
maxBodyBytes: 2097152
servers:
- serverName: threejs
transport: stdio
command: threejs-editor-mcp
forwardWorkspace: true
args:
- --root
- /absolute/path/to/threejs-projectsTo let npm resolve the package directly, use npx in the same configuration:
- id: mcp-apps
config:
maxBodyBytes: 2097152
servers:
- serverName: threejs
transport: stdio
command: npx
forwardWorkspace: true
args:
- --yes
- threejs-editor-mcp@0.2.0
- --root
- /absolute/path/to/threejs-projectsThe root can also be provided with THREEJS_EDITOR_PROJECT_ROOT. It stores
managed projects and is not the local game directory selected in DSH Web.
Start DSH Web, add the existing Three.js project as the current Workspace, and ask the Agent to open the current project. The Editor opens that directory in place; no path is passed as a model tool argument. See User Operations for the development workflow and security boundaries.
Capabilities
emptyand playablepongproject templates;hierarchy, viewport picking, transform controls, Inspector, undo/redo;
V1 Scene projects with one
start/update/disposegame script;V2 Linked and Managed Workspaces with multi-file ESM/TypeScript, shaders, WebGL, WebGPU, source maps, and revision-bound assets;
isolated Runtime ownership for renderer loops, keyboard, and pointer input;
revision-checked human saves and model changes;
revision-bound Play diagnostics;
GLB, PNG, and JPEG import plus self-contained project export;
clean reload and dirty conflict preservation.
Model-visible tools:
list_projects, create_project, open_editor, inspect_project,
apply_scene_changes, and check_project.
App-only tools:
pull_project, push_project, save_project_copy, report_diagnostics,
put_asset, and export_project.
Asset Limits
Assets are local only. V1 Scene assets are limited to 256 KiB each, eight files, and 512 KiB total. V2 Workspaces default to 2,048 files, 16 MiB each, and 128 MiB total. The Server validates paths, file ownership, quotas, content digests, and supported asset forms.
The JSON export contains the saved project, exact revision, and base64 copies of its original assets. The MCP Apps Host mediates the download because direct downloads are blocked inside the Sandbox.
Development
Requires Node.js 22.19 or newer and pnpm 10.25.
pnpm install
pnpm run check
pnpm run test:packRun the server directly:
pnpm run build
node dist/server.js --root .tmp/projectsSee Contributing, Community Cases, V1/V2 Migration, and Dependency Profile.
Security
Projects and assets are confined to the configured root. Project writes are size-bounded, revision-checked, serialized per project, and committed with temporary-file rename. Project paths, asset paths, symlinks, stale revisions, oversized payloads, mismatched file types, and external asset URLs are rejected. Game scripts run only in the existing different-origin double iframe Sandbox. See Security for the threat model and reporting process.
License
MIT
Available Tools
12 toolsapply_scene_changesApply Three.js scene changesB
Applies one revision-checked batch of bounded scene, script, or project changes.
Inputs: projectId (required), operations (required), baseRevision (required). Returns: title, changes, conflict, revision, +2 more
check_projectCheck Three.js projectC
Checks scene and camera loading, script syntax, and diagnostics for the current revision.
Inputs: projectId (required). Returns: title, errors, revision, testedAt, +3 more
create_projectCreate Three.js projectB
Creates an empty or Pong Three.js project and opens its editor.
Inputs: projectId (required), title, template. Returns: title, revision, projectId
export_projectExport Three.js projectB
Returns a bounded JSON export containing the saved project and original assets.
Inputs: projectId (required). Returns: json, filename, mediaType
inspect_projectInspect Three.js projectB
Reads the current scene, script, diagnostics, and recent human edit operations.
Inputs: projectId (required). Returns: title, assets, layout, script, +6 more
list_projectsList Three.js projectsA
Lists projects available in the configured Three.js project root.
Inputs: no named parameters. Returns: projects
open_editorOpen Three.js editorA
Opens the editor for an existing Three.js project.
Inputs: projectId (required). Returns: title, revision, projectId
pull_projectPull Three.js projectC
Returns the project when the editor revision is stale.
Inputs: projectId (required), currentRevision. Returns: changed, project, revision, projectId
push_projectSave Three.js projectC
Saves one editor snapshot when its base revision is current.
Inputs: project (required), projectId (required), baseRevision (required). Returns: title, conflict, revision, projectId, +1 more
put_assetImport Three.js assetB
Stores one bounded GLB, PNG, or JPEG asset for the current project revision.
Inputs: data (required), name (required), mediaType (required), projectId (required), +1 more. Returns: asset, conflict, revision, projectId, +1 more
report_diagnosticsReport Three.js Play diagnosticsC
Records Play errors and warnings for one exact project revision.
Inputs: errors (required), warnings (required), projectId (required), testedRevision (required). Returns: errors, warnings, updatedAt, testedRevision
save_project_copySave Three.js project copyC
Persists the editor snapshot under a new project ID.
Inputs: project (required), newProjectId (required), sourceProjectId. Returns: title, revision, projectId
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have clearly distinct purposes, but inspect_project and check_project both report diagnostics, and create_project also opens the editor, creating slight overlap. Descriptions generally help agents choose correctly.
All tool names follow a consistent verb_noun snake_case pattern (e.g., open_editor, list_projects, apply_scene_changes), making the API predictable and easy to navigate.
With 12 tools, the server is well-scoped for a Three.js project editor, covering project lifecycle, scene manipulation, and diagnostics without unnecessary bloat.
Core workflows such as create, open, inspect, modify, save, and export are covered, but missing operations like delete_project or asset retrieval leave minor gaps in full lifecycle management.
Maintenance
Related MCP Connectors
Build, run and publish 3D games in the Zero engine from Claude Code, Cursor or Codex, over MCP.
- VULKDeprecatedio.github.devjoaocastro
Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for inspecting and manipulating Three.js/Threlte scenes in real-time.8MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets an LLM build, inspect and drive a running BrowserCard deck live in the browser.MIT
- AlicenseAqualityDmaintenanceMCP server that lets an LLM agent drive StableProjectorz, a 3D modeling app, by inspecting the loaded model, app state, viewport screenshots, and triggering UI actions via a loopback socket bridge.11MIT
- AlicenseNot gradedqualityCmaintenanceTurns DeepSeek Harness into an MCP server with tools for session management, agent execution, resources, and OAuth, plus browser automation and GitHub/GitLab integration.30 npm20MIT