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): document the stateless session-terminate route and that payment replaces auth

nirholas0b5107142e03
diff --git a/api/openapi-json.js b/api/openapi-json.js
index b8fd82175..ee3f32a57 100644
--- a/api/openapi-json.js
+++ b/api/openapi-json.js
@@ -220,7 +220,7 @@ export default wrap(async (req, res) => {
summary: 'MCP tool call',
description:
'JSON-RPC 2.0 request to the MCP server. Supports tools for 3D avatar management, model validation, inspection, and optimization.',
- // Pay-first, credentials optional — the same shape the aggregator's
+ // Pay-first, credentials optional: the same shape the aggregator's
// paid lanes use above. A bare probe answers 402 with a full x402
// challenge, so a caller settles in USDC and needs no key, token,
// or account; a bearer token or API key is accepted but never
@@ -272,6 +272,21 @@ export default wrap(async (req, res) => {
protocols: X402_PROTOCOLS,
},
},
+ // Session teardown, part of the MCP Streamable HTTP transport and
+ // advertised in this route's own `allow` header. The server is
+ // stateless per request, so there is nothing to tear down and the
+ // call always answers 204; a client that ends sessions politely
+ // should still be able to find it in the spec.
+ delete: {
+ operationId: 'mcp_terminate_session',
+ security: [],
+ summary: 'Terminate an MCP session',
+ description:
+ 'Ends the caller\'s MCP session. This server handles every request statelessly, so no session state is held and the call is a successful no-op.',
+ responses: {
+ 204: { description: 'Session ended; no content' },
+ },
+ },
},
'/api/avatars': {
get: {
@@ -690,7 +705,7 @@ export default wrap(async (req, res) => {
security: [],
summary: 'Forge pricing and input schema (free, no payment)',
description:
- 'Free price/usage discovery for the Forge generation lane. Returns the per-tier USDC pricing, the accepted request body schema, and the free poll endpoint. No payment, no credentials, and no generation — POST the same path to actually generate.',
+ 'Free price/usage discovery for the Forge generation lane. Returns the per-tier USDC pricing, the accepted request body schema, and the free poll endpoint. No payment, no credentials, and no generation. POST the same path to actually generate.',
responses: {
200: {
description: 'Price catalog and input schema',
diff --git a/docs/api-reference.md b/docs/api-reference.md
index 0bf7aba43..b37a5608a 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -3340,11 +3340,16 @@ DELETE /api/mcp
Model Context Protocol endpoint — exposes three.ws as a JSON-RPC 2.0 tool server compatible with Claude and other MCP clients.
-**Authentication:** Bearer OAuth access token or API key.
+**Authentication:** optional. This is a pay-per-call endpoint: an unauthenticated
+request answers `402` with an x402 challenge, so a caller can settle in USDC with no
+key, token, or account. A bearer OAuth access token or API key is accepted instead of
+payment, and discovery-only calls (such as `tools/list`) are free either way.
**POST** — send JSON-RPC 2.0 requests. Batch requests supported (max 32 per request).
-**GET** — SSE notification stream (reserved for future use).
+**GET** returns the OAuth + x402 challenge to an unauthenticated caller so clients can
+discover how to pay or sign in. No notification stream is held yet, so an authenticated
+GET answers `405` with `allow: POST, DELETE`.
**DELETE** — terminate session.
@@ -4230,7 +4235,7 @@ GET /api/coin/news?q=<coin name>&limit=8
Returns `{ "articles": [{ title, link, description, image, source,
published_at }], "source": "three.ws" }`. Served by the native three.ws
-aggregator (`api/_lib/news.js` — 197 publisher feeds, per-source 5-minute cache
+aggregator (`api/_lib/news.js`: 197 publisher feeds, per-source 5-minute cache
with serve-stale-on-error).
---