Skip to main content
Glama
gzgs-xgxt-mcp
by yjp-jdp

gzgs-xgxt-mcp

广州工商学院「学生工作管理服务系统」(学工系统)的 MCP 服务器。 任何支持 MCP 的 AI 客户端都能直接调用:查身份、查菜单、查综测明细(含加分项和佐证材料)、查五进记录。

不需要浏览器,只要一份登录凭证。全部只读——没有封装任何写操作。

⚠️ 免责声明 本项目为个人学习与自用工具,与广州工商学院及系统厂商无关。 它通过自动化方式访问你本人的账号数据,可能不符合学校信息系统的使用条款,请自行判断风险。 请勿用于越权获取他人数据、批量爬取或任何违规用途。一切后果由使用者自行承担。


一、19 个工具

登录(6 个)

工具

作用

xg_login_status

检查凭证是否有效,返回当前用户 / 角色 / 权限码数量

xg_login_token

推荐:粘贴浏览器里的 Xsfwpt-Token,自动校验后保存

xg_login_browser

最省事:从已开调试端口的本地浏览器自动抓取凭证

xg_login_captcha

拉图形验证码(返回 base64 图片 + uuid)

xg_login_account

账号密码登录(需要验证码时配合上一个工具)

xg_logout

调系统 /logout 并清除本地凭证

业务(13 个)

工具

作用

xg_me

我的身份、角色、全部权限码

xg_menu

后端按角色下发的真实菜单树(pc / m 两种)

xg_semesters

学年学期列表(含"当前学期"标记)

xg_comeva_batches

综测批次列表

xg_comeva_students

综测名单汇总(分数已转百分制)

xg_comeva_detail

信息最全:三维度全部加扣分项 + 佐证材料 + 课程成绩 + 四方评语

xg_comeva_class

全班批量明细

xg_wujin_list

五进记录(课室/图书馆/实验室/竞赛/体育馆/社会)

xg_wujin_stats

五进统计看板数据

xg_suggestions

意见反馈列表

xg_dict

数据字典(解读枚举值)

xg_my_classes

我的班级

xg_raw

直调任意 GET 接口(兜底)


Related MCP server: mos-diary-mcp

二、安装

git clone https://github.com/yjp-jdp/gzgs-xgxt-mcp.git
cd gzgs-xgxt-mcp
npm install
npm start          # 直接起 stdio server
npm run smoke      # 冒烟测试:起服务 → 列工具 → 跑一遍只读链路

需要 Node.js 18+。


三、登录

方式 1:粘贴 Token(最稳)

  1. 浏览器登录学工系统

  2. F12 → Application / 应用 → Cookies → 选 https://usc.gzgs.edu.cn

  3. 找到 Xsfwpt-Token,复制它的值

  4. 调 xg_login_token(token: "...")

方式 2:从浏览器自动抓(不用复制)

# 用带调试端口的浏览器打开学工系统并登录
msedge.exe --remote-debugging-port=9222 --user-data-dir=C:/Temp/xgxt-profile \
  https://usc.gzgs.edu.cn/xgxt/platform-ui/index

