Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title data-i18n="spatial_mcp_index.meta_title">Spatial MCP: reference renderer</title>
<meta name="description" content="The open standard for returning a live, interactive 3D scene as a first-class MCP tool result, with a framework-free reference renderer that displays any conformant artifact: including ones transformed from other tools." data-i18n-attr="content:spatial_mcp_index.meta_description"/>
<script src="/model-viewer-meshopt.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@google/[email protected]/dist/model-viewer.min.js"></script>
<style>
:root { color-scheme: dark; --accent:#6ea8fe; }
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; }
body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: radial-gradient(130% 130% at 50% 0%, #14161c 0%, #0b0c10 60%, #08090c 100%); color:#e8eaf0; }
.page { max-width: 1000px; margin: 0 auto; padding: 32px 20px 64px; }
h1 { font-size: 22px; margin: 0 0 6px; }
.lede { color:#9aa3b2; font-size:14px; line-height:1.55; max-width: 62ch; }
.lede a { color: var(--accent); }
.grid { display:grid; grid-template-columns: 1fr; gap: 20px; margin-top: 26px; }
@media (min-width: 760px){ .grid { grid-template-columns: 1fr 1fr; } }
.card { border:1px solid rgba(255,255,255,0.08); border-radius:14px; overflow:hidden; background: rgba(12,14,19,0.6); }
.card h2 { font-size:13px; letter-spacing:.02em; text-transform:uppercase; color:#aeb6c4; margin:0; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,0.07); }
.stage { height: 340px; background: transparent; position:relative; }
.spatial-empty { display:flex; align-items:center; justify-content:center; height:100%; color:#9aa3b2; font-size:13px; text-align:center; padding:20px; }
/* Renderer states (see the header of spatial-renderer.js). The skeleton sits
under the viewer's transparent canvas while the GLB downloads; the error
box replaces the viewer when the asset cannot be fetched or decoded. */
.spatial-loading { position:absolute; inset:0; z-index:0;
background: linear-gradient(100deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.03) 70%);
background-size: 200% 100%; animation: spatial-shimmer 1.6s ease-in-out infinite; }
@keyframes spatial-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spatial-error { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; height:100%; padding:20px; text-align:center; color:#e8eaf0; font-size:13px; }
.spatial-error p { margin:0; max-width:46ch; color:#9aa3b2; line-height:1.55; }
pre { margin:0; padding:14px; font-size:12px; line-height:1.5; overflow:auto; max-height:340px; color:#cbd3e1; }
.note { margin-top:24px; font-size:13px; color:#9aa3b2; line-height:1.6; }
code { color:#dbe9ff; }
/* Conformance surface: the validator's verdict, on screen, for every payload
the page renders. Status is carried by a glyph AND a word, never colour alone. */
:root { --ok:#4ade80; --err:#f87171; --warn:#fbbf24; }
.conf { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 14px; border-top:1px solid rgba(255,255,255,0.07); font-size:12px; color:#9aa3b2; }
.chip { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px; border:1px solid; font-size:11px; font-weight:600; letter-spacing:.02em; }
.chip-ok { color:var(--ok); border-color:rgba(74,222,128,0.35); background:rgba(74,222,128,0.10); }
.chip-err { color:var(--err); border-color:rgba(248,113,113,0.35); background:rgba(248,113,113,0.10); }
.chip-warn { color:var(--warn); border-color:rgba(251,191,36,0.32); background:rgba(251,191,36,0.10); }
/* Payload checker */
.checker { display:grid; gap:12px; padding:14px; }
.checker-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.btn, .spatial-retry { font:inherit; font-size:12px; padding:7px 12px; border-radius:8px; cursor:pointer; color:#e8eaf0;
border:1px solid rgba(255,255,255,0.14); background:rgba(255,255,255,0.04);
transition: background 140ms ease, border-color 140ms ease, transform 140ms ease; }
.btn:hover, .spatial-retry:hover { background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.24); }
.btn:active, .spatial-retry:active { transform:translateY(1px); }
.btn:focus-visible, .spatial-retry:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.btn-primary { color:#cfe0ff; background:rgba(110,168,254,0.14); border-color:rgba(110,168,254,0.45); }
.btn-primary:hover { background:rgba(110,168,254,0.22); border-color:rgba(110,168,254,0.65); }
.checker textarea { width:100%; min-height:220px; resize:vertical; padding:12px; border-radius:10px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; line-height:1.5;
color:#cbd3e1; background:rgba(0,0,0,0.35); border:1px solid rgba(255,255,255,0.10); }
.checker textarea:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.report { display:grid; gap:6px; }
.report-pills { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
/* The checker's own stage sits inside a padded card, so it needs its own edge to
read as a viewport rather than as empty card space. */
#stage-check { border:1px solid rgba(255,255,255,0.08); border-radius:10px; background:rgba(0,0,0,0.22); }
.diag { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:baseline;
padding:8px 10px; border-radius:8px; background:rgba(255,255,255,0.04); font-size:12.5px; line-height:1.5; }
.diag code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space:nowrap; }
.diag-err { box-shadow: inset 2px 0 0 var(--err); }
.diag-warn { box-shadow: inset 2px 0 0 var(--warn); }
.diag-note { color:#9aa3b2; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
@media (prefers-reduced-motion: reduce) { .btn, .spatial-retry { transition:none; } .spatial-loading { animation:none; } }
</style>
<link rel="canonical" href="https://three.ws/spatial-mcp">
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<meta property="og:type" content="website">
<meta property="og:site_name" content="three.ws">
<meta property="og:locale" content="en_US">
<meta property="og:title" content="Spatial MCP: reference renderer · three.ws" data-i18n-attr="content:spatial_mcp_index.meta_og_title">
<meta property="og:description" content="The open standard for returning a live, interactive 3D scene as a first-class MCP tool result, with a framework-free reference renderer that displays any conformant artifact: including ones transformed from other tools." data-i18n-attr="content:spatial_mcp_index.meta_og_description">
<meta property="og:url" content="https://three.ws/spatial-mcp">
<meta property="og:image" content="https://three.ws/api/page-og?s=labs&t=Spatial+MCP%3A+reference+renderer&d=The+open+standard+for+returning+a+live%2C+interactive+3D+scene+as+a+first-class+MCP+tool+result%2C+with+a+framework-free+reference+renderer+that+displays+any&p=%2Fspatial-mcp">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:type" content="image/png">
<meta property="og:image:alt" content="Spatial MCP: reference renderer, on three.ws">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@trythreews">
<meta name="twitter:title" content="Spatial MCP: reference renderer · three.ws" data-i18n-attr="content:spatial_mcp_index.meta_twitter_title">
<meta name="twitter:description" content="The open standard for returning a live, interactive 3D scene as a first-class MCP tool result, with a framework-free reference renderer that displays any conformant artifact: including ones transformed from other tools." data-i18n-attr="content:spatial_mcp_index.meta_twitter_description">
<meta name="twitter:image" content="https://three.ws/api/page-og?s=labs&t=Spatial+MCP%3A+reference+renderer&d=The+open+standard+for+returning+a+live%2C+interactive+3D+scene+as+a+first-class+MCP+tool+result%2C+with+a+framework-free+reference+renderer+that+displays+any&p=%2Fspatial-mcp">
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Spatial MCP: reference renderer","description":"The open standard for returning a live, interactive 3D scene as a first-class MCP tool result, with a framework-free reference renderer that displays any conformant artifact: including ones transformed from other tools.","url":"https://three.ws/spatial-mcp","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=labs&t=Spatial+MCP%3A+reference+renderer&d=The+open+standard+for+returning+a+live%2C+interactive+3D+scene+as+a+first-class+MCP+tool+result%2C+with+a+framework-free+reference+renderer+that+displays+any&p=%2Fspatial-mcp"}]}</script>
</head>
<body>
<div class="page">
<h1 data-i18n="spatial_mcp_index.spatial_mcp_reference_renderer">Spatial MCP: reference renderer</h1>
<p class="lede" data-i18n-html="spatial_mcp_index.spatial_mcp_makes_a_live_interactive_3d">
<strong>Spatial MCP</strong> makes a live, interactive 3D scene a first-class MCP tool result, not a URL in text.
This page is the reference renderer for the open artifact shape. It renders the conformant payload below,
including one <em>transformed from a different (foreign) tool's output</em>, proving the shape is portable.
Spec: <a href="https://github.com/nirholas/three.ws/blob/main/specs/SPATIAL_MCP.md">SPATIAL_MCP.md</a>.
</p>
<div class="grid">
<div class="card">
<h2 data-i18n="spatial_mcp_index.three_ws_forge_free_artifact">three.ws forge_free → artifact</h2>
<div id="stage-native" class="stage"></div>
<div id="conf-native" class="conf"></div>
</div>
<div class="card">
<h2 data-i18n="spatial_mcp_index.foreign_tool_result_conformant_artifact">Foreign tool result → conformant artifact</h2>
<div id="stage-foreign" class="stage"></div>
<div id="conf-foreign" class="conf"></div>
</div>
</div>
<div class="card" style="margin-top:20px;">
<h2 data-i18n="spatial_mcp_index.the_foreign_result_transformed_what_the_rend">The foreign result, transformed (what the renderer consumes)</h2>
<pre id="artifact-json"></pre>
</div>
<div class="card" style="margin-top:20px;">
<h2 data-i18n="spatial_mcp_index.check_your_own_payload">Check your own payload</h2>
<div class="checker">
<p class="lede" style="max-width:70ch;" data-i18n="spatial_mcp_index.checker_lede">
Paste a tool result below. The same validator the spec ships runs on it as you type, in your
browser, and names the field to fix rather than answering yes or no. Conformant payloads render
underneath; unusable ones get the designed fallback, never a blank frame.
</p>
<div class="checker-bar">
<button class="btn" type="button" data-preset="conformant" data-i18n="spatial_mcp_index.load_a_conformant_example">Load a conformant example</button>
<button class="btn" type="button" data-preset="broken" data-i18n="spatial_mcp_index.load_a_broken_example">Load a broken example</button>
<button class="btn btn-primary" type="button" id="check-render" data-i18n="spatial_mcp_index.render_this_payload">Render this payload</button>
</div>
<label class="sr-only" for="payload-input" data-i18n="spatial_mcp_index.spatial_mcp_artifact_json">Spatial MCP artifact JSON</label>
<textarea id="payload-input" spellcheck="false" autocapitalize="off" autocorrect="off"></textarea>
<div id="check-report" class="report" role="status" aria-live="polite"></div>
<div id="stage-check" class="stage"></div>
</div>
</div>
<p class="note" data-i18n-html="spatial_mcp_index.a_third_party_mcp_server_that_returns">
A third-party MCP server that returns <code>{ url, previewImage }</code> becomes conformant with a tiny adapter;
see <a href="/docs/spatial-mcp">docs/spatial-mcp</a>. Any renderer that speaks this shape (this one included) then
displays it. No payment, wallet, or coin surface anywhere in the shape or the renderer.
</p>
</div>
<!-- The demo driver is a sibling module, not an inline script: see the comment at
the top of demo.js for why an inline import cannot work on this route. -->
<script type="module" src="/spatial-mcp/demo.js"></script>
<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
<script type="module" src="/i18n.js"></script>
</body>
</html>