chaoxing-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
chaoxing-mcp
把学习通(超星)的纯 HTTP 接口封装成 MCP 服务器。任何支持 MCP 的 AI 客户端都能直接调用: 查课程、查作业、看作业详情、查课堂任务、上传附件、存草稿。
不需要浏览器,只需要一份学习通登录态(工具内可扫码/账密/粘贴登录)。
⚠️ 免责声明 本项目为个人学习辅助工具,与超星集团及任何学校无关。 它通过自动化方式访问你本人的账号数据,可能不符合平台使用条款,请自行判断风险。 本仓库故意不提供"正式提交作业"能力(见下文),也不做内容生成/代写。 请勿用于批量爬取、代交作业或任何违规用途。一切后果由使用者自行承担。
为什么没有"提交"功能
最初的版本有 cx_submit。开源版本已移除,只保留到「存草稿」为止:
存草稿可以反复覆盖,不改变作业提交状态,你还能回客户端里检查、修改
正式提交不可撤回、通常有次数限制,属于"代替你做出不可逆操作",不适合放进一个公开工具
也就是说:这个 MCP 帮你整理和填写,最后那一下「提交」你自己在官方客户端点。
Related MCP server: chaoxing-mcp
一、13 个工具
登录(6 个)
工具 | 作用 |
| 检查登录态(cookie 数 / 课程数) |
| 扫码登录:生成二维码图片,不需要密码 |
| 轮询扫码结果,确认后自动写 cookie |
| 账密登录:手机号/学号 + 密码(本地 AES 加密后提交) |
| 从粘贴文本里识别 cookie(F12 / curl / 抓包都行) |
| 从本地调试浏览器(CDP 9421)导出 cookie |
业务(7 个)
工具 | 作用 | 是否写数据 |
| 旧版状态检查(等价 | 否 |
| 列出「我学的课」,返回 courseId / clazzId / cpi | 否 |
| 抓全部课程的所有作业(自动翻页),可按课程过滤 / 只看待办 | 否 |
| 单条作业详情:题目原文、题型、时间窗、是否过期、能否提交、当前已存答案 | 否 |
| 课堂任务/活动(进行中明细 + 已结束数量) | 否 |
| 上传本地文件到超星 CDN,返回可嵌入答案的 HTML 片段 | 只传 CDN,不改作业 |
| 保存草稿(可反复覆盖,不改提交状态) | 是,默认 dry-run |
答案参数统一是 answers: { "<题目qid>": "内容" },内容可以是纯文本,也可以是 HTML(比如上传后拿到的 <img> 片段)。
二、安装
需要 Node.js 18+。
git clone https://github.com/yjp-jdp/chaoxing-mcp.git
cd chaoxing-mcp
npm install
npm start # 起 stdio server三、登录(三种方式)
A. 扫码(推荐,不需要密码)
cx_login_qr_start → 返回 qrImagePath(本地 PNG)+ uuid/enc
↑ 用手机「学习通」App 扫这张图并确认
cx_login_qr_poll → 轮询成功就把 cookie 写盘并刷新登录态二维码 5 分钟内有效。
B. 账号密码
cx_login_account { phone: "手机号或学号", password: "密码" }密码在本地用 AES-128-CBC 加密后提交,不会落盘。
C. 粘贴 cookie
cx_login_import { text: "<F12 里整段 Cookie 或 curl 命令>" }会自动从文本里挑出 _uid/_d/UID/uf/xxtenc/fid 等核心项。核心项少于 2 个会拒绝写入。
四、cookie 存放
~/.chaoxing-mcp/cookies.json # 默认位置
CHAOXING_COOKIES=/your/path.json # 也可用环境变量指向别处
CHAOXING_FID=1641 # 学校/机构 fid,默认 1641所有写入都会先备份成 cookies.json.bak,并返回 overwroteExisting 告诉你哪些值被替换了。
五、接入 MCP 客户端
{
"mcpServers": {
"chaoxing": {
"command": "node",
"args": ["/绝对路径/chaoxing-mcp/src/server.mjs"]
}
}
}DeepSeek Harness(~/.dsh/cordis.patch.yml):
- insert:
- id: chaoxing-mcp
name: "@deepseek-ai/dsh-mcp-client"
config:
serverName: chaoxing
transport: stdio
command: 'C:/Program Files/nodejs/node.exe'
args:
- '/绝对路径/chaoxing-mcp/src/server.mjs'
toolCallTimeoutMs: 180000六、典型用法(给 AI 的调用顺序)
cx_status→ 确认登录态cx_assignments { onlyTodo: true }→ 看有什么要交cx_assignment_detail { course, name }→ 看题目要求和截止时间cx_upload_file { filePath }→ 需要附件时先上传,拿 HTML 片段cx_save_draft { course, name, answers }→ 写入答案(默认 dry-run,看清再放开)你自己在官方客户端里检查并提交
七、安全设计
写操作全部默认 dry-run:
cx_save_draft默认只返回"将要发送什么",不发请求过期拦截:作业窗口已过期时直接抛错,不发请求
不做内容生成:只搬运你提供的答案,不代写、不自动答题
不提供提交:见上文
cookie 等同登录凭证:不要提交到 git、不要外发
八、⚠️ 反爬(9010)—— 很重要
学习通有风控。短时间内大量请求会触发:
https://mooc1.chaoxing.com/antispiderShowVerify.ac
【9010】操作异常,请输入图片中的验证码这是 HTTP 202 状态、返回验证码页面。表现是"数据突然变少"或"课程页打不开"。
本服务的处理:
默认请求节流 400ms(
CHAOXING_THROTTLE_MS可调)一旦识别到反爬页面,直接抛
antispider_blocked错误并给出提示,不会静默返回残缺数据全量扫描时如果部分课程失败,结果里会带
incomplete: true和failedCourses明细
触发后怎么办:
停 10~30 分钟再调用,别继续重试(越试越重)
还不行就用浏览器打开一次学习通,手动过一下验证码
以后跑全量扫描别太频繁;只查单门课开销很小,基本没事
九、目录结构
chaoxing-mcp/
├── package.json
├── test-client.mjs # MCP 冒烟(列工具 + 调只读接口)
└── src/
├── server.mjs # MCP 工具注册
├── client.mjs # HTTP 客户端 + 反爬识别 + 节流
└── login.mjs # 扫码 / 账密 / 粘贴 / 浏览器导出相关项目
同一套学校系统工具集的其它仓库(各自独立、可单独安装):
gzgs-jwcli — 教务系统:课表、成绩、考试、调课(MCP + CLI)
gzgs-xgxt-mcp — 学工系统:综测明细、五进手册(纯只读)
waimaigo-mcp — 校园外卖:菜单、报价、下单(不含支付)
许可
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI clients to your Dactic work context through a hosted MCP service.
Authenticated MCP access to the AIKI open knowledge commons.
Headless task management for bots, apps and AI agents. Remote MCP server, OAuth or access token.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with the Chaoxing (超星学习通) platform through MCP, supporting teacher and student modes for course management, assignments, exams, sign-ins, and file operations.162MIT
- AlicenseNot gradedqualityBmaintenanceRead-only MCP server for Chaoxing (学习通) that logs into a user's account and exposes their class schedule, enrolled courses, course materials downloads, homework status, exam schedules and scores, chapter task-point progress, notices, and personal cloud drive files. Enables any MCP client to answer natural-language questions about a student's coursework without submitting anything or modifying account data.33MIT
- AlicenseAqualityCmaintenanceEnables users to patrol QingSoft U+ courses, track homework and experiments, read objective questions into structured briefs for a connected MCP client model to answer, fill and verify selections, and optionally submit, while handing subjective, programming, report and file work back to the human.9MIT
- AlicenseBqualityCmaintenanceEnables MCP-capable AI clients to search SJTU course.sjtu.plus courses, teachers, and reviews, inspect followed, ignored, and enrolled records plus community points, and, after explicit confirmation, publish or manage reviews, votes, and course notifications through the official user API.28MIT