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.

docs: MCP server and SDK README/doc updates, x402 modal refinements

nirholas5bb715a16309
diff --git a/mcp-server/README.md b/mcp-server/README.md
index e9d377dd4..2c5e53f93 100644
--- a/mcp-server/README.md
+++ b/mcp-server/README.md
@@ -38,7 +38,7 @@
claude mcp add 3d-agent -- npx -y @three-ws/mcp-server
```
-To also receive payments (server operators), pass the payout address as env: `claude mcp add 3d-agent -e MCP_SVM_PAYMENT_ADDRESS=YourSolanaWallet -- npx -y @three-ws/mcp-server`. Alternatively, run `/setup-mcp` in any project that includes this repo and Claude will detect your OS, collect your wallet addresses, and write the config for you.
+To also receive payments (server operators), pass the payout address as env: `claude mcp add 3d-agent -e MCP_SVM_PAYMENT_ADDRESS=YourSolanaWallet -- npx -y @three-ws/mcp-server`.
### Claude Desktop
@@ -140,18 +140,24 @@ Then replace `"command": "npx", "args": ["-y", "@three-ws/mcp-server"]` with `"c
| `MCP_POSE_PREVIEW_BASE` | `https://three.ws/pose` | Base URL for `get_pose_seed` preview links |
| `MCP_AGENT_REP_RPC_<chainId>` | public RPC | Per-chain RPC override for `agent_reputation` (tried before the failover set) |
| `MCP_AGENT_REP_LOG_WINDOW` | `200000` | Block window for `agent_reputation` event scan |
-
----
-
-## Claude Code slash commands
-
-This repo ships three slash commands in `.claude/commands/` that work in any project that references this repo:
-
-| Command | What it does |
-| ------------------------ | --------------------------------------------------------------------------------------- |
-| `/setup-mcp` | Detects your OS, collects wallet addresses, and writes the MCP config to the right file |
-| `/scaffold-agent` | Scaffolds a new three.ws agent in the current project with MCP client wiring |
-| `/use-tools [tool_name]` | Produces a complete, runnable code example for a specific paid tool |
+| `X402_ASSET_MINT_SOLANA` | USDC (`EPjFW…Dt1v`) | SPL mint settled as the payment asset (defaults to Solana USDC) |
+| `SOLANA_DEVNET_RPC_URL` | public devnet | Devnet RPC for the AgenC tools when `cluster: "devnet"` |
+| `AGENC_RPC_URL` | unset | Single-endpoint override for all AgenC reads (wins over cluster defaults) |
+| `MCP_ENS_RPC_URL` / `MAINNET_RPC_URL` | failover set | Ethereum-mainnet RPC override for `ens_sns_resolve` |
+| `MESH_FORGE_TIMEOUT_MS` / `MESH_FORGE_POLL_MS` | `180000` / `3000` | `mesh_forge` reconstruct poll budget / interval |
+| `MESH_FORGE_DIRECTOR` | `1` (on) | Set `0` to skip the IBM Granite prompt-director stage in `mesh_forge` |
+| `RIG_MESH_TIMEOUT_MS` / `RIG_MESH_POLL_MS` | `180000` / `3000` | `rig_mesh` poll budget / interval |
+
+### `text_to_avatar` (Replicate)
+
+The `text_to_avatar` tool drives Replicate. If the two vars below are unset it returns a `not_configured` error instead of generating — every other tool works without them.
+
+| Var | Default | Description |
+| ------------------------------ | ---------------------- | ----------------------------------------------------------------------- |
+| `REPLICATE_API_TOKEN` | unset (**required**) | Replicate API token used to submit the prediction |
+| `REPLICATE_TEXT_TO_AVATAR_MODEL` | unset (**required**) | Pinned commercial-OK image/text-to-3D version hash (e.g. Hunyuan-3D 3.1) |
+| `MCP_TEXT_TO_AVATAR_TIMEOUT_MS` / `MCP_TEXT_TO_AVATAR_POLL_MS` | `110000` / `2000` | Prediction poll budget / interval |
+| `MCP_TEXT_TO_AVATAR_REHOST` | `0` | Set `1` to rehost the Replicate GLB to three.ws R2 via `MCP_REHOST_ENDPOINT` + `MCP_REHOST_KEY` |
---
diff --git a/mcp-server/src/tools/pump-snapshot.js b/mcp-server/src/tools/pump-snapshot.js
index 369fbe9e9..82808fb6f 100644
--- a/mcp-server/src/tools/pump-snapshot.js
+++ b/mcp-server/src/tools/pump-snapshot.js
@@ -198,13 +198,13 @@ export async function buildPumpSnapshotTool() {
scheme: 'exact',
priceUsd: '$0.005',
inputSchema: inputJsonSchema,
- example: { token: 'HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3' },
+ example: { token: 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump' },
outputExample: {
- token: 'HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3',
+ token: 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump',
price: { usdPrice: 0.0415, priceChange24hPct: 2.5, liquidityUsd: 107732 },
volume24h: { volume24hUsd: 270780.6, dex: 'raydium' },
holders: { topHolderCount: 20, topHolders: [{ address: '...', uiAmount: 1234 }] },
- meta: { name: 'Pyth Network', symbol: 'PYTH', imageUrl: 'https://...' },
+ meta: { name: 'three.ws', symbol: 'THREE', imageUrl: 'https://...' },
},
},
async ({ token }) => {
diff --git a/mcp-server/src/tools/sentiment-pulse.js b/mcp-server/src/tools/sentiment-pulse.js
index 3df19b1f9..a6681cb3d 100644
--- a/mcp-server/src/tools/sentiment-pulse.js
+++ b/mcp-server/src/tools/sentiment-pulse.js
@@ -58,10 +58,10 @@ export async function buildSentimentPulseTool() {
scheme: 'exact',
priceUsd: '$0.003',
inputSchema: inputJsonSchema,
- example: { token: 'HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3', limit: 100 },
+ example: { token: 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump', limit: 100 },
outputExample: {
ok: true,
- token: 'HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3',
+ token: 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump',
overall: { score: 0.42, posPct: 58, negPct: 16, neuPct: 26, count: 100 },
breakdown: { pumpfun: { score: 0.4, count: 90 }, extra: { score: 0.5, count: 10 } },
},
diff --git a/walk-sdk/README.md b/walk-sdk/README.md
index 66f7131ed..349829e20 100644
--- a/walk-sdk/README.md
+++ b/walk-sdk/README.md
@@ -140,8 +140,9 @@ control.instance // the live companion (or null)
```js
import {
- WALK_AVATARS, DEFAULT_AVATAR_ID, getAvatar, defaultAvatar,
- listCategories, makeApiAvatarEntry, resolveAvatarUrl,
+ WALK_AVATARS, DEFAULT_AVATAR_ID, DEFAULT_SHARED_CLIPS,
+ getAvatar, defaultAvatar, listCategories,
+ makeApiAvatarEntry, resolveAvatarUrl,
} from '@three-ws/walk';
```
@@ -150,7 +151,7 @@ import {
```js
import {
launchPlayground, exitPlayground, switchPlaygroundMode,
- getPlaygroundMode, consumeDropIn, playgroundState,
+ getPlaygroundMode, shouldDropIn, consumeDropIn, playgroundState,
} from '@three-ws/walk';
```
diff --git a/x402-modal-sdk/src/x402-modal.js b/x402-modal-sdk/src/x402-modal.js
index 53e1b13ce..60acb0d63 100644
--- a/x402-modal-sdk/src/x402-modal.js
+++ b/x402-modal-sdk/src/x402-modal.js
@@ -1,9 +1,10 @@
// @three-ws/x402-modal — a drop-in payment modal for any x402 paid endpoint.
//
// This is the canonical, side-effect-free core. It exports the public API
-// (`pay`, `init`, `configure`, `siwx`, `version`, `CheckoutModal`) but does NOT
-// touch `window` or auto-bind anything on import — that lives in `global.js`,
-// which is what the CDN <script> build ships.
+// (`pay`, `init`, `configure`, `getConfig`, `version`, `CheckoutModal`, and the
+// declarative helpers `bindElement` / `readOptsFrom`) but does NOT touch
+// `window` or auto-bind anything on import — that lives in `global.js`, which is
+// what the CDN <script> build ships.
//
// Bundler / npm usage:
//
diff --git a/x402-payment-modal/docs/api-reference.md b/x402-payment-modal/docs/api-reference.md
index bd358d2e6..6db78fb49 100644
--- a/x402-payment-modal/docs/api-reference.md
+++ b/x402-payment-modal/docs/api-reference.md
@@ -136,7 +136,7 @@ The package version string.
```js
import { version } from '@three-ws/x402-payment-modal';
-console.log(version); // "1.0.0"
+console.log(version); // "1.1.0"
```
---
diff --git a/x402-payment-modal/docs/architecture.md b/x402-payment-modal/docs/architecture.md
index 8c2644437..ba8926137 100644
--- a/x402-payment-modal/docs/architecture.md
+++ b/x402-payment-modal/docs/architecture.md
@@ -56,9 +56,11 @@ amount, the pay-to address, and protocol `extra`/`extensions` metadata. If the
challenge advertises [SIWX](./siwx.md), the modal can offer sign-in re-entry
instead of a fresh payment.
-If the very first response is **not** a payment challenge (e.g. an immediate
-`200`), the modal short-circuits: there is nothing to pay, so it resolves with
-that response as the result.
+If the very first response is **not** a payment challenge — e.g. an immediate
+`200` (the endpoint isn't paid) or any other non-`402` status — discovery
+**throws**: the modal renders the error on the `discover` step rather than
+silently succeeding, since pointing the modal at a free or non-x402 endpoint is
+almost always a misconfiguration worth surfacing.
## Two signing paths