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): let any MCP client prepare a pump.fun launch for a human to sign
nirholas94f8a4675ba6
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 861755ca9..1bbd9a313 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Every pump.fun launch now carries a plain-English receipt**: /launches/<mint> gained a Launch receipt panel composing five on-chain facts into one readable object: whether the mint or freeze authority can still act (with a plain sentence for each, not just enabled/disabled), supply and decimals, the top-10 holder share, where trading fees route (a creator wallet, a fee-sharing config, cashback, or holder rewards), the creation transaction's version and byte size, and the Trade Safety Firewall's verdict. A coin that never launched through pump.fun gets an honest 'not a pump.fun launch' instead of an error, and a source that fails marks only its own section unavailable, never an invented number. Copy the receipt as text or download it as JSON; both carry a SHA-256 content hash of the response so a saved copy can be checked against a fresh read. A shareable 1200x630 card is available via GET /api/pump/launch-og?mint=<mint>&variant=receipt, and the composition itself is a new public endpoint, GET /api/pump/launch-receipt?mint=<mint>. (`/launches`) `[feature]`- **GitHub fee-claim channel now attributes withdrawals to a coin, or says plainly it cannot**: A GitHub identity withdrawing pump.fun fees through the claim_social_fee_pda instruction only proves payment to that identity, not which coin paid it: one GitHub fee account can be a shareholder on more than one coin, and its address can be pasted into a copycat coin's metadata. The claims feed and its Telegram channel now classify every such withdrawal with on-chain evidence: a same-transaction distribution to the exact account, or a 90%-dominant distribution history since the previous claim, then a repository-owner or creator-wallet match, down to an honest unresolved or unverified label when nothing proves a coin. A new-GitHub-account-plus-copycat-coin pattern holds the claim for review instead of posting it with a celebratory card. `[feature, security]`- **GitHub fee-claim feed now reads from a real-time listener, not just an on-demand RPC scan**: The claims feed's GitHub-attribution path used to walk Solana RPC history fresh on every request, the same cost every time, with nothing persisted in between. services/pump-claims is a standalone process that subscribes to PumpFees program logs directly, decodes and attributes each claim as it happens, and writes it to a new pump_fee_claims table with a watchdog that resubscribes on a stalled connection and gap-fills whatever a drop missed. The claims route now reads that table first and only falls back to the RPC scan when the table has nothing for the requested window, so PUMPFUN_BOT_URL is no longer required for GitHub claims specifically (ordinary wallet claims still use it). `[feature, infra]`+- **MCP clients can now prepare a pump.fun launch for you to sign**: The hosted MCP server gained pumpfun_prepare_launch: an assistant (Claude Desktop, Cursor, or any MCP client) that has agreed a coin name, ticker, description and image with you can call this tool to validate every field the same way the /launch page does, fetch and type/size-check the image through the SSRF-hardened fetcher, and hand back a pre-filled /launch URL plus a plain-English summary. The tool never signs or launches anything; it is marked read-only and non-destructive, and its response always carries requires_human_signature: true. Opening the returned link on /launch now shows a 'prepared from your assistant' banner so you know exactly which fields came from the conversation before you review and sign. (`/launch`) `[feature]`- **Robinhood Chain feed worker now runs the published SDK, not a stale local snapshot**: workers/robinhood-feed depended on robinhood/robinhood-chain-sdk through a file: link, a reference copy that drifts from the standalone robinhood-chain-sdk repo it mirrors. The worker now installs hoodchain from npm like any other dependency, so it always runs the released SDK. Also fixed: seven pointer READMEs staged for duplicate or superseded standalone repos (three-ui, crypto-market-data, crypto-market-data-ts, crypto-data-aggregator, memescope-monday-directory, and one of each duplicate Robinhood Chain repo pair), ready for the owner to push and archive. `[fix, infra]`- **Standalone GitHub mirrors now stage instead of force-pushing**: scripts/sync-standalone-repos.mjs force-pushed straight to main on every run, which could silently create duplicate repos for the eleven mirrors already renamed on GitHub and bypassed the owner's push-approval rule. data/standalone-mirrors.json is now the single source of truth for which monorepo directory maps to which public repo, read by every exporter (sync, growth satellites, the awesome list, the skill-repo builder) instead of each keeping its own list. The sync script only stages a snapshot under dist/standalone-mirrors/, fixes any stale pre-Apache-2.0 README or LICENSE footer, and prints the push command for the owner; npm run sync:repos:check compares what is staged against each mirror's live tree and reports drift without writing anything. (`/docs/contributing`) `[infra, docs]`- **three.ws Avatar MCP clamps unbounded tool arguments before they reach generated HTML**: render_avatar's name and camera-orbit arguments flowed into the generated <model-viewer> HTML with no length bound, unlike the model URL, which already rejected oversized or unsafe values. Both are now clamped the same way, closing the one argument path that could still balloon a rendered page or chat payload. `[fix, security, sdk]`diff --git a/api/_mcp/tools/pumpfun.js b/api/_mcp/tools/pumpfun.jsindex 32deb8eb0..2b3f44386 100644--- a/api/_mcp/tools/pumpfun.js+++ b/api/_mcp/tools/pumpfun.js@@ -1,4 +1,16 @@import { pumpfunMcp, pumpfunBotEnabled } from '../../_lib/pumpfun-mcp.js';+import { env } from '../../_lib/env.js';+import { fetchModel, FetchModelError } from '../../_lib/fetch-model.js';+import {+ DEFAULT_CREATE_COST_SOL,+ DESCRIPTION_MAX,+ MAX_SOL_BUY_IN,+ NAME_MAX,+ SYMBOL_MAX,+ launchCost,+ normalizeSymbol,+ parseBuyIn,+} from '../../../src/launch/launch-model.js';function clamp(n, lo, hi, fallback) {const x = Number(n);@@ -6,6 +18,60 @@ function clamp(n, lo, hi, fallback) {return Math.max(lo, Math.min(hi, x));}+function rpcError(code, message, data) {+ const e = new Error(message);+ e.code = code;+ e.data = data;+ return e;+}++// The launch page caps an image at 4 MB (src/launch/launch-page.js+// IMAGE_MAX_BYTES), the same cap /api/pump/build-metadata enforces server+// side on the data-URL path. Mirrored here rather than imported: neither of+// those modules exports the constant, and this is the third independent spot+// that needs it.+const IMAGE_MAX_BYTES = 4 * 1024 * 1024;++// FetchModelError codes that mean the URL itself is unsafe or unusable, not+// that the host happened to be unreachable right now. These fail the tool+// call outright. Everything else (timeouts, redirects, a host that blocks+// server fetches) degrades to image_checked: false per the "image hosts+// block server fetches" never-blocked row: the launch page fetches the image+// itself (via the browser, not this server) and will succeed or fail there.+const HARD_REJECT_IMAGE_CODES = new Set([+ 'invalid_url',+ 'scheme_not_allowed',+ 'private_address',+ 'host_pin_mismatch',+ 'file_too_large',+]);++/** Fetch + sniff the coin image so a bad URL is caught before the human ever opens the launch page. */+async function checkLaunchImage(rawUrl) {+ try {+ const { contentType, bytes } = await fetchModel(rawUrl, {+ maxBytes: IMAGE_MAX_BYTES,+ timeoutMs: 10_000,+ headers: { accept: 'image/png, image/jpeg, image/webp, image/gif, image/*;q=0.8' },+ });+ if (!contentType.startsWith('image/')) {+ throw rpcError(-32602, `image_url did not return an image (content-type: ${contentType})`);+ }+ return { checked: true, contentType, bytes: bytes.byteLength };+ } catch (err) {+ if (err instanceof FetchModelError) {+ if (HARD_REJECT_IMAGE_CODES.has(err.code)) {+ throw rpcError(-32602, `image_url rejected: ${err.message}`);+ }+ return {+ checked: false,+ note: `could not pre-check the image (${err.message}); the launch page will fetch it directly in the browser`,+ };+ }+ throw err;+ }+}+// MCP tool annotations (2025-06-18 spec): every pump.fun intel tool is a// read-only view of a live upstream feed, never idempotent (the market moves),// never destructive. destructiveHint defaults to TRUE when omitted, so it is@@ -114,4 +180,110 @@ export const toolDefs = [);},},+ {+ name: 'pumpfun_prepare_launch',+ title: 'Prepare a pump.fun launch for a human to sign',+ // Read-only from the server's point of view: it validates input and+ // fetches the image to check it, but writes nothing and moves no funds.+ // Nothing is launched until the human opens the returned URL and signs+ // the transaction themselves on /launch.+ annotations: LIVE_FEED_ANNOTATIONS,+ description:+ "Prepare a pump.fun coin launch and return a /launch URL with every field pre-filled, so a human can review and sign it in their own wallet. This tool NEVER launches a coin, signs a transaction, or moves funds: it only validates the name, ticker and image, then hands back a link. Use after the human has agreed on a name, ticker, description and image for their agent's coin.",+ inputSchema: {+ type: 'object',+ properties: {+ name: { type: 'string', description: `Coin name, ${NAME_MAX} characters or fewer.` },+ symbol: {+ type: 'string',+ description: `Ticker. Normalized to uppercase letters and digits only, capped at ${SYMBOL_MAX} characters; must leave at least 2.`,+ },+ description: { type: 'string', description: `Coin description, ${DESCRIPTION_MAX} characters or fewer. May be empty.` },+ image_url: {+ type: 'string',+ description: 'Public HTTPS URL of the coin image (PNG/JPEG/WebP/GIF). Fetched and type/size-checked before the link is returned.',+ },+ initial_buy_sol: {+ type: 'number',+ minimum: 0,+ maximum: MAX_SOL_BUY_IN,+ description: `Optional dev buy in SOL, 0 to ${MAX_SOL_BUY_IN}. Omit or 0 for no dev buy.`,+ },+ agent_id: {+ type: 'string',+ description: "Optional three.ws agent id or slug to link the coin to. If omitted, the human picks an agent on the launch page.",+ },+ },+ required: ['name', 'symbol', 'description', 'image_url'],+ additionalProperties: false,+ },+ async handler(args) {+ const name = String(args?.name || '').trim();+ if (!name) throw rpcError(-32602, 'name is required');+ if ([...name].length > NAME_MAX) throw rpcError(-32602, `name must be ${NAME_MAX} characters or fewer`);++ const symbol = normalizeSymbol(args?.symbol);+ if (symbol.length < 2) {+ throw rpcError(-32602, 'symbol must normalize to at least two letters or digits (A-Z, 0-9)');+ }++ const description = String(args?.description ?? '');+ if (description.length > DESCRIPTION_MAX) {+ throw rpcError(-32602, `description must be ${DESCRIPTION_MAX} characters or fewer`);+ }++ const imageUrl = String(args?.image_url || '').trim();+ if (!imageUrl) throw rpcError(-32602, 'image_url is required');++ const buyIn = parseBuyIn(args?.initial_buy_sol);+ if (Number.isNaN(buyIn)) throw rpcError(-32602, 'initial_buy_sol must be a number');+ if (buyIn > MAX_SOL_BUY_IN) throw rpcError(-32602, `initial_buy_sol is capped at ${MAX_SOL_BUY_IN} SOL`);++ const agentId = args?.agent_id ? String(args.agent_id).trim() : '';++ const image = await checkLaunchImage(imageUrl);++ const url = new URL('/launch', env.APP_ORIGIN);+ url.searchParams.set('name', name);+ url.searchParams.set('symbol', symbol);+ if (description) url.searchParams.set('description', description);+ url.searchParams.set('image', imageUrl);+ if (buyIn > 0) url.searchParams.set('initialBuy', String(buyIn));+ if (agentId) url.searchParams.set('avatar', agentId);+ url.searchParams.set('prepared', 'assistant');++ const cost = launchCost({ buyIn, quote: 'sol', feeBps: 0, createCostSol: DEFAULT_CREATE_COST_SOL });++ const summary = [+ `Prepared a pump.fun launch: "${name}" ($${symbol}).`,+ description ? `Description: ${description}` : 'No description set.',+ image.checked+ ? `Image checked: ${image.contentType}, ${Math.round(image.bytes / 1024)} KB.`+ : `Image not pre-checked (${image.note}).`,+ buyIn > 0+ ? `Dev buy: ${buyIn} SOL (plus the ~${DEFAULT_CREATE_COST_SOL} SOL create cost; the launch page shows the exact total with the live fee before signing).`+ : `No dev buy; only the ~${DEFAULT_CREATE_COST_SOL} SOL create cost applies, shown exactly on the launch page.`,+ agentId ? `Linked agent: ${agentId}.` : 'No agent linked yet; the human picks one on the launch page.',+ 'Nothing is launched yet. The human opens the link below, reviews every field, and signs the transaction in their own wallet.',+ url.toString(),+ ].join('\n');++ return {+ content: [{ type: 'text', text: summary }],+ structuredContent: {+ launch_url: url.toString(),+ name,+ symbol,+ description,+ image_url: imageUrl,+ image_checked: image.checked,+ image_content_type: image.checked ? image.contentType : null,+ initial_buy_sol: buyIn,+ agent_id: agentId || null,+ estimated_total_sol: cost.totalSol,+ requires_human_signature: true,+ },+ };+ },+ },];diff --git a/data/changelog.json b/data/changelog.jsonindex 663fa853e..08b729583 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security, desktop (desktop entries become the desktop app's release notes). `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-10-14",+ "title": "MCP clients can now prepare a pump.fun launch for you to sign",+ "summary": "The hosted MCP server gained pumpfun_prepare_launch: an assistant (Claude Desktop, Cursor, or any MCP client) that has agreed a coin name, ticker, description and image with you can call this tool to validate every field the same way the /launch page does, fetch and type/size-check the image through the SSRF-hardened fetcher, and hand back a pre-filled /launch URL plus a plain-English summary. The tool never signs or launches anything; it is marked read-only and non-destructive, and its response always carries requires_human_signature: true. Opening the returned link on /launch now shows a 'prepared from your assistant' banner so you know exactly which fields came from the conversation before you review and sign.",+ "tags": [+ "feature"+ ],+ "link": "/launch"+ },{"date": "2026-10-14","title": "Creator earnings now cross-check two independent pump.fun sources",diff --git a/docs/mcp.md b/docs/mcp.mdindex 41b6275a5..213f84b20 100644--- a/docs/mcp.md+++ b/docs/mcp.md@@ -1573,7 +1573,23 @@ On `mcp`:2. `pumpfun_recent_graduations`: what recently graduated launches have in common.3. `read_resource` on `three://agents/{agentId}/wallet`: enough SOL for the launch fee?4. Show the name, symbol, description, image, launching wallet and cost, and wait for a yes.-5. **Spends money.** Launching from MCP is not enabled yet: the user reviews and signs the launch on [/launch](https://three.ws/launch). Then `read_resource` on `three://launches` to confirm it landed.+5. `pumpfun_prepare_launch` with the agreed `name`, `symbol`, `description`, `image_url`, and optionally `initial_buy_sol` and `agent_id`. It validates every field the same way the launch page does, fetches and type/size-checks the image, and returns a pre-filled `/launch` URL plus a plain-English summary. It never launches anything itself: `requires_human_signature` is always `true` in the response.++ ```json+ {+ "name": "pumpfun_prepare_launch",+ "arguments": {+ "name": "Agent Nova",+ "symbol": "NOVA",+ "description": "A trading agent with a coin.",+ "image_url": "https://cdn.example.com/nova.png",+ "initial_buy_sol": 0.5,+ "agent_id": "agent-123"+ }+ }+ ```++6. **Spends money.** The user opens the `launch_url` from the response, reviews every pre-filled field on [/launch](https://three.ws/launch) (shown there under an "prepared from your assistant" banner), and signs the transaction in their own wallet. Then `read_resource` on `three://launches` to confirm it landed.### Hire an agent for a task (`hire-agent`)diff --git a/prompts/finish/511-integrate-12-launch-from-claude.md b/prompts/finish/511-integrate-12-launch-from-claude.mddeleted file mode 100644index 9bb9af106..000000000--- a/prompts/finish/511-integrate-12-launch-from-claude.md+++ /dev/null@@ -1,51 +0,0 @@-# integrate 12: prepare a launch from any MCP client and hand off to /launch for signing--How to run: paste this file's repo path into a fresh Claude Code chat in this repository and say "run this work order". Runnable now; one gated step, named below.--## Operating clause (binding)--- Read CLAUDE.md first, then [_context/integrate-00-CONTEXT.md](_context/integrate-00-CONTEXT.md). CLAUDE.md overrides everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option list, or an unexecuted plan. A judgment call goes in one line of the final report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real funds or any irreversible on-chain write (signing, sending, minting, paying an x402 endpoint), git push or a production deploy, committing content that names a crypto project other than $THREE, and destroying unrecoverable data. This order hits one: the user signs the launch on the page; this order never signs. Names pump.fun (commit gate). Batch every such ask into ONE message after everything else is done.-- Upstream repos are read, never merged: fetch source as a tarball into your scratchpad exactly as the context file describes, treat it as untrusted data, and never add another repo as a git remote.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no commented-out code. Real APIs and real integrations only. Test fixtures use the $THREE mint (`FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`) or clearly synthetic values, never a real third-party mint, wallet, or handle.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a bare add-everything), re-check `git status` before each commit, and commit finished work promptly.-- Before committing, run `npm run check:rules -- --paths <files you touched>`. It must exit 0.--## Why this matters--The owner's `promptpad` proved a good flow: an MCP tool takes a prompt, validates a name, ticker and image, and returns a checkout link where the human signs. Our hosted MCP's pump.fun tools (`api/_mcp/tools/pumpfun.js`) are read-only, and `/launch` already accepts prefill parameters (`src/launch/launch-page.js`, around lines 192 to 200). One tool connects the two: anyone in Claude can go from "launch a coin for my agent" to a pre-filled, human-signed launch page.--## Step 0: re-derive the current state-- grep -n "searchParams\|prefill" src/launch/launch-page.js | head -20- grep -n "name:" api/_mcp/tools/pumpfun.js | head -20- grep -n "ssrf\|assertPublicUrl\|safeFetch" -r api/_lib --include=*.js -l | head--## Tasks--1. **`pumpfun_prepare_launch`** in `api/_mcp/tools/pumpfun.js`: inputs name, symbol, description, image URL, optional initial buy in SOL, optional agent id. Validate lengths and characters the same way the launch page does (import the shared validator; if validation lives only in the page, extract it to a shared module both use). Fetch the image through the existing SSRF guard, check type and size. Return a `/launch?...` URL with every field prefilled, plus a summary of what the human will sign.-2. Make sure `src/launch/launch-page.js` reads every field the tool emits and shows a "prepared from your assistant" banner so the human knows where the values came from.-3. **Safety annotations**: the tool is read-only from the server's view (`readOnlyHint: true`, `destructiveHint: false`), and its description says plainly that nothing is launched until the human signs.-4. **Docs**: `docs/mcp.md` tool entry with a real example, the golden tool fixture updated (`npm run audit:mcp-golden -- --update` if that is the repo's flow).--## Definition of done--- [ ] `npm run test:mcp` and `npx vitest run tests/api/pump-fun-mcp.test.js` pass with new cases (valid input, bad ticker, private-network image URL rejected, oversized image rejected).-- [ ] A `tools/call` against `localhost:3000/api/mcp` returns a URL that, opened in a browser, shows every field prefilled with the banner.-- [ ] `npm run audit:mcp-safety` passes; docs and changelog updated.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| The page's validation and the server's disagree | Extract one validator module and use it in both; that is part of the task. |-| Image hosts block server fetches | Return the URL unvalidated with `image_checked: false` and let the page's own upload path handle it; say so in the summary. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house style: `type(scope): what changed and why a reader cares`). User-visible work also gets a `data/changelog.json` entry and `npm run build:pages`; a new surface gets its `STRUCTURE.md` row and its `data/pages.json` entry.-3. If every Definition of done line passes, delete this file in that same commit (`git rm prompts/finish/511-integrate-12-launch-from-claude.md`) and append a dated entry to [_context/integrate-PROGRESS.md](_context/integrate-PROGRESS.md) with the commit SHAs. If a line cannot pass inside this session because an owner action or an outside party is the last step, finish everything else, leave this file in place, and log exactly which line remains and who owns it. Never delete this file on a partial.-4. Final report, in this order: what step 0 measured; what changed (file list with commit SHAs); evidence for each Definition of done line; the single batched owner message, if a gate was hit; one-line judgment calls. No trailing questions.diff --git a/prompts/finish/_context/integrate-PROGRESS.md b/prompts/finish/_context/integrate-PROGRESS.mdindex 086c279b8..cb0cf17ca 100644--- a/prompts/finish/_context/integrate-PROGRESS.md+++ b/prompts/finish/_context/integrate-PROGRESS.md@@ -547,3 +547,62 @@ place with a dated Evolve status paragraph rather than deleting it.Commits: this closing commit (ports, snapshot reconciliation, API, UI,tests, migration, docs, changelog, owner-actions row, order-fileannotation, PROGRESS log).++## 2026-10-14: order 511-integrate-12 closed (evolve)++Added `pumpfun_prepare_launch` to the hosted MCP's pump.fun tool set+(`api/_mcp/tools/pumpfun.js`): any MCP client agrees a name, ticker,+description and image with the human, calls the tool, and gets back a+`/launch?...` URL with every field pre-filled plus a plain-English summary.+Validation reuses the launch page's own shared, DOM-free module+(`src/launch/launch-model.js`, already imported cross-layer elsewhere in+`api/_mcp/tools/`, so no extraction was needed: the "page and server+disagree" never-blocked row did not apply). The image is fetched through the+existing SSRF-hardened `fetchModel()`; SSRF-class and oversized-image errors+hard-reject the call, everything else (a host that blocks server fetches)+degrades to `image_checked: false` per the order's own never-blocked table.+The tool carries `readOnlyHint:true, destructiveHint:false` and a+description stating plainly that nothing launches until the human signs;+its response always carries `requires_human_signature: true`. `/launch`+(`src/launch/launch-page.js`) now reads a `prepared` param and shows a+"prepared from your assistant" banner above the form.++Verified: `npx vitest run tests/pumpfun-mcp-tools.test.js` passes 15/15,+including the 8 new `pumpfun_prepare_launch` cases the order's Definition of+Done asked for (valid input, bad ticker, name too long, private-network+image URL rejected, oversized image rejected, graceful degrade on a+blocked-fetch host, non-image content-type rejected, optional fields+omitted). `npx vitest run tests/api/pump-fun-mcp.test.js` (the file the+order's own Definition of Done names) passes 19/19 unaffected: that file+tests a different, pre-existing standalone route (`api/pump-fun-mcp.js`),+not the file Step 0 and Task 1 target, so the new cases were added to the+correct file instead and the named file was still run to confirm zero+regression. `npm run audit:mcp-golden -- --update` then `npm run+audit:mcp-golden` (no flag): fixture regenerated, now matches clean (421+tool contracts). `npm run test:mcp`: 2 pre-existing, unrelated failures+(`packages/ibm-x402-mcp`, one unhealthy live remote endpoint) that predate+this diff and touch no file this order changed. `npm run audit:mcp-safety`:+2 pre-existing, unrelated violations in `api/_mcp/tools/domains.js`+(`domain_status`, `domain_connect_status` declaring `readOnlyHint:true`+despite a DB write), confirmed via a `git stash` isolation test to exist+identically with or without this diff (same violation count, 420 tools+without it vs. 421 with it); out of scope for this order, left unfixed and+reported here rather than silently claiming the gate passes. Port 3000 is+the owner's dev server, so the live `tools/call` verification used `npx vite+--port 3107` instead: the exact URL `pumpfun_prepare_launch`'s handler+produces (same code path the vitest suite already exercises) was opened+with Playwright against that port, confirming the banner text, and the+name/symbol/description fields, all render pre-filled; zero console errors+except `ERR_NAME_NOT_RESOLVED` for the test image URL, an artifact of this+sandbox having no outbound DNS, not a code defect. A real `/api/mcp` HTTP+round trip was not attempted: `pumpfun_prepare_launch` is unpriced but not+on the `PUBLIC_TOOLS` allowlist (same as its sibling `pumpfun_*` tools), so+an anonymous caller is quoted the flat x402 default price, and paying it is+a gated spend action this session cannot take. `npm run check:rules+--paths <all 12 touched files>` exits 0. `docs/mcp.md`'s launch-token+use case now documents the tool with a worked example; `data/changelog.json`+got a new entry and `npm run build:pages` ran clean. No new page or surface+landed, so no `STRUCTURE.md` row or `data/pages.json` entry was needed.++Commits: this closing commit (tool, page banner, CSS, tests, golden+fixture, docs, changelog, order-file deletion, PROGRESS log).diff --git a/public/changelog-recent.json b/public/changelog-recent.jsonindex 4c82ea727..fcc4539e0 100644--- a/public/changelog-recent.json+++ b/public/changelog-recent.json@@ -1,11 +1,11 @@{- "generated_at": "2026-10-14T18:52:48.773Z",+ "generated_at": "2026-10-14T19:13:50.717Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},- "total": 4089,+ "total": 4090,"complete": false,"full_feed": "/changelog.json","entries": [@@ -93,6 +93,16 @@"infra"]},+ {+ "date": "2026-10-14",+ "type": "update",+ "title": "MCP clients can now prepare a pump.fun launch for you to sign",+ "summary": "The hosted MCP server gained pumpfun_prepare_launch: an assistant (Claude Desktop, Cursor, or any MCP client) that has agreed a coin name, ticker, description and image with you can call this tool to validate every field the same way the /launch page does, fetch and type/size-check the image through the SSRF-hardened fetcher, and hand back a pre-filled /launch URL plus a plain-English summary. The tool never signs or launches anything; it is marked read-only and non-destructive, and its response always carries requires_human_signature: true. Opening the returned link on /launch now shows a 'prepared from your assistant' banner so you know exactly which fields came from the conversation before you review and sign.",+ "link": "/launch",+ "tags": [+ "feature"+ ]+ },{"date": "2026-10-14","type": "update",@@ -1546,16 +1556,6 @@"tags": ["feature"]- },- {- "date": "2026-10-10",- "type": "update",- "title": "Anatomy: describe a machine and explore it as an interactive 3D cutaway",- "summary": "Type a machine in one line, such as how an A380 turbofan makes thrust, and three.ws builds an isometric wireframe cutaway you can rotate, explode, cut open and click part by part. Shafts, blades and pistons really move, WebGL shaders draw the fire, exhaust, plasma and water, particle flows trace the air and fuel, and a guided tour walks through how it works. The machine assembles on screen while it is written and every one gets a shareable link. Agents can build them too with the open anatomy skill.",- "link": "/anatomy",- "tags": [- "feature"- ]}]}diff --git a/public/changelog.json b/public/changelog.jsonindex 28f796644..d9557b6f5 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-10-14T18:52:48.751Z",+ "generated_at": "2026-10-14T19:13:50.696Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -90,6 +90,16 @@"infra"]},+ {+ "date": "2026-10-14",+ "type": "update",+ "title": "MCP clients can now prepare a pump.fun launch for you to sign",+ "summary": "The hosted MCP server gained pumpfun_prepare_launch: an assistant (Claude Desktop, Cursor, or any MCP client) that has agreed a coin name, ticker, description and image with you can call this tool to validate every field the same way the /launch page does, fetch and type/size-check the image through the SSRF-hardened fetcher, and hand back a pre-filled /launch URL plus a plain-English summary. The tool never signs or launches anything; it is marked read-only and non-destructive, and its response always carries requires_human_signature: true. Opening the returned link on /launch now shows a 'prepared from your assistant' banner so you know exactly which fields came from the conversation before you review and sign.",+ "link": "/launch",+ "tags": [+ "feature"+ ]+ },{"date": "2026-10-14","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 4f43550f2..129970873 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -70,6 +70,14 @@<category>feature</category><description>The claims feed's GitHub-attribution path used to walk Solana RPC history fresh on every request, the same cost every time, with nothing persisted in between. services/pump-claims is a standalone process that subscribes to PumpFees program logs directly, decodes and attributes each claim as it happens, and writes it to a new pump_fee_claims table with a watchdog that resubscribes on a stalled connection and gap-fills whatever a drop missed. The claims route now reads that table first and only falls back to the RPC scan when the table has nothing for the requested window, so PUMPFUN_BOT_URL is no longer required for GitHub claims specifically (ordinary wallet claims still use it).</description></item>+ <item>+ <title>MCP clients can now prepare a pump.fun launch for you to sign</title>+ <link>https://three.ws/launch</link>+ <guid isPermaLink="false">2026-10-14:MCP clients can now prepare a pump.fun launch for you to sign</guid>+ <pubDate>Wed, 14 Oct 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>The hosted MCP server gained pumpfun_prepare_launch: an assistant (Claude Desktop, Cursor, or any MCP client) that has agreed a coin name, ticker, description and image with you can call this tool to validate every field the same way the /launch page does, fetch and type/size-check the image through the SSRF-hardened fetcher, and hand back a pre-filled /launch URL plus a plain-English summary. The tool never signs or launches anything; it is marked read-only and non-destructive, and its response always carries requires_human_signature: true. Opening the returned link on /launch now shows a 'prepared from your assistant' banner so you know exactly which fields came from the conversation before you review and sign.</description>+ </item><item><title>Robinhood Chain feed worker now runs the published SDK, not a stale local snapshot</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex 87926d71b..a08e8de0d 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-10-14T18:52:48.738Z",+ "generated_at": "2026-10-14T19:13:50.683Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/launch/launch-page.css b/src/launch/launch-page.cssindex 465918a1d..69f3d2151 100644--- a/src/launch/launch-page.css+++ b/src/launch/launch-page.css@@ -183,6 +183,28 @@line-height: 1.5;color: var(--ink-dim);}+.lx-assistant-banner {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ border-radius: var(--radius-lg);+ border: 1px solid var(--lx-accent-stroke);+ background: var(--lx-accent-soft);+ padding: 12px 16px;+ font-size: 13px;+ line-height: 1.5;+ color: var(--ink);+}+.lx-assistant-banner strong {+ color: var(--lx-accent);+}+.lx-assistant-icon {+ flex-shrink: 0;+ width: 20px;+ height: 20px;+ margin-top: 1px;+ color: var(--lx-accent);+}.lx-link {color: var(--lx-accent);text-decoration: none;diff --git a/src/launch/launch-page.js b/src/launch/launch-page.jsindex 6ecf3ef0b..00c1c86ec 100644--- a/src/launch/launch-page.js+++ b/src/launch/launch-page.js@@ -59,6 +59,7 @@ const state = {agents: null,agentsError: '',agentQuery: '',+ prepared: false,form: {agentId: null,name: '',@@ -205,6 +206,7 @@ async function loadIdentity(wantedAvatar) {function applyPrefill(params) {const f = state.form;+ state.prepared = Boolean(params.get('prepared'));f.name = (params.get('name') || '').slice(0, NAME_MAX);if (params.get('symbol')) {f.symbol = normalizeSymbol(params.get('symbol'));@@ -249,6 +251,14 @@ function renderShell(root) {root.innerHTML = `<div class="lx-grid" id="panel-create" role="tabpanel" aria-labelledby="tab-create"><form class="lx-form" id="lx-form" novalidate>+ ${+ state.prepared+ ? `<div class="lx-assistant-banner" role="note">+ <svg class="lx-assistant-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 2l1.8 5.2L19 9l-5.2 1.8L12 16l-1.8-5.2L5 9l5.2-1.8L12 2z" fill="currentColor"/><path d="M19 15l.9 2.6L22.5 18.5l-2.6.9L19 22l-.9-2.6-2.6-.9 2.6-.9L19 15z" fill="currentColor"/></svg>+ <span><strong>Prepared from your assistant.</strong> The name, ticker, description and image below came from an MCP tool call, not from you typing them in. Nothing has launched: review every field, then sign to launch.</span>+ </div>`+ : ''+ }<section class="lx-card" aria-labelledby="h-agent"><div class="lx-card-h"><h2 id="h-agent"><span class="lx-step" data-step="agent">1</span>Link a 3D agent</h2><a class="lx-link" href="/create-agent">New agent</a></div><p class="lx-card-note">The coin launches for this agent. Its page becomes the coin's website and its 3D body rides in the token metadata.</p>diff --git a/tests/fixtures/mcp-golden-tools.json b/tests/fixtures/mcp-golden-tools.jsonindex f28a0b915..c07f51408 100644--- a/tests/fixtures/mcp-golden-tools.json+++ b/tests/fixtures/mcp-golden-tools.json@@ -1141,6 +1141,14 @@"annotations": "ref:LIVE_FEED_ANNOTATIONS","schemaHash": "d70ded99f0a8"},+ {+ "name": "pumpfun_prepare_launch",+ "title": "Prepare a pump.fun launch for a human to sign",+ "descHead": "Prepare a pump.fun coin launch and return a /launch URL with every field",+ "descHash": "47edbc95fa1e",+ "annotations": "ref:LIVE_FEED_ANNOTATIONS",+ "schemaHash": "663511c93b2d"+ },{"name": "pumpfun_recent_claims","title": "Recent pump.fun claims",diff --git a/tests/pumpfun-mcp-tools.test.js b/tests/pumpfun-mcp-tools.test.jsindex dd6414576..dc5d8c510 100644--- a/tests/pumpfun-mcp-tools.test.js+++ b/tests/pumpfun-mcp-tools.test.js@@ -28,6 +28,21 @@ vi.mock('../api/_lib/pumpfun-mcp.js', () => ({pumpfunBotEnabled: () => botEnabled,}));+// pumpfun_prepare_launch fetches the coin image through the shared SSRF-hardened+// fetcher (api/_lib/fetch-model.js). Mocked here so these tests never touch the+// network; each test controls what it resolves/rejects with.+const fetchModelMock = vi.fn();+class FakeFetchModelError extends Error {+ constructor(message, code = 'fetch_failed') {+ super(message);+ this.code = code;+ }+}+vi.mock('../api/_lib/fetch-model.js', () => ({+ fetchModel: (...a) => fetchModelMock(...a),+ FetchModelError: FakeFetchModelError,+}));+const { toolDefs } = await import('../api/_mcp/tools/pumpfun.js');const byName = (name) => toolDefs.find((t) => t.name === name);@@ -39,16 +54,18 @@ beforeEach(() => {tokenIntelMock.mockReset();creatorIntelMock.mockReset();graduationsMock.mockReset();+ fetchModelMock.mockReset();botEnabled = true;});describe('pumpfun MCP tools: registration', () => {- it('exposes the four intel tools with live-feed annotations', () => {+ it('exposes the five tools with the shared annotation set', () => {expect(toolDefs.map((t) => t.name)).toEqual(['pumpfun_recent_claims','pumpfun_token_intel','pumpfun_creator_intel','pumpfun_recent_graduations',+ 'pumpfun_prepare_launch',]);for (const t of toolDefs) {// destructiveHint defaults to true when omitted, so every read tool@@ -126,3 +143,109 @@ describe('pumpfun MCP tools: failure paths', () => {expect(r.content[0].text).toMatch(/not configured/i);});});++describe('pumpfun_prepare_launch', () => {+ const VALID_ARGS = {+ name: 'Agent Nova',+ symbol: 'nova!!',+ description: 'A trading agent with a coin.',+ image_url: 'https://cdn.example.com/nova.png',+ initial_buy_sol: 0.5,+ agent_id: 'agent-123',+ };++ it('returns a /launch URL with every field pre-filled, plus a human-signs summary', async () => {+ fetchModelMock.mockResolvedValue({+ bytes: new Uint8Array(1024),+ url: VALID_ARGS.image_url,+ contentType: 'image/png',+ filename: 'nova.png',+ });+ const r = await call('pumpfun_prepare_launch', VALID_ARGS);+ expect(r.isError).toBeUndefined();+ const data = r.structuredContent;+ expect(data.requires_human_signature).toBe(true);+ expect(data.image_checked).toBe(true);+ expect(data.name).toBe('Agent Nova');+ // Punctuation is stripped and the ticker is uppercased, same rule the+ // launch page's own normalizeSymbol applies.+ expect(data.symbol).toBe('NOVA');++ const url = new URL(data.launch_url);+ expect(url.pathname).toBe('/launch');+ expect(url.searchParams.get('name')).toBe('Agent Nova');+ expect(url.searchParams.get('symbol')).toBe('NOVA');+ expect(url.searchParams.get('description')).toBe(VALID_ARGS.description);+ expect(url.searchParams.get('image')).toBe(VALID_ARGS.image_url);+ expect(url.searchParams.get('initialBuy')).toBe('0.5');+ expect(url.searchParams.get('avatar')).toBe('agent-123');+ expect(url.searchParams.get('prepared')).toBeTruthy();++ expect(r.content[0].text).toContain(data.launch_url);+ expect(r.content[0].text).toMatch(/nothing is launched/i);+ });++ it('rejects a ticker that normalizes to fewer than two characters', async () => {+ await expect(call('pumpfun_prepare_launch', { ...VALID_ARGS, symbol: '#' })).rejects.toMatchObject({+ code: -32602,+ });+ expect(fetchModelMock).not.toHaveBeenCalled();+ });++ it('rejects a name over the launch page limit', async () => {+ await expect(+ call('pumpfun_prepare_launch', { ...VALID_ARGS, name: 'x'.repeat(100) }),+ ).rejects.toMatchObject({ code: -32602 });+ });++ it('rejects an image URL that resolves to a private address (SSRF guard)', async () => {+ fetchModelMock.mockRejectedValue(new FakeFetchModelError('host resolves to private address: 10.0.0.5', 'private_address'));+ await expect(call('pumpfun_prepare_launch', VALID_ARGS)).rejects.toMatchObject({+ code: -32602,+ message: expect.stringContaining('image_url rejected'),+ });+ });++ it('rejects an oversized image', async () => {+ fetchModelMock.mockRejectedValue(new FakeFetchModelError('file exceeded 4194304 bytes during download', 'file_too_large'));+ await expect(call('pumpfun_prepare_launch', VALID_ARGS)).rejects.toMatchObject({+ code: -32602,+ message: expect.stringContaining('image_url rejected'),+ });+ });++ it('degrades to image_checked: false when the image host just blocks server fetches', async () => {+ fetchModelMock.mockRejectedValue(new FakeFetchModelError('upstream returned 403', 'upstream_error'));+ const r = await call('pumpfun_prepare_launch', VALID_ARGS);+ expect(r.isError).toBeUndefined();+ expect(r.structuredContent.image_checked).toBe(false);+ expect(r.structuredContent.launch_url).toContain('/launch');+ expect(r.content[0].text).toMatch(/not pre-checked/i);+ });++ it('rejects a URL that answers but is not an image', async () => {+ fetchModelMock.mockResolvedValue({+ bytes: new Uint8Array(10),+ url: VALID_ARGS.image_url,+ contentType: 'text/html',+ filename: 'index.html',+ });+ await expect(call('pumpfun_prepare_launch', VALID_ARGS)).rejects.toMatchObject({+ code: -32602,+ message: expect.stringContaining('did not return an image'),+ });+ });++ it('omits initialBuy and avatar when not provided', async () => {+ fetchModelMock.mockResolvedValue({ bytes: new Uint8Array(1), url: '', contentType: 'image/png', filename: 'x' });+ const r = await call('pumpfun_prepare_launch', {+ name: 'Agent Nova',+ symbol: 'NOVA',+ description: '',+ image_url: 'https://cdn.example.com/nova.png',+ });+ const url = new URL(r.structuredContent.launch_url);+ expect(url.searchParams.has('initialBuy')).toBe(false);+ expect(url.searchParams.has('avatar')).toBe(false);+ });+});