Skip to main content
Glama
tongji-ai-usage
by KimBrine

同济 AI 积分面板 · WorkBuddy

在 WorkBuddy 中查看 同济大学 AI 平台的积分余额和用量。通过本机 stdio MCP 提供原生 MCP App 面板,支持 Edge / Chrome 登录助手、自动刷新、预算提醒和 GitHub 新版本提醒。

这是独立的 WorkBuddy 项目,当前版本 0.1.0。显示的数据覆盖同济 AI 账户在各客户端的使用量;不能将其直接当作某一轮 WorkBuddy 任务的消耗,也不是 WorkBuddy 官方账户的积分。

功能

  • 套餐剩余积分、今日用量,以及今天、昨天、近 7 天的积分、Token、调用数和模型明细。

  • 面板显示时默认每 60 秒刷新;隐藏时暂停,重新显示后恢复。刷新直接读取本机 MCP 数据资源,无需定时让模型生成回答。

  • 低积分阈值和每日预算提醒,仅将提醒设置保存在面板本地存储中。

  • Edge / Chrome 助手在令牌临近到期时,通过学校正常登录流程取得新令牌;需要验证码或重新登录时提示用户操作。

  • 定期检查本项目 GitHub 版本,并提供更新入口;不会自动替换代码。

WorkBuddy 根据自身能力将面板显示在对话或右侧区域。仅当宿主声明支持 pip 时显示悬浮显示按钮,跨任务或桌面置顶效果仍需实机确认。它不修改 WorkBuddy 的程序文件。

Related MCP server: chaoxing-mcp

安装

需要 Node.js 20 或更新版本、支持 MCP Apps 的 WorkBuddy,以及已登录同济 AI 平台的 Edge 或 Chrome。

在项目目录运行:

npm ci
npm run build
node scripts/install.mjs --print

把最后一步输出的 tongji-ai-usage 配置添加到 WorkBuddy 的自定义 MCP 配置中。输出使用本机 Node 和服务器的绝对路径,移动项目目录后需重新生成。连接后向 WorkBuddy 发送:

打开同济 AI 积分面板,请调用 open_tongji_panel。

首次使用,在面板的“浏览器登录”区域连接本项目自带的 “同济 AI 登录助手 · WorkBuddy”。完整步骤、可选自动配置、更新和卸载见 INSTALL.md,助手说明见 browser-extension/README.md。

登录与数据

网站凭据单独保存在 ~/.config/tongji-ai-usage-workbuddy/credentials.json,浏览器配对也使用该目录下的私有文件。浏览器桥接默认端口为 17946,与 DSH 版的 17945 区分。已有 DSH 用户可显式执行 node scripts/auth.mjs import-dsh 创建独立凭据副本;后续续期分别管理,原文件不受修改。

正常查询只访问同济 AI 平台;版本检查访问本项目 GitHub。网站令牌和配对密钥不会作为 MCP 工具结果交给模型,不要把它们粘贴到聊天或提交到仓库。助手不保存学校密码,也不代填密码或验证码。

自动更新取得的是新的网站登录令牌,学校登录状态失效时仍需用户认证。浏览器和本机 MCP 服务运行期间才能续期。

更新

启动时检查本仓库 main 分支的版本号,之后约每 6 小时检查;发现更高的正式版本时,在面板中提醒。设置中也可手动检查。检查失败不影响积分查询,并保留已发现的新版本提醒。

更新本机代码后执行 npm ci、npm run build,重启 MCP 连接,并在浏览器扩展管理页重新加载助手。具体步骤见 更新与卸载。

开发与验证

npm test
npm run preview -- --demo

模拟预览不需要网站凭据;终端给出仅限本机的预览地址。npm run preview 则使用本机真实凭据。预览可验证面板与服务的独立功能,WorkBuddy 内的实际显示和浏览器助手完整续期链路仍需宿主验收。已完成与待完成项目见 VALIDATION.md。

仓库包含 WorkBuddy / CodeBuddy / Claude 兼容的插件清单和 marketplace 清单。源码安装仍须先安装依赖并构建;目前推荐上述本地 MCP 入口,尚未将 GitHub 插件市场一键安装列为验收通过项。清单格式依据 WorkBuddy 插件参考与插件市场文档。

采用 MIT 许可。代码来源与依赖许可见 THIRD_PARTY_NOTICES.md。

Available Tools

4 tools
get_tongji_usage刷新同济 AI 用量B
Read-onlyIdempotent

读取同济 AI 积分和用量;force 请求刷新,后端仍有短暂防重复缓存。

Inputs: force, range.

open_tongji_panel打开同济 AI 积分面板B
Read-onlyIdempotent

查看同济 AI 账户的套餐余额、今日积分消耗、实际 Token 用量和登录状态,并打开可交互面板。

Inputs: range.

tongji_check_update检查积分面板更新A
Read-onlyIdempotent

检查本插件 GitHub 仓库的正式版本,仅提示更新,不下载或执行软件。

Inputs: no named parameters.

tongji_login管理同济 AI 浏览器登录A

面板专用:配对浏览器助手、立即续期、启用或停用自动更新。不会返回网站令牌。

Inputs: action (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation3/5

    open_tongji_panel and get_tongji_usage both surface balance/credit/token data, so the boundary between 'show me data in a panel' and 'read usage data' is fuzzy. tongji_login is distinct but bundles three unrelated actions (pairing, renewal, auto-update toggle), which muddies its purpose. Descriptions do help distinguish the panel-opening intent.

    Naming Consistency3/5

    Three different patterns appear: verb_tongji_noun (open_tongji_panel, get_tongji_usage), tongji_noun (tongji_login), and tongji_verb_noun (tongji_check_update). The tongji_ prefix is consistent and readable, but verb placement varies and tongji_login lacks a verb entirely.

    Tool Count4/5

    Four tools is on the lean side for a usage-monitoring plugin but each maps to a plausible need: view, read, authenticate, and check for updates. No bloat, though it's close to feeling thin.

    Completeness4/5

    The core lifecycle (read usage, open panel, log in/pair, check for updates) is covered with no obvious dead ends. Minor gaps exist, such as no explicit logout/unpair or configuration of refresh behavior, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to access a personal finance platform through MCP, allowing users to query active account balances and consolidated totals, and to list or filter financial transactions by account, type, and date range. It connects using a configurable backend API URL and personal access token.
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI applications supporting MCP to log into a university academic affairs system and query schedules, absences, grades, and leave records through natural-language conversation. It also lets users submit or withdraw leave requests and plan and save monthly work-study attendance, with built-in confirmation cues for destructive actions.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to carry out campus services in natural language — booking venues with CAPTCHA solving, selecting and dropping courses, submitting homework, batch-completing teaching evaluations, checking grades and timetables, and fetching cloud-drive download links — by handling the login, signing, encryption, and WebVPN proxying for 11 separate university subsystems behind 26 MCP tools.
      2
      MIT