mcpField
T
three.ws Assistant Widget

three.ws Assistant Widget

Local
three.wsDeveloper Tools255Updated today

About three.ws Assistant Widget

three.ws Assistant Widget is an MCP server that generates paste-ready embeds for floating 3D avatar chatbots on websites. It is for AI assistants or developers configuring the widget, with offline, deterministic generation and validation of settings.

Key features

  1. 01Generate an embed tag, frame URL, or JavaScript snippet
  2. 02Configure avatar, background, mode, and appearance
  3. 03List built-in widget options and attributes
  4. 04Validate and normalize configuration values
  5. 05Build embeds without network access

Use cases

  1. 01Adding a floating avatar chatbot to a website
  2. 02Generating a standalone frame URL for embedding
  3. 03Checking available avatars and interaction settings

MCP support

Exposes `build_assistant_widget` and `list_assistant_options` to MCP clients. The tools generate widget embed code and enumerate supported options.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"nirholas-assistant-widget": {
"command": "npx",
"args": [
"-y",
"@three-ws/assistant-mcp"
],
"env": {
"THREE_WS_BASE": "<THREE_WS_BASE>"
}
}
}
}
Run commandnpx -y @three-ws/assistant-mcp
Environment variables to set
THREE_WS_BASEOrigin used in the generated embed URLs (script src, frame URL, builder link). Override only when targeting a preview or self-hosted three.ws deployment.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@three-ws/assistant-mcp0.1.2

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
modeenumNoInteraction mode: "chat" (text only), "speak" (voice only), or "both" (default).chat | speak | both
namestringNoDisplay name for the assistant / widget header.
agentstringNoA three.ws agent id to drive the assistant, as an alternative to picking an avatar directly.
badgebooleanNoShow the small "three.ws" attribution badge. Defaults to on.
voicebooleanNoStart with voice on (true) or off (false). Defaults to on.
accentstringNoAccent "#hex" color for the widget UI. Default "#f97316". Non-hex values fall back to the default.
avatarstringNoWhich avatar to show: a three.ws avatar id, a "/avatars/*.glb" path (e.g. "/avatars/selfie-girl.glb"), or a full GLB URL. Omit for the default mannequin.
contextstringNoWhat the assistant should know about the site (used as its grounding context in chat).
greetingstringNoOpening line the assistant shows on load.
positionenumNoWhich corner the launcher sits in: "right" (default) or "left".right | left
backgroundstringNoBackdrop behind the avatar: "transparent" (default), a "#hex" color, a preset (ember, ocean, violet, forest, dusk, slate), or "gradient:#aabbcc,#112233,160". Anything else falls back to transparent.

Details

From the project README

three.ws

@three-ws/assistant-mcp

Generate a paste-ready three.ws assistant widget, a floating 3D avatar chatbot for any website, from any AI agent.

npm license node MCP Registry three.ws


A Model Context Protocol server that lets any AI assistant build a paste-ready embed for the three.ws assistant widget over stdio. Describe how you want the assistant to look and behave and build_assistant_widget returns a ready-to-paste <script> tag, a standalone frame URL for <iframe> embedding, and an equivalent ThreeAssistant.init({...}) JavaScript-API snippet, a floating 3D avatar chatbot that lives in the corner of any site. list_assistant_options enumerates every built-in avatar, background preset, interaction mode, chat lane, and data-* attribute you can set.

Both tools are pure and offline: building an embed is deterministic string logic over local validators. Every field is validated and clamped, so a bad or hostile value falls back to a safe default and the generated HTML is always well-formed. No API key, no signer, no payment, no network call. Point THREE_WS_BASE at a deployment (or leave the default) and go.

Install

npm install @three-ws/assistant-mcp

Or run with npx (no install):

npx -y @three-ws/assistant-mcp

Quick start

Claude Code, one line:

claude mcp add assistant -- npx -y @three-ws/assistant-mcp

Claude Desktop / Cursor (claude_desktop_config.json or mcp.json):

{
	"mcpServers": {
		"assistant": {
			"command": "npx",
			"args": ["-y", "@three-ws/assistant-mcp"]
		}
	}
}

Inspect the surface with the MCP Inspector:

npx -y @modelcontextprotocol/inspector npx @three-ws/assistant-mcp

Tools

