three.ws Tutor

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

Read a Pay-As-You-Learn tutoring session's itemized tab and close it for an attested invoice.

已验证STDIO仅桌面效率与工作流金融

概览

AI 生成的概览

读取 three.ws「按需付费学习」辅导会话的逐项账单,并可关闭会话以生成带证明的发票。

可以做什么
  • 按会话 ID 读取逐项实时账单:每道题的行项目(题目、难度、token 数、费用)、状态与累计总额
  • 关闭会话以完成结算,返回逐项总额和 SHA-256 证明,并锁定后续计费
适用场景
当你使用 three.ws 的按需付费辅导会话,希望由助手查看目前已计费的内容,或结束会话并取得带证明的发票时使用。
运行要求
需要 Node.js 20 或更高版本,通过 npx 或本地安装运行。需要能访问 three.ws API,可用 THREE_WS_BASE(默认 THREE_WS_TIMEOUT_MS(默认 20000)配置。无需 API 密钥或签名者,会话以不透明会话 ID 标识。
安装前请注意
close_session 会改变状态,把会话从开启变为关闭并锁定后续计费,调用前请确认会话 ID。工具本身免费且不转移资金,但账单反映的是在别处计费的按题费用。会话数据会发送到所配置的 THREE_WS_BASE 端点,请只指向你信任的部署。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[three.ws]

@three-ws/tutor-mcp

Manage a Pay-As-You-Learn tutoring session from any AI agent — read its itemized running tab and close it for an attested invoice.

[npm] [license] [node] [MCP Registry] [three.ws]


A Model Context Protocol server that exposes the three.ws Pay-As-You-Learn tutor ledger over stdio. Read a tutoring session's itemized tab — one line item per answered question, with per-item cost and a running total — and close the session to seal an attested invoice.

The tutor bills per answered question; this server's tools are free. Viewing the running tab and closing the session never charge the learner — a learner must never pay to see what they owe or to end the session. Sessions are addressed by an opaque sessionId, so no API key and no signer are required — point THREE_WS_BASE at a deployment and go.

Install

bash
npm install @three-ws/tutor-mcp

Or run with npx (no install):

bash
npx @three-ws/tutor-mcp

Quick start

Claude Code, one line:

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

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

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

Inspect the surface with the MCP Inspector:

bash
npx -y @modelcontextprotocol/inspector npx @three-ws/tutor-mcp

Tools

ToolTypeWhat it does
load_sessionreadRead a session's itemized running tab by sessionId — line items (question, level, tokens, cost), status, and running total.
close_sessionwriteFinalize a session and return its attested invoice — seals the ledger with a SHA-256 attestation and locks further billing.

Both tools are free and move no funds: the per-question answers are the paid action (handled elsewhere). load_session reads live data — the tab grows as questions are billed, so it is not idempotent. close_session mutates state (open → closed) but is itself idempotent: re-closing returns the same itemized total.

Input parameters

load_session — sessionId (required, ≤100 chars).

close_session — sessionId (required, ≤100 chars).

Example

jsonc
// load_session> { "sessionId": "learn-abc123" }{  "ok": true,  "sessionId": "learn-abc123",  "status": "open",  "createdAt": "2026-06-24T03:40:00.000Z",  "questionCount": 2,  "lineItems": [    { "n": 1, "question": "What is a Solana PDA?", "level": "intro", "outputTokens": 180, "costAtomics": 10000, "costUsd": "0.010000", "at": "2026-06-24T03:41:00.000Z" },    { "n": 2, "question": "How do CPIs work?", "level": "intro", "outputTokens": 220, "costAtomics": 10000, "costUsd": "0.010000", "at": "2026-06-24T03:42:00.000Z" }  ],  "totalAtomics": 20000,  "totalUsd": "0.020000"}
jsonc
// close_session> { "sessionId": "learn-abc123" }{  "ok": true,  "sessionId": "learn-abc123",  "createdAt": "2026-06-24T03:40:00.000Z",  "closedAt": "2026-06-24T03:45:00.000Z",  "questionCount": 2,  "lineItems": [ /* same itemized line items */ ],  "totalAtomics": 20000,  "totalUsd": "0.020000",  "attestation": "sha256:…"}

A sessionId with no stored history returns an empty open session (questionCount: 0) rather than an error — an honest "nothing billed yet", not a failure.

Requirements

  • Node.js >= 20.
  • Network access to https://three.ws (or your own THREE_WS_BASE).

Environment variables

VariableRequiredDefault
THREE_WS_BASEnohttps://three.ws
THREE_WS_TIMEOUT_MSno20000

Links


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

来源:packages/tutor-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 分