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 分