ToolTypeWhat it does
build_assistant_widgetread-onlyA config → a paste-ready <script> embed (non-default settings as data-*), a frame URL, a ThreeAssistant.init() snippet, and the normalized config.
list_assistant_optionsread-onlyEnumerate every built-in avatar, background preset and grammar, interaction mode, chat lane, and the full data-* attribute reference.

build_assistant_widget is a pure function: the same config always yields the same embed, and it never touches the network. The generated <script> tag carries only the settings that differ from their defaults, so a minimal config yields a minimal tag. The frame_url carries every resolved value (including defaults) so the standalone frame renders deterministically when dropped into an <iframe>.

Input parameters

build_assistant_widget, all optional:

FieldType / valuesDefault
avataravatar id, /avatars/*.glb path, or GLB URLmannequin
agenta three.ws agent id (alternative to avatar)(none)
backgroundtransparent | #hex | ember/ocean/violet/forest/dusk/slate | gradient:#a,#b[,angle]transparent
modechat | speak | bothboth
namestring (≤ 60)(none)
greetingstring (≤ 200)(none)
contextstring (≤ 500), what the assistant should know about the site(none)
accent#hex#f97316
positionright | leftright
voiceboolean, start with voice on/offon
badgeboolean, show the three.ws attribution badgeon

Any value that fails validation (a bad hex, an unknown background, an over-long string) falls back to its default rather than being rejected, so you always get a working embed.

list_assistant_options, filter (optional: avatars | backgrounds | modes | chat_lanes | attributes). Omit to get everything.

Example

// build_assistant_widget
> {
    "avatar": "/avatars/selfie-girl.glb",
    "background": "ocean",
    "mode": "both",
    "name": "Aria",
    "greeting": "Hi! Ask me anything about the site.",
    "accent": "#00c2ff",
    "position": "left"
  }
{
  "ok": true,
  "snippet": "<script src=\"https://three.ws/assistant/v1.js\" async data-avatar=\"/avatars/selfie-girl.glb\" data-bg=\"ocean\" data-name=\"Aria\" data-greeting=\"Hi! Ask me anything about the site.\" data-accent=\"#00c2ff\" data-position=\"left\"></script>",
  "frame_url": "https://three.ws/assistant-frame?avatar=%2Favatars%2Fselfie-girl.glb&bg=ocean&mode=both&name=Aria&greeting=Hi%21+Ask+me+anything+about+the+site.&accent=%2300c2ff",
  "js_api": "ThreeAssistant.init({\n  \"bg\": \"ocean\",\n  \"mode\": \"both\",\n  \"accent\": \"#00c2ff\",\n  \"position\": \"left\",\n  \"avatar\": \"/avatars/selfie-girl.glb\",\n  \"name\": \"Aria\",\n  \"greeting\": \"Hi! Ask me anything about the site.\"\n});",
  "builder_url": "https://three.ws/assistant",
  "config": { "bg": "ocean", "mode": "both", "accent": "#00c2ff", "position": "left", "avatar": "/avatars/selfie-girl.glb", "name": "Aria", "greeting": "Hi! Ask me anything about the site." },
  "notes": "Chat runs on the free three.ws LLM chain by default (no key). Visitors can paste their own Groq or OpenRouter key in the widget settings for a private lane; that key stays in their browser."
}

Paste the snippet before </body> on any page, or drop the frame_url into an <iframe>. Design it visually first at three.ws/assistant.

Requirements

  • Node.js >= 20.
  • No network access needed. THREE_WS_BASE only sets the origin baked into the generated URLs.
Environment variables
VariableRequiredDefault
THREE_WS_BASEnohttps://three.ws

Programmatic use

The package entry point exports TOOLS (every tool definition: name, title, description, inputSchema, annotations, handler) and buildServer(), which returns a fully-registered McpServer with no transport attached. Both tools are pure and offline, so you can call them directly as a widget-builder library with no MCP client involved.

// run from a checkout: node this-file.mjs
import { TOOLS, buildServer } from '@three-ws/assistant-mcp';

const build = TOOLS.find((t) => t.name === 'build_assistant_widget');
const { snippet } = await build.handler({ avatar: '/avatars/michelle.glb', background: 'dusk' });
console.log(snippet);

// Or hand the whole registered server to your own MCP transport.
buildServer();
<script src="https://three.ws/assistant/v1.js" async data-avatar="/avatars/michelle.glb" data-bg="dusk"></script>

Links


Part of the three.ws SDK suite, 3D AI agents, on-chain identity, and agent payments.
Website · Changelog · GitHub

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.