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 "Install 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-mcpCreate 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: Excalidraw MCP Server
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/eduardosm123/mcp-3d-llm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server