然后在里面登录一次,再调 xg_login_browser()(默认读 http://127.0.0.1:9222)。

方式 3:账号密码

学校主入口是 CAS 单点登录,CAS 登录页本身带图形验证码,纯账号密码自动登录不可靠。所以:

  • xg_login_account 走的是学工系统自己的 /login(若学校给该账号开了本地登录才可用)

  • 需要验证码时先 xg_login_captcha → 让人读出 → 再传 code + uuid

CAS 登录没有做自动化:CAS 有验证码 + 支持企业微信扫码,硬碰需要 OCR,不稳定也不安全。需要 CAS 就走方式 1 / 2,登录一次即可。


四、凭证存放

~/.xgxt-mcp/token.json      # 权限 600,只在本机

有效期由服务端决定(RuoYi 默认较短)。失效时任何工具都会返回 登录已失效(被重定向) 或 code 401,重新走一次登录即可。


五、接入 MCP 客户端

{
  "mcpServers": {
    "xgxt": {
      "command": "node",
      "args": ["/绝对路径/gzgs-xgxt-mcp/src/server.mjs"]
    }
  }
}

DeepSeek Harness(~/.dsh/cordis.patch.yml):

- insert:
    - id: xgxt-mcp
      name: "@deepseek-ai/dsh-mcp-client"
      config:
        serverName: xgxt
        transport: stdio
        command: 'C:/Program Files/nodejs/node.exe'
        args:
          - '/绝对路径/gzgs-xgxt-mcp/src/server.mjs'
        toolCallTimeoutMs: 180000

六、字段口径(重要)

项目

说明

分数

网站存的是 ×100 的整数(7000 = 70 分),本服务已统一 除以 100 转成百分制

studiesTheory

学业理论分:课程学分加权平均分,直接用网站原值,不要自己从课程倒推

items

加扣分项目数组,每项含 selfScore(自评)/ finalScore(认定)/ scored(是否已评)/ evidence(佐证材料链接)

evidence

阿里云 OSS 图片链接,多个用逗号分隔

综合总分

网站算法 ≈ 品行×0.35 + 学业×0.50 + 文体×0.15;xg_comeva_students 直接返回网站的总分


七、只读边界

本 MCP 只封装了 GET 类查询接口,没有做任何写操作:

  • 不提交综测、不改分数、不审批

  • 不删记录、不上传文件

  • xg_raw 也只允许 GET

数据范围由服务端按角色控制——学生账号只能看到自己班,别指望用它越权拉别人的数据。


八、文件结构

gzgs-xgxt-mcp/
├── package.json
├── smoke.mjs              # 冒烟测试(MCP 客户端)
└── src/
    ├── client.mjs         # HTTP 客户端 + 登录 + 凭证存储
    └── server.mjs         # MCP 工具注册
  • 接口前缀:https://usc.gzgs.edu.cn/xgxt/platform-api

  • 登录凭证:Cookie Xsfwpt-Token,请求时以 Authorization: Bearer <token> 携带


相关项目

同一套学校系统工具集的其它仓库(各自独立、可单独安装):

  • gzgs-jwcli — 教务系统:课表、成绩、考试、调课(MCP + CLI)

  • chaoxing-mcp — 学习通:作业查询、附件上传、存草稿

  • waimaigo-mcp — 校园外卖:菜单、报价、下单(不含支付)

许可

MIT

Available Tools

19 tools
xg_comeva_batches综测批次列表A

列出全部综合测评批次(id / 名称 / 学年学期)。后续查综测名单和明细都要用 batchInfoId。

Inputs: no named parameters.

xg_comeva_class全班综测明细(批量)A

对某个批次下的全部(或指定几个)学生逐个拉明细,汇总成一张带加分项目的表。 数据量大(每人一次请求),只拉你确实需要的范围。

Inputs: max, studentNos, batchInfoId.

xg_comeva_detail单人综测明细(含加分项与佐证材料)B

这是综测里信息最全的接口。返回: · 三个维度(品行/学业/文体)的全部加扣分项目,每项含自评分、认定分、是否已评、佐证材料链接 · 课程成绩(课程名/学分/成绩) · 四方评语(小组/辅导员/班主任/院系) · 各项分数(百分制) id / batchInfoId / userName 三个参数都要给,缺一不可。

Inputs: id (required), userName (required), batchInfoId (required).

xg_comeva_students综测名单(汇总)A

按批次拉取综测名单汇总。注意:数据范围由后端按角色控制——学生看到自己班,测评小组组长看到全班。分数已转成百分制。

Inputs: pageSize, batchInfoId, semesterName.

xg_dict数据字典A

读取系统的数据字典,用来解读返回结果里的枚举值。常用:user_type(角色类型)、read_status(已读状态)、school_year(学年)、competition_level(竞赛级别)。

Inputs: type (required).

xg_login_account账号密码登录A

用学工系统本地登录接口 POST /login 登录。需要验证码时先调 xg_login_captcha 拿 uuid。 密码按明文提交(系统前端就是这么做的),凭证只保存在本机 ~/.xgxt-mcp/token.json。

Inputs: password (required), username (required), code, uuid.

xg_login_browser从本地浏览器抓取登录态A

从一个已开启远程调试端口的本地浏览器里,自动抓取已登录页面上的 Xsfwpt-Token。 前提:浏览器以 --remote-debugging-port=9222 启动,并且已经登录学工系统。 这是最省事的方式——不用手动复制 Cookie。

Inputs: endpoint.

xg_login_captcha获取图形验证码A

拉取学工系统的图形验证码,返回 uuid 和可直接显示的 base64 图片。 拿到后让人读出验证码,再把 code + uuid 一起传给 xg_login_account。 注意:学校主入口是 CAS 单点登录,账号密码登录是否可用取决于学校是否给该账号开了本地登录。

Inputs: no named parameters.

xg_login_status检查登录状态A

检查本地保存的登录凭证是否还有效。返回当前用户(姓名/学号/班级/院系)、角色、权限码数量。未登录时提示下一步怎么做。

Inputs: no named parameters.

xg_login_token用 Token 登录A

直接写入从浏览器拿到的登录凭证。 获取方式:浏览器登录学工系统 → F12 → Application/应用 → Cookies → 选 https://usc.gzgs.edu.cn → 复制 Xsfwpt-Token 的值。 写入后会自动校验一次,有效才保存。

Inputs: token (required), username.

xg_logout退出登录B

调用系统 /logout 并清除本地保存的凭证。

Inputs: no named parameters.

xg_me我的身份与权限A

返回当前登录用户的基础资料(姓名/学号/班级/专业/院系/年级),以及角色列表和全部权限码。 权限码形如 comEva:personal:list,能看出这个账号实际能访问哪些接口。

Inputs: no named parameters.

xg_menu真实菜单树A

拉取后端按当前角色下发的菜单(getRouters)。这是"这个账号实际能点开什么"的权威答案。 platform=pc 是桌面端,platform=m 是手机端。

Inputs: platform.

xg_my_classes我的班级B

返回当前账号关联的班级信息。

Inputs: no named parameters.

xg_raw直接调接口(兜底)A

按需直调 system 的任意 platform-api 路径,用于上面没封装到的接口。 只支持 GET,路径示例:/system/user/profile。别拿它做写操作。

Inputs: path (required), params.

xg_semesters学年学期列表A

列出全部学年学期(含 id)。五进相关的接口都要用这个 id 过滤。

Inputs: no named parameters.

xg_suggestions意见反馈列表C

拉取意见反馈列表(数据范围由后端按角色控制)。

Inputs: pageSize.

xg_wujin_list五进记录B

五进育人手册的原始记录。dim 可选:classroom 进课室 / library 进图书馆 / laboratory 进实验实训室 / competition 专业竞赛 / gymnasium 进体育场馆 / society 进社会。 需要 studyYearSemesterId,可先调 xg_semesters 取。

Inputs: dim (required), studyYearSemesterId (required), pageSize.

xg_wujin_stats五进统计看板C

五进手册统计页用的两个接口:top 与 bottomFirst 的原始数据。

Inputs: studyYearSemesterId (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 19 tools

    Disambiguation4/5

    The domain prefixes (login_*, comeva_*, wujin_*) make most tools clearly separable, and the three login paths (account/captcha, manual token, browser auto-grab) are explicitly differentiated by their preconditions. The main overlaps are xg_login_status vs xg_me (both return user identity, role and permission info) and xg_comeva_students vs xg_comeva_class (summary list vs per-student aggregation), which an agent could confuse without reading carefully.

    Naming Consistency4/5

    Names follow a steady xg_<domain>_<resource> snake_case pattern with subsystem grouping (comeva, wujin, login). A few outliers break the pattern: bare nouns xg_me, xg_menu, xg_dict, xg_raw lack a domain segment, and xg_logout is verb-only, but the overall convention is still predictable.

    Tool Count4/5

    19 tools is on the heavier side, but they map cleanly onto real subsystems: 6 auth, 5 identity/metadata, 4 综测, 2 五进, plus semesters and suggestions. Each tool has a concrete purpose, though the six login/identity tools are the one area that could be consolidated.

    Completeness4/5

    The surface covers the query lifecycle well: auth (captcha/login/token/browser/logout/status), identity (me/menu/dict/classes), semesters, 五进 records and stats, and the full 综测 chain from batches to per-student detail to class aggregation, with xg_raw as a GET-only escape hatch. Gaps are mostly write operations (no submissions, feedback creation, or score entry), which is consistent with the server's read-oriented design but limits it for any mutating workflow.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides MCP tools for searching student profiles, viewing marks/attendance, and finding low-attendance students. Enables AI assistants like Gemini to interact with college student data through natural language.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to retrieve and work with Moscow Electronic School data, including schedules, homework, grades, rankings, school info, meals, passes, olympiads, and portfolio, via authenticated MCP tools.
      MIT
    • A
      license
      Not graded
      quality
      B
      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
      AGPL 3.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to retrieve academic and campus data through structured MCP tools, including schedules, empty classrooms, grades, exams, courses, assignments, attendance, resources, public information, and study-slot planning. It provides read-only results with explicit pagination and error states while keeping credentials in the local system credential store.
      23
      2
      GPL 3.0