maige-3d-mcp
m{ai}geXR-3d-mcp
Der Multi-Framework-3D-MCP-Server, der tatsächlich funktioniert. Steuern Sie Live-Three.js-, A-Frame-, Babylon.js- und React Three Fiber-Szenen von jedem MCP-fähigen KI-Tool aus — GitHub Copilot, Claude Desktop, Cursor, was auch immer — mit In-World-Async-Chat, sodass Sie aus dem Inneren des 3D-Canvas mit der KI sprechen können, während diese die Welt um Sie herum neu gestaltet.
Alle vier Framework-Clients rendern übereinstimmende, visuell ausgerichtete Ausgaben aus einem einzigen, vereinheitlichten Szenenzustand. Gleicher Prompt, gleiche Szene, jede Engine.
Highlights
4 produktionsreife 3D-Clients — Three.js, A-Frame (1.7.0 + Bloom), Babylon.js (PBR), React Three Fiber + Zustand — alle visuell aufeinander abgestimmt
WebXR / VR-Unterstützung — tauchen Sie in allen vier Clients in immersive VR ein; ein schwebendes Chat-Panel folgt Ihrem Blick, sodass Sie aus dem Headset heraus mit der KI sprechen können
9 KI-Anbieter direkt einsatzbereit — OpenAI (GPT-5.2), Anthropic (Claude Sonnet 4.6), Google Gemini 3.1 Pro, Mistral, Groq (Llama 3.3 70B), xAI Grok-4, Cohere Command R+, Together.ai und lokales Ollama
23 MCP-Werkzeuge — Objekte, Lichter, Kameras, Animationen, Umgebung, Szenen-I/O, Rückgängig/Wiederherstellen, Screenshots und In-World-Chat
Persistente Animationen — Animationen überstehen das Neuladen der Seite; der Server speichert aktive Animationen im Szenenzustand und spielt sie beim erneuten Verbinden der Clients wieder ab
Gleichzeitige Animationen — mehrere Eigenschaften (Position, Rotation, Skalierung) werden gleichzeitig auf demselben Objekt über alle Engines hinweg animiert
Framework-spezifische System-Prompts — jeder Client weist die KI an, Geometrien, Materialien und Beleuchtung zu generieren, die in dieser Engine korrekt aussehen (adaptiert von der iOS maigeXR-App)
In-World-Chat — drücken Sie
~, um mit der KI zu sprechen, ohne das 3D-Viewport zu verlassen; sie liest Ihre Nachrichten und antwortet in einem schwebenden OverlaySzenenbewusste KI — 20-stufige Konversationshistorie + Live-Szenenzustandsinjektion stellen sicher, dass die KI inkrementelle Änderungen vornimmt, keine destruktiven Neuerstellungen
Ein Befehl —
pnpm devstartet den Server + alle vier Clients gleichzeitig; öffnet automatisch den Three.js-Client in Ihrem BrowserHot-Swappable KI-Anbieter — wechseln Sie den Anbieter mitten in der Sitzung über das Client-Dropdown; kein Neustart erforderlich
Related MCP server: threejs-devtools-mcp
Schnellstart
Option A — npx (kein Klonen erforderlich)
npx maige-3d-mcpDies startet den MCP-Server über stdio. Verweisen Sie Ihren MCP-Client (VS Code Copilot, Claude Desktop, Cursor) auf den Befehl npx maige-3d-mcp.
Option B — aus dem Quellcode
1. Installieren
cd mcp-webgpu
pnpm install2. Konfigurieren
cp .env.example .envFügen Sie mindestens einen API-Schlüssel hinzu. Alle Variablen:
Variable | Standard | Zweck | ||||||||
|
| WebSocket-Bridge-Port | ||||||||
|
| Aktiver KI-Anbieter ( |
|
|
|
|
|
|
|
|
| — | OpenAI | ||||||||
| — | Anthropic | ||||||||
| — | Google Gemini | ||||||||
| — | Mistral | ||||||||
| — | Groq | ||||||||
| — | xAI / Grok | ||||||||
| — | Cohere | ||||||||
| — | Together.ai | ||||||||
|
| Lokales Ollama | ||||||||
|
| Browser beim Start öffnen | ||||||||
|
| Welcher Client automatisch geöffnet werden soll ( |
|
|
|
Jeder Anbieter hat auch eine *_MODEL Umgebungsvariable (z. B. OPENAI_MODEL=gpt-4.1) — siehe .env.example für alle verfügbaren Modelle.
Zwei Chat-Modi:
Relay-Modus (kein Schlüssel erforderlich): Die MCP-Host-KI (Copilot, Claude Desktop) übernimmt den In-World-Chat durch Abfragen von
getPendingUserMessages.Direkt-Modus (Schlüssel in
.env): Der Server beantwortet den Chat autonom unter Verwendung des konfigurierten Anbieters.
3. Bauen & Ausführen
pnpm build:server # compile TypeScript once
pnpm dev # start server + all 4 clientsClients öffnen sich unter:
Framework | URL |
Three.js | |
A-Frame | |
Babylon.js | |
React Three Fiber |
4. Registrierung bei VS Code Copilot
Die .vscode/mcp.json ist vorkonfiguriert. Laden Sie VS Code neu und maige-3d-mcp erscheint im Copilot-Agenten-Modus.
Alternativ fügen Sie es zu Ihren globalen VS Code-Einstellungen hinzu:
// .vscode/mcp.json (already included)
{
"servers": {
"maige-3d-mcp": {
"type": "stdio",
"command": "node",
"args": ["packages/server/build/main.js"],
"env": {
"OPENAI_API_KEY": "${env:OPENAI_API_KEY}",
"ANTHROPIC_API_KEY": "${env:ANTHROPIC_API_KEY}",
"GOOGLE_API_KEY": "${env:GOOGLE_API_KEY}"
}
}
}
}Unterstützte KI-Anbieter (9)
Anbieter | Standardmodell | Verfügbare Modelle | Hinweise |
OpenAI |
| gpt-5.2, gpt-5.2-pro, gpt-4.1, gpt-4.1-mini, gpt-4o, o3, o4-mini | Beste Allzweck-Option |
Anthropic |
| claude-opus-4-6, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5 | Starke Argumentation |
Google Gemini |
| gemini-3.1-pro-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite | Aktuelles Flaggschiff, multimodal |
Mistral |
| mistral-large, mistral-medium, mistral-small, open-mistral-nemo | Schnell + leistungsfähig |
Groq |
| llama-3.3-70b, deepseek-r1-distill-llama-70b, llama-3.1-8b-instant, mixtral-8x7b | Rasante Inferenzgeschwindigkeit |
xAI / Grok |
| grok-4-0709, grok-4-fast-reasoning, grok-3, grok-3-mini, grok-code-fast-1 | Aktuelles Grok 4 |
Cohere |
| command-r-plus, command-r, command, command-light | Fokus auf Werkzeugnutzung |
Together.ai |
| DeepSeek-R1-Distill-70B-free, Llama-3.3-70B-free, Llama-3.3-70B, DeepSeek-R1, Qwen2.5-72B | Kostenlose Stufe verfügbar |
Ollama |
| llama3.2, mistral, phi4, gemma3, qwen2.5, deepseek-r1 | Vollständig lokal, kein API-Schlüssel |
Wechseln Sie die Anbieter über das Dropdown im Chat-Overlay oder durch Ändern von CHAT_PROVIDER in .env. Überschreiben Sie das Modell pro Anbieter mit *_MODEL Umgebungsvariablen (siehe .env.example).
Verfügbare MCP-Werkzeuge (23)
Objekte
Werkzeug | Beschreibung |
| Mesh hinzufügen — Box, Kugel, Zylinder, Kegel, Torus, Ebene, Kapsel oder glTF-Modell |
| Teilweises Update: Position, Rotation, Skalierung, Material (Farbe, Metallizität, Rauheit, Emission), Sichtbarkeit |
| Nach ID entfernen |
| Duplizieren mit optionalem Offset |
| Ein einzelnes Objekt untersuchen |
| Vollständiger Szenen-JSON-Snapshot |
Lichter
createLight · updateLight · deleteLight — Ambient, Direktional, Punkt, Spot, Hemisphäre
Kamera
setCamera · flyToObject
Animation
animateObject · stopAnimation — Rotieren, Springen, Pulsieren, Schweben, Drehen, benutzerdefinierte Keyframes. Animationen bleiben im Serverzustand erhalten und werden beim Neuladen der Seite automatisch wiedergegeben. Mehrere Eigenschaften werden pro Objekt gleichzeitig animiert.
Umgebung
setEnvironment — Hintergrundfarbe, Nebel, Tone Mapping, Belichtung, Schatten-Umschalter
Szene
clearScene · loadScene · exportScene · undo · redo · takeScreenshot
In-World-Chat
Werkzeug | Beschreibung |
| Nachrichten abrufen, die aus dem 3D-Canvas heraus getippt wurden |
| KI-Antwort im schwebenden Overlay anzeigen |
| Warteschlange leeren |
MCP-Ressourcen
URI | Beschreibung |
| Live-JSON-Snapshot aller Objekte, Lichter, Kamera und Umgebung |
| Liste der aktuell verbundenen Browser-Sitzungen (ID, Framework, Zeitstempel) |
MCP-Prompts
Prompt | Beschreibung |
| Vollständiger Systemkontext für KI-Assistenten — Szenenwerkzeuge, Chat-Workflow, Regeln für inkrementelle Updates, 10+ fortgeschrittene Demo-Rezepte (Galaxie, DNA-Helix, Neontunnel, Kristallcluster usw.) |
| Tipps zu Geometrie/Material/Beleuchtung pro Framework. Akzeptiert |
| NEU: Sofortiger Zugriff auf 10+ beeindruckende, vorgefertigte Demo-Vorlagen. Perfekt für schnelle, beeindruckende Visualisierungen. Akzeptiert |
WebXR / VR-Unterstützung
Alle vier Clients unterstützen immersive VR über WebXR. Klicken Sie auf die Schaltfläche 🥽 Enter VR (unten links), um eine Sitzung zu starten.
Framework | Implementierung |
Three.js | Benutzerdefiniertes |
A-Frame | Natives |
Babylon.js |
|
React Three Fiber |
|
In VR schwebt das Chat-Panel vor Ihnen und folgt Ihrem Blick. KI-Antworten erscheinen in Echtzeit, sodass Sie die Szene aus dem Headset heraus steuern können.
Erfordert einen WebXR-fähigen Browser (Chrome 79+, Edge 79+, Meta Quest Browser) und ein VR-Headset oder die WebXR API Emulator-Erweiterung für Desktop-Tests.
In-World-Chat
Drücken Sie ~ (Backtick) oder klicken Sie unten rechts auf AI Chat. Geben Sie eine Nachricht ein, drücken Sie Enter, und die KI empfängt sie, handelt danach und antwortet — alles ohne das 3D-Viewport zu verlassen. Das Chat-Overlay enthält außerdem:
Anbieter-Auswahl — KI-Anbieter im laufenden Betrieb wechseln
System-Prompt-Editor — das Verhalten der KI pro Sitzung anpassen
Szene löschen-Schaltfläche — die Welt sofort zurücksetzen
Debug-Panel — drücken Sie Escape, um den Szenenzustand und Verbindungsinformationen zu untersuchen
Architektur
┌─────────────────────────┐
│ MCP Host (Copilot, │ stdio / JSON-RPC
│ Claude, Cursor, etc.) │◄────────────────────┐
└─────────────────────────┘ │
│
┌──────────────────┴──────────────────┐
│ MCP Server (Node.js) │
│ │
│ tools/ ─ 23 tool definitions │
│ state/ ─ SceneStateManager + Undo │
│ chat/ ─ ChatRelay (9 providers) │
│ ws/ ─ WebSocket bridge :8083 │
│ └── adapters/ (per-framework) │
└──────────┬───────────────────────────┘
│ WebSocket
┌────────────────┬───────────────┼───────────────┬────────────────┐
▼ ▼ ▼ ▼ │
┌──────────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────────┐ │
│ Three.js │ │ A-Frame │ │ Babylon.js │ │ R3F / React │ │
│ :5173 │ │ :5174 │ │ :5175 │ │ :5176 │ │
│ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │ │
│ │VR/WebXR │ │ │ │VR/WebXR │ │ │ │VR/WebXR │ │ │ │VR/WebXR │ │ │
│ │ChatPanel │ │ │ │ChatPanel │ │ │ │ChatPanel │ │ │ │ChatPanel │ │ │
│ └──────────┘ │ │ └──────────┘ │ │ └──────────┘ │ │ └──────────┘ │ │
└──────────────┘ └──────────────┘ └───────────────┘ └──────────────┘Jeder Client verbindet sich über WebSocket mit demselben MCP-Server. Der Server verwaltet einen einzigen kanonischen Szenenzustand und sendet Befehle über Framework-spezifische Adapter, die Vec3-Formate, Materialmodelle und Geometrienamen in die native Darstellung der jeweiligen Engine übersetzen.
Wichtige Server-Funktionen:
Konversationshistorie — die KI erinnert sich an die letzten 20 Dialogschritte und vermeidet so destruktive Szenen-Neuerstellungen
Szenenzustandsinjektion — jeder KI-Aufruf enthält eine Zusammenfassung der aktuellen Objekte, Lichter und Umgebung, damit die KI weiß, was bereits existiert
Framework-spezifische System-Prompts — jeder Client weist die KI an, Geometrien, Materialien und Beleuchtung zu generieren, die in dieser spezifischen Engine korrekt aussehen
Rückgängig/Wiederherstellen — 20-stufiger Snapshot-Stack auf dem Server, ausgelöst über MCP-Werkzeuge
Animationspersistenz — aktive Animationen werden im Szenenzustand gespeichert und beim erneuten Verbinden wiedergegeben, sodass sich wiederholende Animationen das Neuladen der Seite überstehen
Projektlayout
mcp-webgpu/
├── .env.example ← all env vars + model lists documented
├── .vscode/mcp.json ← pre-configured for VS Code Copilot agent mode
├── package.json ← pnpm workspace root
├── PLAN.md ← full architecture plan
├── packages/
│ ├── server/ ← MCP server (TypeScript / Node)
│ │ └── src/
│ │ ├── main.ts ← entry + .env discovery
│ │ ├── types.ts ← shared types
│ │ ├── tools/ ← 23 MCP tool definitions
│ │ ├── handlers/ ← tool / prompt / resource handlers
│ │ ├── state/ ← SceneStateManager + UndoStack
│ │ ├── chat/ ← ChatRelay (9 providers) + MessageQueue
│ │ └── ws/ ← WebSocket server + framework adapters
│ │ └── adapters/ ← ThreeAdapter, AFrameAdapter,
│ │ BabylonAdapter, R3FAdapter
│ ├── client-threejs/ ← Three.js (Vite)
│ │ └── src/
│ │ ├── scene.ts ← SceneManager
│ │ ├── commands/ ← command dispatcher
│ │ ├── overlay/ ← ChatOverlay UI
│ │ └── vr/ ← VRSetup + VRChatPanel (WebXR)
│ ├── client-aframe/ ← A-Frame 1.7.0 + bloom (Vite)
│ │ └── src/
│ │ ├── scene.ts ← A-Frame SceneManager
│ │ ├── commands/ ← command dispatcher
│ │ └── overlay/ ← ChatOverlay UI
│ ├── client-babylonjs/ ← Babylon.js + PBR (Vite)
│ │ └── src/
│ │ ├── scene.ts ← Babylon SceneManager
│ │ ├── commands/ ← command dispatcher
│ │ └── overlay/ ← ChatOverlay UI
│ └── client-r3f/ ← React Three Fiber + Zustand (Vite)
│ └── src/
│ ├── App.tsx ← React app shell
│ ├── SceneCanvas.tsx ← R3F canvas + XR wrapper
│ ├── store/ ← Zustand scene store
│ ├── commands/ ← command dispatcher
│ ├── overlay/ ← ChatOverlay UI
│ └── vr/ ← VRChatPanel (React XR component)Roadmap
[x] Phase 1 — Three.js-Client + vollständiger Werkzeugsatz + In-World-Chat
[x] Phase 2 — A-Frame-Client (1.
Available Tools
33 toolsaddBehaviorA
Attach a continuous frame-tick behavior to an object. Behaviors run every frame until removed. Types: spin (rotate continuously), bob (oscillate up/down), orbit (circle around a point), lookAt (always face camera), pulse (rhythmic scale breathing).
Inputs: id (required), objectId (required), type (required), params.
animateObjectA
Animate an object property to a target value. Supports transforms (position, rotation, scale) and material properties (emissiveIntensity, opacity, color) for pulsing glow, fading, color shifts.
Inputs: id (required), property (required), to (required), duration, +2 more.
clearPendingMessagesA
Clear all queued in-world user messages (useful after processing a batch).
Inputs: no named parameters.
clearSceneA
Remove all user-created objects from the scene and reset default lighting.
Inputs: no named parameters.
cloneObjectC
Duplicate an object with an optional position offset.
Inputs: id (required), newId, offset.
createLightC
Add a light to the scene.
Inputs: lightType (required), id, color, intensity, +7 more.
createObjectA
Add a 3D object to the live scene. Returns the assigned id. Always call getSceneState first to understand what already exists.
Inputs: type (required), id, position, rotation, +12 more.
createParticlesA
Create a particle system (stars, dust, sparks, snow, fire embers, laser trails). Uses GPU-efficient point sprites with optional drift animation and twinkle.
Inputs: count (required), spread (required), id, position, +10 more.
deleteLightC
Remove a light from the scene by id.
Inputs: id (required).
deleteObjectC
Remove a 3D object from the scene by id.
Inputs: id (required).
deleteParticlesC
Remove a particle system from the scene.
Inputs: id (required).
executeScriptA
Execute arbitrary JavaScript code in the connected browser scene context. The code runs inside an async function with access to: scene (THREE.Scene), camera, renderer, controls, and a helpers object. Return a value to send it back. Use this for advanced effects the other tools cannot achieve — custom shaders, complex geometry, procedural generation, physics, etc.
Inputs: code (required).
exportSceneA
Export the current scene as a JSON string (can be stored and re-loaded later).
Inputs: no named parameters.
exportStandaloneSceneA
Export the current scene as a standalone HTML file that plays in any browser without a server. Includes all objects, lights, materials, animations, camera, and environment. No chat UI. Saved to the scenes/ folder. Returns the file path.
Inputs: name.
flyToObjectB
Smoothly move the camera to look at an object.
Inputs: id (required), distance, duration.
getObjectC
Get properties of a single scene object by id.
Inputs: id (required).
getPendingUserMessagesA
Return any in-world chat messages the user has typed from inside the 3D environment. Call this at the start of every turn to check for user input from the canvas.
Inputs: no named parameters.
getSceneStateA
Get the full current scene state: all objects, lights, camera, and environment. Call this first before making any changes.
Inputs: no named parameters.
listScenesB
List all saved scene JSON files in the scenes/ folder.
Inputs: no named parameters.
loadSceneB
Replace the entire scene with a previously exported scene JSON.
Inputs: sceneJson (required).
loadSceneFromFileC
Load a previously saved scene from the scenes/ folder by name.
Inputs: name (required).
redoB
Redo a previously undone scene change.
Inputs: no named parameters.
removeBehaviorC
Remove a behavior by its ID, stopping its frame-tick effect.
Inputs: id (required).
saveSceneB
Save the current scene to a JSON file in the scenes/ folder. Returns the file path.
Inputs: name.
sendChatMessageA
Display a message in the in-world chat overlay visible to the user inside the 3D view.
Inputs: message (required), sessionId.
setCameraC
Set the camera position and look-at target.
Inputs: position, target, fov.
setEnvironmentC
Configure the scene environment: background, fog, tone mapping, shadows, and post-processing effects.
Inputs: background, hdriUrl, fog, shadows, +5 more.
stopAnimationC
Stop any running animation on an object.
Inputs: id (required).
takeScreenshotA
Capture the current 3D viewport and return a base-64 PNG data URL. Requires a browser client to be connected.
Inputs: no named parameters.
undoB
Undo the last scene change (up to 20 levels).
Inputs: no named parameters.
updateLightC
Update an existing light by id.
Inputs: id (required), color, intensity, position, +1 more.
updateObjectC
Update any properties of an existing 3D object. Supports partial updates.
Inputs: id (required), position, rotation, scale, +2 more.
updateParticlesC
Update properties of an existing particle system.
Inputs: id (required), position, color, size, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 33 tools
Most tools have distinct purposes with clear boundaries, such as createObject vs. updateObject, or animateObject vs. addBehavior. However, some overlap exists: animateObject and addBehavior both handle object animations, which could cause confusion in selection, though their descriptions clarify animateObject is for property transitions while addBehavior is for continuous frame-tick effects.
Tool names follow a highly consistent verb_noun pattern throughout, such as createObject, deleteObject, updateObject, and getSceneState. All tools use camelCase uniformly, with no mixing of naming conventions, making the set predictable and easy to navigate.
With 33 tools, the count is borderline high for a 3D scene management server, potentially overwhelming for agents. While the tools cover a comprehensive range of operations, the number may feel heavy compared to typical well-scoped servers, though it aligns with the domain's complexity.
The tool set provides complete coverage for 3D scene management, including CRUD operations for objects, lights, and particles, scene state management, animation controls, user interaction handling, and advanced features like scripting and export. No obvious gaps exist; agents can perform full lifecycle workflows without dead ends.
Maintenance
Related MCP Connectors
Build, edit and publish live 3D, AR and game scenes in ARClip from your AI assistant.
Generate 3D models, worlds, PBR materials, and coordinated asset packs from AI agents.
3D avatars, embeds, glTF tools, agent memory, and on-chain agent identity from three.ws.
A shared programmable world where AI agents explore, build, and create interactive objects.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect and modify live Three.js scenes in real time through 59 tools covering objects, materials, shaders, textures, animations, performance monitoring, memory diagnostics, and code generation. Works with vanilla Three.js, React Three Fiber, and any framework without changing your project, using an injected browser bridge and in-page devtools overlay.6,808 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect and edit Three.js scenes, materials, shaders, lights, animations, and performance in real time, preview changes live in the browser, capture frames, and turn approved changes into code. It supports vanilla Three.js and React Three Fiber across WebGL/WebGPU without modifying the project.6,808 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect and edit live Three.js scenes in the browser — objects, materials, shaders, textures, lights, animation, performance and memory — with 69 tools covering scene trees, screenshots, website audits and video frame capture. Changes can be previewed live with zero project modifications, then converted into ready-to-paste vanilla Three.js or React Three Fiber code.6,808 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect, debug and edit Three.js scenes in real time from a live browser, covering objects, materials, shaders, textures, lights, animation, and performance. Live preview changes can be audited, reverted, or turned into ready-to-paste vanilla Three.js and React Three Fiber code without modifying the project.6,808 npmMIT