three.ws Assistant Widget

io.github.nirholas由 GitHub 账号 nirholas 发布v0.1.2更新于 Nov 1, 2026

Generate a paste-ready embed for a floating 3D avatar chatbot on any website.

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

根据描述的外观与行为,生成可直接粘贴到网站的悬浮 3D 虚拟形象聊天机器人嵌入代码。

可以做什么
  • 生成嵌入代码:把配置(虚拟形象、背景、模式、名称、问候语、站点上下文、强调色、位置、语音、徽标)转换为 script 标签、frame 链接、JavaScript 初始化片段和规范化配置。
  • 列出可选项:枚举内置虚拟形象、背景预设、交互模式、聊天通道以及 data-* 属性参考,可按类别筛选。
  • 校验设置:非法或过长的值会回退到默认值,保证输出格式正确。
  • 作为库使用:该包还导出工具定义和服务器构建函数,可直接调用。
适用场景
适合让助手为网站起草 three.ws 3D 虚拟形象聊天机器人的嵌入标记,或在手动修改代码前查询可用的虚拟形象、背景和属性。
运行要求
通过 npx 从 npm 包以 stdio 在本地运行,需要 Node.js 20 或更高版本。无需账号、API 密钥或网络访问;可选的 THREE_WS_BASE 变量用于更改生成链接中的来源地址。
安装前请注意
生成的代码会加载来自 three.ws 来源的远程脚本,且组件聊天默认走第三方 LLM 链,访客对话会经过该服务。输出仅为文本,不会替你发布或部署任何内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 three.ws Assistant Widget,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
npm install @three-ws/assistant-mcp

Or run with npx (no install):

bash
npx -y @three-ws/assistant-mcp

Quick start

Claude Code, one line:

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

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

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

Inspect the surface with the MCP Inspector:

bash
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

jsonc
// 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.

js
// run from a checkout: node this-file.mjsimport { 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();
html
<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

来源:packages/assistant-mcp/README.md,提交 c8f2cde

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.1.2最新Oct 10, 2026
  2. v0.1.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分