NTUT iSchoolPlus MCP
MCP server for NTUT iSchool+ that enables AI to query course schedules, syllabi, files, bulletins, and more through natural language.
README
NTUT iSchoolPlus MCP
MCP (Model Context Protocol) server for NTUT iSchool+ — 讓 AI 幫你查課表、大綱、檔案、公告。
安裝
需要 Python ≥3.11 + uv:
git clone <repo-url>
cd NTUT-iSchoolPlus-MCP
uv sync
使用方式
1. MCP Inspector 測試
export NTUT_STUDENT_ID=你的學號
export NTUT_PASSWORD=你的密碼
uv run mcp dev main.py
瀏覽器會自動打開 http://localhost:6274,可在 Web GUI 中逐一測試所有 tools。
2. 接入 Claude Desktop
在 claude_desktop_config.json 加入:
{
"mcpServers": {
"ntut-ischoolplus": {
"command": "uv",
"args": ["run", "--directory", "/path/to/NTUT-iSchoolPlus-MCP", "python", "main.py"],
"env": {
"NTUT_STUDENT_ID": "你的學號",
"NTUT_PASSWORD": "你的密碼"
}
}
}
}
3. 接入 OpenCode
在 opencode.json 加入(含環境變數,login() 免傳參數):
{
"mcp": {
"ntut-ischoolplus": {
"type": "local",
"command": ["uv", "run", "--directory", "/path/to/NTUT-iSchoolPlus-MCP", "python", "main.py"],
"environment": {
"NTUT_STUDENT_ID": "你的學號",
"NTUT_PASSWORD": "你的密碼"
},
"enabled": true
}
}
}
4. 接入 Hermes Agent
在 ~/.hermes/config.yaml 加入:
mcp_servers:
ntut-ischoolplus:
command: "uv"
args: ["run", "--directory", "/path/to/NTUT-iSchoolPlus-MCP", "python", "main.py"]
environment:
NTUT_STUDENT_ID: "你的學號"
NTUT_PASSWORD: "你的密碼"
工具在 Hermes 中會自動加上前綴,例如 mcp_ntut-ischoolplus_login。啟動 hermes chat 後即可使用。
5. 接入 OpenClaw
在 ~/.openclaw/openclaw.json (JSON5) 加入:
{
mcp: {
"ntut-ischoolplus": {
command: ["uv", "run", "--directory", "/path/to/NTUT-iSchoolPlus-MCP", "python", "main.py"],
environment: {
NTUT_STUDENT_ID: "你的學號",
NTUT_PASSWORD: "你的密碼",
},
},
},
}
OpenClaw 支援 config hot reload,修改後無需重啟。
環境變數
| 變數 | 說明 |
|---|---|
NTUT_STUDENT_ID |
學號,設定後 login() 可無參數呼叫 |
NTUT_PASSWORD |
nportal 密碼 |
亦可在 terminal 中直接 export:
export NTUT_STUDENT_ID=你的學號
export NTUT_PASSWORD=你的密碼
Tools (20)
login
登入 NTUT nportal 並執行 SSO 驗證(課程系統 + i 學園)。可傳入帳密,或設定環境變數 NTUT_STUDENT_ID / NTUT_PASSWORD 後無參數呼叫。
| 參數 | 類型 | 說明 |
|---|---|---|
student_id |
string | 學號(可省略,改用環境變數) |
password |
string | nportal 密碼(可省略,改用環境變數) |
logout
清除伺服器上的 session 並關閉連線。
無參數。
get_semester_list
取得該學生所有修課學期代碼列表(例如 ["1132", "1131"])。
無參數。須先登入。
get_student_info
從 nportal 首頁抓取個人資訊(姓名、系所、學號等)。登入時自動快取。
無參數。須先登入。
get_timetable
取得指定學期的課表(二維陣列格式,第一列為星期標頭,第一欄為節次)。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼,例如 "1142"(114 年度第 2 學期) |
須先登入。
get_course_list
取得指定學期的全部課程列表,包含 course_id(6 位數字)、課程名稱、學分數。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
須先登入。回傳的 course_id 可用於其他 course tools。
get_semester_credits
計算指定學期的總學分數(浮點數加總)。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
須先登入。
get_course_syllabus
取得指定課程的授課大綱:教師、學分、時數、必選修、修課人數、課程大綱、課程進度、評分標準、教科書、諮詢管道等。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字,從 get_course_list 取得) |
須先登入。
get_course_description
取得指定課程的中文與英文簡介。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
須先登入。
get_course_files
取得指定課程在 i 學園上的檔案列表(不含影片)。回傳每個檔案的 identifier 與檔名。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
須先登入。
get_course_file_url
取得指定檔案的直接下載網址(href)。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
identifier |
string | 檔案識別碼(從 get_course_files 取得) |
須先登入。
download_course_file
下載指定檔案到本機路徑。目錄不存在時會自動建立,支援串流下載大型檔案。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
identifier |
string | 檔案識別碼 |
save_path |
string | 本機儲存路徑(含檔名) |
須先登入。
download_course_all_files
批次下載課程全部檔案到指定目錄。自動跳過已下載檔案(透過 _downloads.json 紀錄追蹤)、自動重試(最多 3 次,指數退避)。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
save_dir |
string | 本機儲存目錄路徑 |
須先登入。回傳 saved / skipped / failed 逐檔明細陣列及各計數。
get_course_videos
取得指定課程在 i 學園上的錄影列表。回傳每部影片的 identifier 與標題。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
須先登入。
get_course_video_url
取得指定影片的串流網址。支援 iStudy 內嵌播放器、local 影片檔、IP cam 三種來源。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
identifier |
string | 影片識別碼(從 get_course_videos 取得) |
須先登入。
get_bulletin_list
取得指定課程的公告列表。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
須先登入。
get_bulletin_reply
取得指定公告的回覆串(含完整回覆內容)。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
nid |
string | 公告編號(從 get_bulletin_list 回傳的 node 欄位取得) |
須先登入。
get_bulletin_reply_by_index
用索引(第幾則公告)直接查回覆,不需要手動找 nid。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
index |
integer | 公告索引(0 = 第一則) |
須先登入。
get_course_note
讀取指定課程的筆記(JSON 檔,含建立/更新時間戳)。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
notes_dir |
string | 筆記儲存目錄路徑 |
set_course_note
寫入指定課程的筆記(Markdown 格式)。自動建立目錄,保留首次建立時間。
| 參數 | 類型 | 說明 |
|---|---|---|
seme |
string | 學期代碼 |
course_id |
string | 課程代碼(6 位數字) |
content |
string | 筆記內容(支援 Markdown) |
notes_dir |
string | 筆記儲存目錄路徑 |
使用範例
在 AI 對話中直接說:
幫我查這學期的課表
查機率的大綱
機率有哪些錄影
查機率第 0 則公告的回覆
架構
├── main.py # MCP 入口(FastMCP server)
├── server/
│ ├── __init__.py
│ └── tools/ # 20 個 MCP tool(一檔一類)
│ ├── __init__.py # FastMCP + session + 匯入
│ ├── _helpers.py # _require_login, _ensure_course, _get_files_internal
│ ├── auth.py # login, logout
│ ├── info.py # get_student_info
│ ├── semester.py # get_semester_list
│ ├── timetable.py # get_timetable, get_course_list, get_semester_credits
│ ├── syllabus.py # get_course_syllabus, get_course_description
│ ├── files.py # get_course_files, get_course_file_url, download_course_file, download_course_all_files
│ ├── videos.py # get_course_videos, get_course_video_url
│ ├── bulletin.py # get_bulletin_list, get_bulletin_reply, get_bulletin_reply_by_index
│ └── notes.py # get_course_note, set_course_note
├── nportal/
│ ├── __init__.py
│ ├── scraper.py # httpx 網路爬蟲(session、login、SSO)
│ ├── session.py # SessionManager(狀態管理、課表解析)
│ ├── course.py # Course 類別(大綱、檔案、影片、公告)
│ ├── credentials.py # CredentialManager(keyring 密碼儲存)
│ └── constants.py # URL 常數
├── pyproject.toml
└── NTUT-iSchoolMate/ # 原始 NiceGUI 桌面版(參考用)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。