canvas3d-mcp
The canvas3d-mcp server gives AI agents the ability to create, render, validate, interact with, and inspect 2D/3D art and games inside HTML <canvas> using a headless Chromium environment.
Render Scenes: Generate multi-angle screenshots (front, side, top, custom views, close-ups) or sequential animation frames of Three.js, WebGL, Canvas 2D, pixel art, and 2D illustration scenes from an HTML file.
Validate Scenes: Run structured diagnostics returning a JSON report with page/console errors, blank canvas detection, deep Three.js scene-graph checks (floating objects, missing lights, NaN transforms, out-of-frustum meshes, texture/UV issues, camera clipping), and pixel art checks (anti-aliasing, palette overflow) — each with severity level and a concrete fix suggestion.
Playtest Games: Execute automated playtest scripts simulating keyboard/mouse inputs, waits, screenshots, and game state reads (
window.__state()) to verify gameplay mechanics like movement, jumping, collision, and scoring.Inspect Scene Graph: Dump the full Three.js scene tree with world-space positions, bounding boxes, rotations, and material/geometry info for precise debugging and object placement.
Get Guidelines & Helper Libraries: Access curated guides and ready-to-use JavaScript libraries covering workflow, 3D modeling, procedural texturing, per-technology pitfalls, 2D art/UI, pixel art, and game development — including helpers like
three-helpers.js,pixel-helpers.js,game2d.js, andgame3d.jsfor procedural textures, character controllers, AABB collision, tilemaps, particles, and more.Multi-file Project Support: Serve an entire project folder so HTML files can reference local assets and scripts.
Allows AI agents to create, render, validate, and interact with 3D scenes and games using the Three.js library, including multi-angle screenshots and playtesting.
Provides capabilities for AI agents to build and analyze raw WebGL content, including rendering, validation, and interaction with 3D graphics.
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., "@canvas3d-mcp Create a 3D robot with Three.js and render from multiple angles"
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.
canvas3d-mcp
Servidor MCP que dá a agentes de IA olhos e instrumentos para criar arte e jogos em <canvas> HTML: modelos 3D (Three.js, WebGL puro, Canvas 2D por software), ilustração 2D, UI de jogos, pixel art e jogos 2D/3D jogáveis (com playtest automatizado). Suporta projetos multi-arquivo (a pasta do HTML de entrada é servida inteira).
A IA escreve um arquivo HTML auto-contido; o servidor renderiza em Chromium headless e devolve:
render_scene— screenshots multi-ângulo (front/side/top/three-quarter ou ângulos custom, close-up viadistance_factor < 1) ou frames sequenciais de animação (animation_frames+frame_interval_ms). A IA passa a ver o que criou e itera.validate_scene— relatório JSON estruturado: erros de página/console, canvas em branco, e (com Three.js registrado) checks profundos do grafo de cena: objetos flutuando, sem luzes, fora do frustum, transform NaN, texturas sem UV, clipping de câmera etc. Para pixel art (window.__pix):ANTI_ALIASING(pixels borrados/fora da grade) ePALETTE_OVERFLOW. Cada issue vem com severidade e sugestão de correção.interact_scene— playtest: executa um roteiro de inputs (teclas seguradas, cliques, esperas) intercalado com screenshots e leituras dewindow.__state(), para a IA verificar que o gameplay funciona (player anda? pula? pontua?). Inclui estimativa de FPS.inspect_scene— dump da árvore de cena Three.js com bounding boxes em coordenadas de mundo, para raciocinar sobre posicionamento exato.get_guidelines— guias (workflow, ofício 3D geral, texturização, armadilhas por tecnologia, ilustração 2D + UI de jogos, pixel art).
Bibliotecas de helpers servidas em /__helpers/ para o HTML da IA:
Lib | Para | Destaques |
| Three.js |
|
| Canvas 2D | mini-engine 3D por software ( |
| WebGL puro |
|
| todas |
|
| ilustração 2D / UI |
|
| pixel art |
|
| jogos 2D |
|
| jogos 3D |
|
Setup
npm install
npx playwright install chromiumRelated MCP server: 3d-eyes
Registrar no Claude Code
# escopo do projeto atual:
claude mcp add canvas3d -- npx tsx "C:\Users\use\Desktop\ESTUDO\3d canvas improve\src\index.ts"
# ou disponível em todos os projetos:
claude mcp add --scope user canvas3d -- npx tsx "$PWD\src\index.ts"
# para confirmar
claude mcp listDepois peça, por exemplo: "usando as tools do canvas3d, crie um robô 3D em Three.js — leia get_guidelines('workflow') primeiro e itere com render/validate até ficar bom".
O loop que a IA segue
get_guidelines("workflow")→ convenções e snippetsescreve o HTML (com helpers, registrando
window.__sceneouwindow.__setView)render_scene→ olha todos os ângulosvalidate_scene→ corrige errors, depois warningsrepete até imagem + relatório ficarem bons
Desenvolvimento
npm test # vitest: unit + integração (Playwright real)
npm run typecheck # tsc --noEmit
npx tsx scripts/smoke-render.ts examples/good-threejs-robot.html # render direto, salva JPGs
npx tsx scripts/smoke-mcp.ts # smoke da camada MCP via stdioEstrutura: src/ (servidor MCP + pipeline Playwright + análise), src/probe/injected/ (scripts injetados na página), helpers/ (libs servidas ao HTML), guidelines/ (guias), examples/ (cenas boas + defects/ que disparam cada validador), tests/.
Notas de plataforma (descobertas empiricamente nesta máquina)
WebGL headless funciona sem flags (SwiftShader). Override:
CANVAS3D_BROWSER_ARGS.O primeiro contexto WebGL criado logo após o launch do browser é perdido (corrida de init do processo GPU). Mitigado por warmup no launch + reload automático da página quando o snapshot detecta contexto perdido.
Canvas WebGL "render-once" pode capturar em branco (buffer descartado após present). O probe força
preserveDrawingBuffer: truee o servidor chamawindow.__redrawantes de capturar.
Available Tools
5 toolsget_guidelinesGet 3D modeling guidelines and helper library docsA
Returns curated guides for building good 3D canvas scenes. Call topic 'workflow' BEFORE writing your first scene — it explains the write→render→validate loop, the helper libraries served at /__helpers/, and the conventions (window.__scene / __setView / __ready) that unlock multi-angle screenshots and deep validation.
Inputs: topic (required).
inspect_sceneDump the Three.js scene graph with world-space dataA
Returns the scene tree (names, types, positions, rotations, world bounding boxes, geometry and material info) for a scene that registers window.__scene. Use it to reason about EXACT placement and sizes when fixing issues reported by validate_scene (e.g. which Y puts the hat on the head). Three.js only.
Inputs: file_path (required), max_depth, filter, width, +4 more.
interact_scenePlaytest a game: send inputs and watch what happensA
Loads a game HTML file and executes a script of inputs (key presses/holds, clicks, waits) interleaved with screenshots and state reads, so you can VERIFY the gameplay you wrote actually works: does the player move, jump, collide, score? Games should expose window.__state = () => ({...}) for read_state assertions. Always playtest after building or changing game mechanics — a game that renders is not a game that plays.
Inputs: file_path (required), script (required), format, width, +4 more.
render_sceneRender a 3D canvas scene and see it from multiple anglesA
Renders an HTML file containing a 3D scene (Three.js, raw WebGL or Canvas 2D) in a headless browser and returns screenshots from multiple camera angles, so you can SEE what you built. ALWAYS call this after writing or editing scene HTML, look hard at every angle, fix problems and render again. Multi-angle needs window.__scene (Three.js) or window.__setView (other tech) — call get_guidelines topic 'workflow' first if unsure. Use distance_factor < 1 in a custom view for close-ups of textures/details.
Inputs: file_path (required), views, animation_frames, frame_interval_ms, +6 more.
validate_sceneRun structured diagnostics on a 3D canvas sceneA
Loads the scene HTML and returns a JSON report: page/console errors, blank-canvas and detail analysis of the rendered pixels, and — when window.__scene is registered (Three.js) — deep scene-graph checks: floating objects, missing lights, out-of-frustum meshes, NaN transforms, missing UVs/normals, camera clipping, texture problems. Each issue has a severity and a concrete fix suggestion. Fix errors first, then warnings. Call this after render_scene whenever something looks wrong, and at least once before declaring the scene done.
Inputs: file_path (required), include_screenshot, width, height, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: get_guidelines provides workflow guidance, inspect_scene explores the scene tree, interact_scene tests game interactions, render_scene produces screenshots, and validate_scene checks for errors. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (get_guidelines, inspect_scene, interact_scene, render_scene, validate_scene) with clear, descriptive verbs that reflect their actions.
5 tools is well-scoped for a 3D canvas helper server: it covers guidance, inspection, interaction, rendering, and validation without being too few or excessive for the domain.
The tools cover the core workflow of building, rendering, inspecting, validating, and testing scenes. Minor gaps like scene editing or asset import tools exist but are outside the server's stated focus, so completeness is high.
Related MCP Connectors
Generate images, GIFs, videos, and PDFs from HTML, URLs, or templates — from your AI agent.
Generate 3D models, worlds, PBR materials, and coordinated asset packs from AI agents.
Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.
On-brand creative studio for AI agents: images, video, audio, and 3D.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to control and manipulate live 3D scenes across frameworks like Three.js, A-Frame, and Babylon.js using a comprehensive set of object and environment tools. It features an integrated in-world chat system that allows for real-time scene modifications directly from within the 3D canvas.333MIT
- AlicenseNot gradedqualityDmaintenanceEnables coding agents to visually inspect and diagnose 3D files (meshes and Gaussian splats) for defects like flipped normals or floaters, without GPU dependencies.MIT

Rayzia MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents to drive a live SVG/vector editor, allowing a full observe-and-act loop on a canvas with real tools, state reading, and PNG rendering.2MIT- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate and modify Three.js 3D scenes by providing a wide range of tools for scene setup, cameras, geometry, materials, lighting, controls, loaders, animation, interaction, helpers, post-processing, environment, UI, physics, and XR.2-