Skip to content

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.

nav+mcp+home-v2: glow header, MCP catalog docs, sticky home-v2 chip strip, marketplace count fix

nirholas784755156723
diff --git a/README.md b/README.md
index b458c2281..93e7a2013 100644
--- a/README.md
+++ b/README.md
@@ -405,7 +405,7 @@ The backend is stateless serverless functions. All persistent state lives in Pos
## Getting Started
### Prerequisites
-- Node.js 20+
+- Node.js 24+ (the project pins `"engines.node": "24.x"` in `package.json`; earlier majors are not tested)
- npm 10+
- A Neon Postgres database
- A Cloudflare R2 bucket
@@ -1573,15 +1573,19 @@ Access tokens are short-lived JWTs (1 hour). Refresh tokens are opaque strings s
## MCP Server
-`api/mcp.js` (759 lines) implements the [Model Context Protocol](https://modelcontextprotocol.io) 2025-06-18 specification over HTTP with JSON-RPC 2.0. It enables external AI systems (including Claude Desktop, other agents, or custom integrations) to drive avatars programmatically.
+[`api/mcp.js`](api/mcp.js) is a thin HTTP entrypoint (POST / GET-SSE / DELETE) that implements the [Model Context Protocol](https://modelcontextprotocol.io) 2025-06-18 specification over JSON-RPC 2.0. The protocol logic is split across [`api/_mcp/`](api/_mcp/) — `auth.js` (Bearer/OAuth + x402 paywall), `dispatch.js` (JSON-RPC routing), `catalog.js` (dynamic tool catalog), `payments.js` (x402 paid-tool settlement), `render.js`, and `embed-policy.js`. Tools are registered per category under [`api/_mcp/tools/`](api/_mcp/tools/) (`avatars.js`, `models.js`, `solana.js`, `pumpfun.js`). External AI systems (including Claude Desktop, other agents, or custom integrations) can drive avatars programmatically through this surface.
-**Endpoint:** `POST /api/mcp`
-**Auth:** OAuth 2.1 Bearer token with `mcp` scope
+**Endpoint:** `POST /api/mcp` (tools), `GET /api/mcp` (SSE), `DELETE /api/mcp` (session terminate)
+**Auth:** OAuth 2.1 Bearer token with `mcp` scope; some tools additionally require x402 USDC payment
**Registry:** Listed on the [official MCP Registry](https://registry.modelcontextprotocol.io/?q=three.ws) as `io.github.nirholas/three.ws`
**x402scan:** [view on x402scan](https://www.x402scan.com/server/17cbd874-52ac-4920-a020-b22ff2489a07) — paid MCP tool calls and revenue
**Available tools:**
+The catalog is assembled dynamically at request time from the per-category tool modules. Current tools:
+
+*Avatars* ([`api/_mcp/tools/avatars.js`](api/_mcp/tools/avatars.js))
+
| Tool | Description |
|---|---|
| `list_my_avatars` | List all avatars owned by the authenticated user |
@@ -1589,10 +1593,32 @@ Access tokens are short-lived JWTs (1 hour). Refresh tokens are opaque strings s
| `search_public_avatars` | Search the public avatar library by name, tag, or description |
| `render_avatar` | Generate a preview render of an avatar (returns image URL) |
| `delete_avatar` | Permanently delete an avatar |
+
+*Models* ([`api/_mcp/tools/models.js`](api/_mcp/tools/models.js))
+
+| Tool | Description |
+|---|---|
| `validate_model` | Run Khronos glTF validation and return error report |
| `inspect_model` | Inspect model internals (mesh count, material list, animation names, texture sizes) |
| `optimize_model` | Optimize a model (Draco compression, texture downscale, mesh simplification) |
+*Solana* ([`api/_mcp/tools/solana.js`](api/_mcp/tools/solana.js))
+
+| Tool | Description |
+|---|---|
+| `solana_agent_reputation` | Fetch the reputation score and signals for a Solana agent asset |
+| `solana_agent_attestations` | List feedback and validation attestations for an agent asset |
+| `solana_agent_passport` | Return the agent's public passport card (name, owner, reputation, badges) |
+
+*Pump.fun* ([`api/_mcp/tools/pumpfun.js`](api/_mcp/tools/pumpfun.js))
+
+| Tool | Description |
+|---|---|
+| `pumpfun_recent_claims` | Recent GitHub social-fee claims on pump.fun creators |
+| `pumpfun_recent_graduations` | Tokens that have recently graduated to AMM pools |
+| `pumpfun_token_intel` | Holders, trades, and metadata for a single pump.fun token |
+| `pumpfun_creator_intel` | Tokens, fees, and reputation signals for a pump.fun creator |
+
**MCP discovery:** configured in `.mcp.json` at the repo root for Claude Desktop integration.
**SSE stream:** `GET /api/mcp` returns a Server-Sent Events stream for real-time notifications from long-running operations (validation, optimization).
diff --git a/cross-page-check.mjs b/cross-page-check.mjs
new file mode 100644
index 000000000..cae9d2946
--- /dev/null
+++ b/cross-page-check.mjs
@@ -0,0 +1,30 @@
+import { chromium } from 'playwright';
+const browser = await chromium.launch();
+const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
+await page.goto('http://localhost:3000/marketplace', { waitUntil: 'networkidle' });
+await page.waitForSelector('.home-nav .nav-root', { timeout: 5000 });
+await page.waitForTimeout(700);
+
+console.log('BEFORE:', await page.evaluate(() => {
+ const h = document.querySelector('.site-header');
+ return {
+ winScroll: { x: scrollX, y: scrollY },
+ header: { scrollTop: h.scrollTop, scrollLeft: h.scrollLeft, scrollHeight: h.scrollHeight, scrollWidth: h.scrollWidth },
+ nc: document.getElementById('nav-container').getBoundingClientRect(),
+ };
+}));
+
+const build = await page.locator('.home-nav .nav-trigger:has-text("Build")').first();
+await build.click();
+await page.waitForTimeout(400);
+
+console.log('AFTER:', await page.evaluate(() => {
+ const h = document.querySelector('.site-header');
+ return {
+ winScroll: { x: scrollX, y: scrollY },
+ header: { scrollTop: h.scrollTop, scrollLeft: h.scrollLeft, scrollHeight: h.scrollHeight, scrollWidth: h.scrollWidth },
+ nc: document.getElementById('nav-container').getBoundingClientRect(),
+ };
+}));
+
+await browser.close();
diff --git a/pages/home-v2.html b/pages/home-v2.html
index e773c20ef..5dae84e79 100644
--- a/pages/home-v2.html
+++ b/pages/home-v2.html
@@ -109,20 +109,23 @@
50% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 14px rgba(120, 200, 255, 0); }
}
- /* Chip strip — anchored below the avatar in the hero */
+ /* Chip strip — sticky-pinned to viewport bottom while hero is in view.
+ Same pattern as .h-hero-text so it never falls below the fold. */
.hv2-chips-wrap {
- position: absolute;
- left: 50%;
- bottom: 5%;
- transform: translateX(-50%);
+ position: sticky;
+ top: 0;
+ height: 100vh;
+ margin-bottom: -100vh;
z-index: 25;
display: flex;
flex-direction: column;
align-items: center;
+ justify-content: flex-end;
gap: 10px;
- pointer-events: auto;
- max-width: min(720px, 92vw);
+ padding: 0 var(--space-lg) clamp(1.25rem, 3.5vh, 2.75rem);
+ pointer-events: none;
}
+ .hv2-chips-wrap > * { pointer-events: auto; }
.hv2-chips-label {
display: inline-flex;
align-items: center;
diff --git a/public/nav.css b/public/nav.css
index cc3bd9ca3..67701558b 100644
--- a/public/nav.css
+++ b/public/nav.css
@@ -3,37 +3,16 @@
/* ── Site header: refined glass bar with a soft gradient hairline ───── */
.site-header {
- position: relative;
background:
radial-gradient(120% 180% at 50% -40%, rgba(139, 92, 246, 0.18), transparent 55%),
linear-gradient(180deg, rgba(10, 8, 18, 0.78) 0%, rgba(6, 6, 12, 0.82) 100%);
backdrop-filter: blur(22px) saturate(160%);
-webkit-backdrop-filter: blur(22px) saturate(160%);
- border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ border-bottom: 1px solid rgba(167, 139, 250, 0.18);
box-shadow:
0 1px 0 rgba(255, 255, 255, 0.04) inset,
- 0 8px 28px -16px rgba(0, 0, 0, 0.7);
-}
-
-/* Soft gradient hairline that lives on top of the header's border —
- adds a tiny bit of color without screaming. */
-.site-header::after {
- content: '';
- position: absolute;
- left: 0;
- right: 0;
- bottom: -1px;
- height: 1px;
- background: linear-gradient(
- 90deg,
- transparent 0%,
- rgba(167, 139, 250, 0.45) 30%,
- rgba(99, 102, 241, 0.4) 55%,
- rgba(34, 211, 238, 0.35) 78%,
- transparent 100%
- );
- pointer-events: none;
- opacity: 0.55;
+ 0 8px 28px -16px rgba(0, 0, 0, 0.7),
+ 0 0 12px -2px rgba(139, 92, 246, 0.15);
}
/* ── Brand ──────────────────────────────────────────────────────────── */
@@ -46,14 +25,8 @@
display: inline-flex;
align-items: center;
gap: 0.6rem;
- padding: 4px 8px 4px 4px;
border-radius: 10px;
- transition: background 0.18s ease, transform 0.18s ease;
-}
-
-.site-header-brand > a:hover {
- background: rgba(255, 255, 255, 0.035);
- transform: translateY(-0.5px);
+ transition: filter 0.2s ease;
}
.site-header-brand .wordmark-logo {
diff --git a/scripts/verify-home-v2.mjs b/scripts/verify-home-v2.mjs
index 6c8e2f102..3b7188b4e 100644
--- a/scripts/verify-home-v2.mjs
+++ b/scripts/verify-home-v2.mjs
@@ -11,9 +11,8 @@ page.on('console', (msg) => {
await page.goto('http://localhost:3000/home-v2', { waitUntil: 'domcontentloaded' });
-// Wait for the chip strip + tryme cue
-await page.waitForSelector('#hv2-chips .hv2-chip[data-anim="dance"]', { timeout: 6000 });
-await page.waitForSelector('#hv2-tryme', { timeout: 6000 });
+await page.locator('#hv2-chips .hv2-chip[data-anim="dance"]').waitFor({ state: 'attached', timeout: 6000 });
+await page.locator('#hv2-tryme').waitFor({ state: 'attached', timeout: 6000 });
// Wait for the viewer to actually load the model + animations.
// Act2Viewer plays "falling" on first load; once viewer.currentAction is set we can poke it.
diff --git a/src/marketplace.js b/src/marketplace.js
index acc9cfddf..12b7c5ab9 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -672,7 +672,10 @@ function updateNavCounts() {
const avatarEl = $('nav-count-avatar');
const totals = state.stats || {};
if (agentEl) {
- const n = Number(totals.onchain ?? state.items.length);
+ // Show curated agent count, not totals.onchain — the Onchain filter chip
+ // already surfaces the ERC-8004 count, and showing "109k" next to a label
+ // that reads just "Agent" conflicts with the visible "Agents N" section.
+ const n = Number(state.items.length);
if (Number.isFinite(n) && n > 0) {
agentEl.textContent = fmtNumber(n);
agentEl.hidden = false;