WTS-bupt-unOfficial-mcp
Unofficial MCP server for BUPT mobile academic system, enabling querying of today's empty classrooms, course schedules, and combined overview.
README
WTS-bupt-unOfficial-mcp
非官方北邮(BUPT)移动教务 MCP(Model Context Protocol)服务:查询今日空教室、课程表,以及两者的联合查询。
服务请求参考并移植自开源项目 where_to_study。
⚠️ 本项目为非官方服务,仅供学习交流,请勿滥用。使用即表示你同意自行承担账号风险。
功能(MCP Tools)
| Tool | 说明 |
|---|---|
get_campuses |
校区信息(西土城 01 / 沙河 04)及主要教学楼 |
get_classrooms |
查询今日空教室,支持按 campus_id / slot(1-14 节)/ building 过滤 |
get_schedule |
查询课程表,默认当前周,支持 week(周次)或 date(日期所在周) |
get_today_overview |
联合查询:今日课程 + 每节次空闲教室数 + 当前节次空闲教室 + 全天空闲教室 |
快速开始
1. 克隆与安装
git clone https://github.com/Nemoyuzx/WTS-bupt-unOfficial-mcp.git
cd WTS-bupt-unOfficial-mcp
npm install
npm run build
2. 配置环境变量
export BUPT_USER_NO=你的学号
export BUPT_PWD=你的移动教务密码
export BUPT_CAMPUS_ID=01 # 可选,默认 01=西土城;04=沙河
export BUPT_TERM_START_DATE= # 可选,学期开学日 YYYY-MM-DD(无法从接口推断时兜底)
3. 直接运行
node dist/index.js
4. 接入 Claude Desktop / Cursor 等 MCP 客户端
在 MCP 客户端配置中添加(stdio 方式):
{
"mcpServers": {
"wts-bupt": {
"command": "node",
"args": ["/绝对路径/WTS-bupt-unOfficial-mcp/dist/index.js"],
"env": {
"BUPT_USER_NO": "你的学号",
"BUPT_PWD": "你的密码",
"BUPT_CAMPUS_ID": "01"
}
}
}
}
使用示例
问 MCP 客户端:
- 「查一下今天沙河校区第 3 节有哪些空教室」
- 「这周我有什么课?」
- 「现在哪些教室空着?」(联合查询:
get_today_overview)
开发与测试
npm test # 使用 where_to_study 的原始响应样例做解析器单测
npm run build # 编译到 dist/
目录结构
src/
├── index.ts # MCP 服务入口(4 个工具)
├── api.ts # 移动教务 HTTP 客户端(登录/课表/空教室)
├── date.ts # 北京时区日期/周次/节次工具
├── parsers/
│ ├── classrooms.ts # 空教室响应解析(移植 SJDClassroomParser)
│ └── schedule.ts # 课表响应解析(移植 SJDScheduleParser + ScheduleLogic)
└── types.ts # 数据模型(Course / Classroom / 节次时刻表)
test/
└── run-tests.ts # 单元测试(含参考项目原始响应样例)
License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.