An MCP server for Claude, Cursor, Codex and other assistants. Sign in once with your school's normal login, then ask about deadlines, lecture slides, assignments and grades.
给 Claude、Cursor、Codex 等 AI 用的 MCP 服务器。用学校的正常登录方式登录一次,之后就能直接问 AI 截止日期、讲义、作业要求和成绩。
One command sets everything up:
一条命令装好所有东西:
npx -y https://github.com/CorCvusRamboChen/canvas-session-mcp/archive/refs/heads/main.tar.gz setup
Most Canvas integrations need a personal access token. Many universities no longer let students create one.
现有的 Canvas 工具基本都要个人 Access Token,但很多大学已经不让学生自己生成了。
The Canvas website calls its own API with your session. This tool does the same, from a browser profile on your computer.
Canvas 网页版本身就是用你的登录会话调 API 的,这个工具也这么做,登录态保存在你电脑上的浏览器 profile 里。
Only GET requests: it cannot submit, post or change anything. Nothing leaves your machine except requests to your school's Canvas.
只发 GET 请求,不会提交、发帖或修改任何东西;除了访问学校的 Canvas,不会把数据发到任何地方。
Based on a real conversation; course codes and IDs changed.
根据一次真实对话整理,课程代码和 id 已替换。
12 files found across modules, announcements and assignment pages; 8 unique PDFs saved into Canvas/MATH1012/…, questions and solutions. Byte-identical re-uploads were kept once. Running it again took 2 s.
从模块、公告、作业页面里找到 12 个文件,存下 8 份不重复的 PDF 到 Canvas/MATH1012/…,题目和答案都有。字节完全相同的重复上传只存一份,再跑一次只要 2 秒。
Overdue and missing work next to what's coming up, from every course at once.
所有课程里逾期没交的和接下来要交的,一次看全。
Instructions, the rubric and the linked brief and sample-essay PDFs, read together and turned into one checklist.
作业说明、评分标准,以及链接的 brief 和 sample essay PDF 一起读完,整理成一张清单。
The assignment PDF is read as text, so column order, banned keywords and formatting rules can be checked line by line.
作业说明 PDF 转成文字,列的顺序、禁止使用的语法、格式规范都能逐条检查。
You need Node.js 20+ and Chrome or Edge.
需要 Node.js 20+,以及 Chrome 或 Edge。
npx -y https://github.com/CorCvusRamboChen/canvas-session-mcp/archive/refs/heads/main.tar.gz setup
Canvas address (e.g. https://canvas.lms.unimelb.edu.au) · where to save course files (default Documents/Canvas, any folder works) · sign in in the window that opens. SSO and MFA work as usual; the window closes by itself.
Canvas 地址(如 https://canvas.lms.unimelb.edu.au)· 课件存到哪里(默认 文档/Canvas,可以换成任何文件夹)· 在弹出的窗口里登录。SSO、MFA 照常,登录完窗口自动关闭。
Setup finds Claude Desktop, Claude Code, Cursor, Windsurf and Codex and asks before connecting each one. Existing settings are kept and backed up. Restart the app and ask “What's due this week on Canvas?”
setup 会找到 Claude Desktop、Claude Code、Cursor、Windsurf、Codex,每个都先问你再接入。原有配置会保留并备份。重启应用后问一句:“Canvas 上这周有什么要交?”
claude mcp add canvas -- npx -y https://github.com/CorCvusRamboChen/canvas-session-mcp/archive/refs/heads/main.tar.gz{
"mcpServers": {
"canvas": {
"command": "npx",
"args": ["-y", "https://github.com/CorCvusRamboChen/canvas-session-mcp/archive/refs/heads/main.tar.gz"]
}
}
}
On Windows: "command": "cmd", "args": ["/c", "npx", "-y", "…"]. Run … login --url https://your-canvas once first.
Windows 上改成 "command": "cmd"、"args": ["/c", "npx", "-y", "…"]。先运行一次 … login --url https://你的canvas。
[mcp_servers.canvas]
command = "npx"
args = ["-y", "https://github.com/CorCvusRamboChen/canvas-session-mcp/archive/refs/heads/main.tar.gz"]On a real university Canvas with Okta SSO behind a Cloudflare bot check.
在一所大学的真实 Canvas 上测得(Okta SSO,前面有 Cloudflare 人机验证)。
| Normal use平时使用 | Saved cookies go straight to Canvas, no browser直接带保存的 cookie 访问,不开浏览器 | 0.7 s |
| Cookie lifetimecookie 能用多久 | Checked every 15 min with no renewal: still accepted after 2 h 6 min (longer idle gaps not measured yet)每 15 分钟检查一次、全程不续期,2 小时 6 分钟后仍然有效(长时间完全闲置还没测) | ≥ 2 h |
| Canvas session expiredCanvas 会话过期 | A sign-in window opens at your SSO, finishes without typing, and closes弹出窗口去学校 SSO,什么都不用输就自动完成并关闭 | 4–10 s |
| SSO expired tooSSO 也过期 | The window waits for you to sign in, as any browser would窗口留着等你登录,和平时用浏览器一样 | — |
Bot checks are never automated or bypassed. Where one blocks a hidden renewal, a visible window is used instead. Set CANVAS_MCP_RENEW=hidden if you never want a pop-up.
本工具从不自动完成或绕过任何人机验证。如果后台续期被人机验证拦下,就改用可见窗口。完全不想要弹窗的话,设置 CANVAS_MCP_RENEW=hidden。
automated tests against a fake Canvas and a real MCP client, including a check that only GET requests are ever sent
个自动测试:假的 Canvas 服务器加真实的 MCP 客户端,其中一项专门确认只会发 GET 请求
live checks on a real account across 13 courses: modules, files, assignments, pages, announcements, grades, inbox, calendar, PDF to text
项真机检查:真实账号、13 门课,覆盖模块、文件、作业、页面、公告、成绩、站内信、日历和 PDF 转文字
problems found by live testing and fixed: attachments on announcements, last term counted as current, timetable noise, duplicate uploads
个真机测试中发现并修好的问题:公告附件漏抓、上学期的课算成当前、课表事件刷屏、重复上传存两份
| Tool | 工具 | What it does | 作用 |
|---|---|---|---|
canvas_upcoming | Everything due soon across all courses, with submission status所有课近期要交的东西,以及是否已提交 | ||
canvas_list_courses | Your courses and terms课程列表 | ||
canvas_get_assignment | Full instructions, rubric, your submission and score作业完整要求、评分标准、提交状态和分数 | ||
canvas_read_file | Lecture slides, PDFs and Word documents as text讲义、PDF、Word 转成文字 | ||
canvas_save_course_files | Save a whole course into your folder; unchanged files skipped, duplicates kept once把整门课存到你的文件夹,没变的跳过,重复的只存一份 | ||
canvas_list_modules | Course structure: modules, pages, files课程模块结构 | ||
canvas_list_announcements | Recent announcements最近的公告 | ||
canvas_grades | Grades, scores and teacher comments成绩和老师评语 | ||
canvas_get_discussion | Discussion threads and replies讨论区帖子和回复 | ||
canvas_inbox | Canvas Inbox messagesCanvas 站内信 | ||
canvas_calendar | Classes, exams, consultation times课程、考试、答疑时间 | ||
canvas_api_get | Any other Canvas API endpoint, read-only其他任意 Canvas API(只读) |
Plus canvas_list_assignments, canvas_get_page, canvas_list_files, canvas_list_discussions and canvas_whoami.
另外还有 canvas_list_assignments、canvas_get_page、canvas_list_files、canvas_list_discussions、canvas_whoami。
Opens Chrome/Edge with its own profile and waits until Canvas recognises you. Remembers your SSO entry point.
用专用 profile 打开 Chrome/Edge,等 Canvas 认出你,并记下你学校的 SSO 入口。
Session cookies are kept locally. If Canvas ever rejects them, a browser renews the session through your SSO — hidden when possible, otherwise a window that closes itself.
会话 cookie 保存在本机。Canvas 不认了就通过学校 SSO 自动续期:能在后台完成就后台完成,不行就弹一个会自己关闭的窗口。
Requests go straight to /api/v1 with your session cookie, just like the Canvas website does.
带着会话 cookie 直接请求 /api/v1,跟 Canvas 网页版一样。