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
feat(mcp-tools): make the catalog reachable, linkable, and legible
nirholasf017a92dd00c
diff --git a/docs/mcp-safety.md b/docs/mcp-safety.mdindex f1c7aafca..04a91eb6c 100644--- a/docs/mcp-safety.md+++ b/docs/mcp-safety.md@@ -17,6 +17,11 @@ the rest tells you how the check works and how to satisfy it.- Browse every tool and its safety class: [MCP Tool Catalog](/mcp-tools)- Machine-readable, same data: [`/mcp-catalog.json`](/mcp-catalog.json)+[](/mcp-tools?safety=irreversible)++*The catalog filtered to the tools that cannot be undone. Every filter is in the+URL, so [that view](/mcp-tools?safety=irreversible) is a link you can send someone.*+---## What the hints mean here@@ -33,20 +38,24 @@ the rest tells you how the check works and how to satisfy it.The catalog collapses the first two rows into one **safety class** per tool, whichis what the catalog page filters on:-| Class | Derived from | Count today |-| --- | --- | --- |-| `read` | `readOnlyHint: true` | 181 |-| `write` | `readOnlyHint: false`, `destructiveHint: false` | 70 |-| `irreversible` | `readOnlyHint: false`, `destructiveHint: true` | 19 |+| Class | Derived from |+| --- | --- |+| `read` | `readOnlyHint: true` |+| `write` | `readOnlyHint: false`, `destructiveHint: false` |+| `irreversible` | `readOnlyHint: false`, `destructiveHint: true` |++For how many tools are in each class right now, read the catalog rather than a+number typed into a doc:-Counts come from `/mcp-catalog.json`, which is regenerated from source on every-build. The catalog is the number that is current; the table above is a snapshot.+```bash+curl -s https://three.ws/mcp-catalog.json | jq '.counts'+```---## What you can rely on-**A read-only tool never changes anything you asked about.** Four read tools warm+**A read-only tool never changes anything you asked about.** A few read tools warman internal cache while they answer you (the Oracle conviction cache, the on-chainattestation cache). Those writes are the server's own bookkeeping, they are wrappedso a failure still returns your answer, and they never change your result. They are@@ -61,6 +70,12 @@ payment declare `readOnlyHint: false`, and the irreversible ones declare`true` when omitted, so a tool with no annotations tells every client that aharmless read might be dangerous. The build fails on that.+Opening any tool shows the four hints it declares, its price, and a call+snippet. For a paid tool the snippet names the payment step rather than handing+you a command that answers `402`.++[](/mcp-tools?tool=mint_3d_asset)+### Reading it from a client```bashdiff --git a/docs/mcp-tools.md b/docs/mcp-tools.mdindex 8c6584ed2..0b043c343 100644--- a/docs/mcp-tools.md+++ b/docs/mcp-tools.md@@ -14,6 +14,11 @@ page explains how the servers are grouped and how the paid ones charge.> The tables below are a curated orientation to the servers, not the full index.> Where a figure here and the catalog disagree, the catalog is right.+[](/mcp-tools)++*The catalog on a phone. Search, filters and the per-tool detail all work at+320px, so you can look a tool up from anywhere.*+> Source: [`api/mcp-studio.js`](../api/mcp-studio.js) (free),> [`api/mcp-3d.js`](../api/mcp-3d.js) + [`api/_mcp3d/pricing.js`](../api/_mcp3d/pricing.js)> (paid studio), `api/_mcp*/` + `packages/*-mcp` (agent/commerce tools).diff --git a/docs/mcp.md b/docs/mcp.mdindex 8dd8d647a..fc8bb2155 100644--- a/docs/mcp.md+++ b/docs/mcp.md@@ -808,7 +808,7 @@ Contributors: `npm run audit:mcp-safety` enforces this. It parses each tool's ha- [MCP Tools Catalog](/docs/mcp-tools): every three.ws MCP tool, its server, and its price- [MCP tool safety](/docs/mcp-safety): what the safety annotations promise, and how they are verified-- [MCP Tool Catalog](/mcp-tools): the searchable index of all 270 tools, generated from source+- [MCP Tool Catalog](/mcp-tools): the searchable index of every tool, generated from source- [3D Studio MCP (free)](/docs/mcp-studio): the no-auth, no-payment 3D generation server- [Spatial MCP](/docs/spatial-mcp): returning live 3D scenes as native MCP responses- [x402](/docs/x402): the USDC micropayment rail behind the paid toolsdiff --git a/pages/mcp-tools.html b/pages/mcp-tools.htmlindex 48042eb35..6a020732e 100644--- a/pages/mcp-tools.html+++ b/pages/mcp-tools.html@@ -123,8 +123,10 @@.mc-card:active { transform: translateY(0); }.mc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }.mc-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }- .mc-name { font: 600 0.92rem/1.3 var(--font-mono, ui-monospace, monospace); color: var(--ink-bright, var(--ink)); word-break: break-word; }- .mc-title { font-size: 0.78rem; color: var(--ink-dim); margin-top: 2px; }+ /* Both are spans inside one cell, so they must be blocks or the mono name+ and the human title run together on a single line. */+ .mc-name { display: block; font: 600 0.92rem/1.3 var(--font-mono, ui-monospace, monospace); color: var(--ink-bright, var(--ink)); word-break: break-word; }+ .mc-title { display: block; font-size: 0.78rem; color: var(--ink-dim); margin-top: 3px; line-height: 1.35; }.mc-desc {font-size: 0.84rem; line-height: 1.5; color: var(--ink-dim); margin: 0;display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;@@ -225,7 +227,7 @@<span class="sr-only" data-i18n="mcp_tools.search_tools">Search tools</span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg><input id="mc-q" type="search" autocomplete="off" spellcheck="false"- placeholder="Search 270 tools by name, description, or server…" />+ placeholder="Search tools by name, description, or server…" /><span class="mc-kbd" aria-hidden="true"><kbd>/</kbd></span></label>@@ -316,18 +318,18 @@function renderStats() {const c = catalog.counts;const cells = [- ['Tools', c.tools],- ['Servers', c.servers],- ['Read-only', c.read],- ['Writes', c.write],- ['Irreversible', c.irreversible],- ['Free', c.free],- ['Paid', c.paid],+ ['Tools', c.tools, 'Every tool three.ws publishes over MCP'],+ ['Servers', c.servers, 'Hosted endpoints plus installable npm servers'],+ ['Read-only', c.read, SAFETY_BLURB.read],+ ['Writes', c.write, SAFETY_BLURB.write],+ ['Irreversible', c.irreversible, SAFETY_BLURB.irreversible],+ ['Free', c.free, 'No payment, wallet, or key required'],+ ['Paid', c.paid, 'Settled per call in USDC over x402'],];statsEl.innerHTML = cells.map(- ([label, value]) =>- `<div class="mc-stat"><dt>${esc(label)}</dt><dd>${value}</dd></div>`,+ ([label, value, hint]) =>+ `<div class="mc-stat" title="${esc(hint)}"><dt>${esc(label)}</dt><dd>${value}</dd></div>`,).join('');}@@ -352,8 +354,8 @@? esc(tool.description): '<em>Composed at request time. Call tools/list on the server for the live text.</em>';const price = tool.price.free- ? '<span class="mc-badge mc-badge-free">Free</span>'- : `<span class="mc-badge mc-badge-price">${esc(priceLabel(tool.price))} USDC</span>`;+ ? '<span class="mc-badge mc-badge-free" title="No payment, no wallet, no key">Free</span>'+ : `<span class="mc-badge mc-badge-price" title="Costs ${esc(priceLabel(tool.price))} USDC per call, settled over x402">${esc(priceLabel(tool.price))} USDC</span>`;return (`<button type="button" class="mc-card" data-index="${index}">` +'<span class="mc-card-top"><span>' +@@ -362,7 +364,7 @@'</span></span>' +`<p class="mc-desc">${desc}</p>` +'<span class="mc-badges">' +- `<span class="mc-badge" data-safety="${tool.safety}">${SAFETY_LABEL[tool.safety]}</span>` ++ `<span class="mc-badge" data-safety="${tool.safety}" title="${esc(SAFETY_BLURB[tool.safety])}">${SAFETY_LABEL[tool.safety]}</span>` +price +`<span class="mc-server">${esc(tool.server.title)}</span>` +'</span></button>'@@ -407,10 +409,26 @@method: 'tools/call',params: { name: tool.name, arguments: {} },};- const snippet =- tool.server.transport === 'remote'- ? `curl -X POST https://three.ws${tool.server.endpoint} \\\n -H 'content-type: application/json' \\\n -d '${JSON.stringify(call)}'`- : `${tool.server.endpoint}\n\n# then call ${tool.name} from your MCP client`;++ // A bare curl at a paid tool answers 402, not data. Showing it without+ // that step would send every reader down a dead end, so the snippet+ // names the payment handshake instead of pretending it is free.+ let snippet;+ if (tool.server.transport !== 'remote') {+ snippet = `${tool.server.endpoint}\n\n# then call ${tool.name} from your MCP client`;+ } else {+ const curl =+ `curl -X POST https://three.ws${tool.server.endpoint} \\\n` ++ ` -H 'content-type: application/json' \\\n` ++ ` -d '${JSON.stringify(call)}'`;+ snippet = tool.price.free+ ? curl+ : `# ${tool.name} costs $${priceLabel(tool.price).replace('$', '')} USDC per call.\n` ++ `# Called without payment it returns a PaymentRequired quote:\n${curl}\n\n` ++ `# Settle the quote and retry with the payment in _meta, or let a\n` ++ `# paying client do it for you:\n` ++ `npx -y @three-ws/mcp-bridge --url https://three.ws${tool.server.endpoint}`;+ }dialogIn.innerHTML ='<div class="mc-detail-head">' +@@ -459,8 +477,20 @@});dialog.showModal();+ setToolParam(tool.name);+ }++ /** Keep ?tool= in sync so one tool can be linked to directly. */+ function setToolParam(name) {+ const params = new URLSearchParams(location.search);+ if (name) params.set('tool', name);+ else params.delete('tool');+ const qs = params.toString();+ history.replaceState(null, '', qs ? `?${qs}` : location.pathname);}+ dialog.addEventListener('close', () => setToolParam(null));+grid.addEventListener('click', (event) => {const card = event.target.closest('.mc-card');if (card) openDetail(visible[Number(card.dataset.index)]);@@ -576,6 +606,14 @@readUrl();syncChips();render();++ const linked = new URLSearchParams(location.search).get('tool');+ if (linked) {+ const tool = catalog.tools.find((t) => t.name === linked);+ // A stale or mistyped ?tool= must not silently swallow the deep link.+ if (tool) openDetail(tool);+ else countEl.textContent += ` (no tool named "${linked}")`;+ }}load();diff --git a/public/docs/img/mcp-catalog-irreversible.png b/public/docs/img/mcp-catalog-irreversible.pngnew file mode 100644index 000000000..50fe0677bBinary files /dev/null and b/public/docs/img/mcp-catalog-irreversible.png differdiff --git a/public/docs/img/mcp-catalog-mobile.png b/public/docs/img/mcp-catalog-mobile.pngnew file mode 100644index 000000000..97ba895d8Binary files /dev/null and b/public/docs/img/mcp-catalog-mobile.png differdiff --git a/public/docs/img/mcp-tool-detail.png b/public/docs/img/mcp-tool-detail.pngnew file mode 100644index 000000000..1ada2f43aBinary files /dev/null and b/public/docs/img/mcp-tool-detail.png differdiff --git a/public/mcp-catalog.json b/public/mcp-catalog.jsonindex f9a9bf43b..e9ccf62b3 100644--- a/public/mcp-catalog.json+++ b/public/mcp-catalog.json@@ -2824,8 +2824,7 @@{"name": "submit_creation","title": "Submit a creation to the Loom gallery",- "description": null,- "descriptionIsDynamic": true,+ "description": "Contribute a forged 3D creation to Loom, the PUBLIC, world-readable community gallery. ⚠️ Anything you submit becomes visible to everyone on the platform, so only post models you intend to share. Requires `prompt` (the text that forged it, ≤1000 chars) and `glbUrl` (an https URL to the GLB, hosted on an allowed domain: three.ws, r2.dev, cloudflarestorage.com, replicate.delivery, githubusercontent.com). Optional: `author` attribution (free text, ≤40 chars — NOT an authenticated identity; defaults to \"anon\"), `previewImageUrl`, `tier`, and `backend`. No key or account is needed; the endpoint is rate-limited to ~20 submissions per hour per IP. Re-submitting the exact same glbUrl returns the existing creation instead of duplicating it. Returns the stored creation with its id and a ready-to-use viewer_url + iframe_snippet. The only coin this platform references is $THREE — never put any other token in a prompt.","server": {"id": "loom-mcp","title": "@three-ws/loom-mcp",diff --git a/scripts/lib/mcp-safety-check.mjs b/scripts/lib/mcp-safety-check.mjsindex d6ede2c52..6f1429ca3 100644--- a/scripts/lib/mcp-safety-check.mjs+++ b/scripts/lib/mcp-safety-check.mjs@@ -87,6 +87,23 @@ function stringValue(node, constStrings = new Map(), seen = new Set()) {if (node.type === 'Identifier' && constStrings.has(node.name) && !seen.has(node.name)) {return stringValue(constStrings.get(node.name), constStrings, new Set([...seen, node.name]));}+ // `… + ALLOWED_HOSTS.join(', ') + …`: a literal list rendered into the copy.+ if (+ node.type === 'CallExpression' &&+ node.callee.type === 'MemberExpression' &&+ node.callee.property?.name === 'join' &&+ node.callee.object?.type === 'Identifier' &&+ constStrings.has(node.callee.object.name)+ ) {+ const array = constStrings.get(node.callee.object.name);+ if (array?.type === 'ArrayExpression') {+ const parts = array.elements.map((el) => stringValue(el, constStrings, seen));+ if (parts.every((part) => part !== null)) {+ const sep = stringValue(node.arguments[0], constStrings, seen) ?? ',';+ return parts.join(sep);+ }+ }+ }return null;}@@ -101,7 +118,9 @@ function collectConstStrings(ast, relPath, depth = 1) {const out = new Map();walk(ast, (node) => {if (node.type !== 'VariableDeclarator' || node.id?.type !== 'Identifier') return;- if (node.init && STRINGY_NODES.includes(node.init.type)) out.set(node.id.name, node.init);+ if (node.init && (STRINGY_NODES.includes(node.init.type) || node.init.type === 'ArrayExpression')) {+ out.set(node.id.name, node.init);+ }});if (depth <= 0) return out;