
Canvas API MCP
io.github.JohannsenLum由 GitHub 帳號 JohannsenLum 發布v1.1.0更新於 Nov 3, 2026
MCP server exposing the Canvas LMS REST API (1,116 endpoints) for AI assistants
概覽
把 AI 助理連接到 Canvas LMS 帳號,可讀取課程、截止日期、成績、檔案與討論,並提交作業或回覆討論。
- 可以做什麼
- 查看身分、課程清單、行事曆訂閱連結以及依時間排序的待辦事項
- 讀取成績、作業、評分規準、繳交紀錄與回饋
- 瀏覽課程模組、教學大綱、公告、Wiki 頁面與討論區
- 列出課程檔案,並從 PDF、DOCX、PPTX 與純文字擷取文字
- 提交作業、在討論區發文回覆
- 檢索 Canvas API 目錄,並呼叫該執行個體提供的任何端點
- 適用情境
- 適合想讓助理直接回答自己 Canvas 帳號相關問題的學生,例如截止日期、成績、課程內容與作業回饋,不必手動搬移資料;也適合偶爾需要在對話中提交作業或回覆討論的情況。
- 執行需求
- 以 Python 套件形式透過 uvx 在本機執行,需要 Python 3.11 以上。需設定 CANVAS_BASE_URL 指向學校的 Canvas 執行個體,並在 CANVAS_TOKEN 填入 Canvas 個人存取權杖,且學校須允許學生自行建立權杖。可選用 CANVAS_MAX_PAGES 限制分頁數量。需要能連線到該 Canvas 執行個體的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Canvas API MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
canvas-api-mcp
Never miss an assignment deadline again.
Ask your AI what's due and it reads the answer straight from Canvas:
real deadlines, real submission status, no copying anything across.
An MCP server for Canvas LMS. 16 curated tools for everyday student work, plus a gateway that reaches every endpoint your Canvas instance exposes.
📖 Documentation: mcp.johannsenlum.com/canvas-lms · install guide · tool reference · skills · compliance
[PyPI] [Python 3.11+] [License: MIT] [MCP Registry] [GitHub stars]
Personal-use software. Canvas's API Policy requires OAuth for applications used by multiple people, and Canvas OAuth cannot be implemented safely by locally installed software (no PKCE, and
client_secretcannot be shipped in a package). Use this with your own token on your own account. See Compliance.
What you can ask it
Real prompts, and which tool answers them.
You: What's due this week? Claude: (calls
whats_due): You have 3 things due: Problem Set 4 (Thu, CS3230), a discussion reply (Fri, IS4302), and the Milestone 2 report (Sun, EE2211).
You: How am I doing in my databases course, and what's on the syllabus for week 6? Claude: (calls
my_grades, thenget_syllabus, thencourse_contentfor the week 6 module): You're at 87% overall. Week 6 covers normalization and has a reading plus a lab file due Friday.
You: Summarize the PDF lecture notes for lecture 8 and pull up my submission for the essay so I can see the feedback. Claude: (calls
list_files+read_filefor the PDF, thenmy_submissionfor the essay): ...
You: Reply to the "Project teams" discussion and say I'm free after 3pm for the group meeting. Claude: (calls
post_discussion_reply✏️): Posted to the thread.
You: Has Canvas ever given me quiz statistics broken down by question, across the whole semester? Claude: (calls
search_canvas_apito find the right endpoint, thencanvas_requestto call it): ...
The last example is the point of the gateway tools: if an endpoint exists on your
Canvas instance, search_canvas_api can find it and canvas_request can call it,
even though only 16 tools are hand-curated.
Install
Prerequisites
-
Python 3.11+
-
A Canvas personal access token. Your institution must allow students to create them: check Canvas → Account → Settings → Approved Integrations for a "+ New access token" button. Full walkthrough with screenshots: mcp.johannsenlum.com/canvas-lms/install.
Note that the token expires. Since Instructure's October 2025 security update, accounts holding only student roles must set an expiry no more than 120 days out, and institutions often cap it lower (NUS allows 90). Write the date down: an expired token makes every tool return
401at once, which looks like a broken install rather than a credential that simply ran out.
Running the server
canvas-api-mcp is published on PyPI. Run it with:
Install from source (contributors / unreleased main). Not part of the
normal install path above, only needed if you want the latest unreleased
code instead of the published PyPI release:
Or run from a local clone:
Quick install (one-click)
One-click deeplinks exist for Cursor, VS Code, and LM Studio only. No other
client has a documented install-link format. These prefill the config below but
still need CANVAS_BASE_URL and CANVAS_TOKEN filled in afterward.
[Add to Cursor] [Add to VS Code] [Add to LM Studio]
All clients (manual config)
Your token stays on your machine, in your own config file. It is never transmitted anywhere except directly to your Canvas instance.
Claude Code: ~/.claude.json
Claude Desktop: claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
No one-click install exists for Claude Desktop (it installs .mcpb bundles, not
deeplinks). Copy this JSON in via Settings → Developer → Edit Config:
Cursor: ~/.cursor/mcp.json
Fallback for the button above, or if you'd rather paste it directly:
VS Code: .vscode/mcp.json
Fallback for the button above, or if you'd rather paste it directly. Note VS
Code uses a servers key, not mcpServers:
LM Studio: mcp.json (Program → Install → Edit mcp.json)
Fallback for the button above, or if you'd rather paste it directly:
Zed: settings.json
No deeplink exists for Zed. Add this under context_servers in your Zed
settings:
Windsurf: ~/.codeium/windsurf/mcp_config.json
No deeplink exists for Windsurf. It only resolves servers from its own registry, so this has to be pasted in manually via Windsurf Settings → MCP Servers → Edit raw config:
Tools
✏️ writes to Canvas. That's 3 write tools total: submit_assignment,
post_discussion_reply, and canvas_request when called with a non-GET method
(GET calls through canvas_request are read-only).
search_canvas_api + canvas_request reach all ~1,116 endpoints your instance
exposes. What they may do is decided by Canvas from your token's permissions: a
teacher token unlocks educator endpoints with no change to this server.
Prompts
week_ahead, study_pack, grade_check.
Resources
canvas://me, canvas://courses, canvas://api/catalog.
Skills
If your client supports the skills convention:
Other institutions
Works with any Canvas instance: set CANVAS_BASE_URL. The catalog of ~1,116
endpoints ships inside the package at
canvas_api_mcp/data/catalog.json. To match your deployment's exact feature
set, regenerate it:
Compliance
- Academic integrity.
submit_assignmentcan submit anything, including AI-generated work. Submitting work that is not your own breaches the academic integrity rules of essentially every institution, and Canvas's API Policy explicitly prohibits use that violates them. That is on you. - Rate limiting. The client throttles against Canvas's published quota. Do not remove it: overloading the API is prohibited.
- Course material.
read_filefetches materials for your own study. Do not redistribute them. - Your token is password-equivalent. It can read your grades and submit work as you. Set an expiry. Never commit it.
- Personal-use scope. Phase 1 targets a single student using their own token. There are no curated educator tools; Canvas's OAuth flow has no PKCE, so this locally-installed server cannot implement the multi-user OAuth that Canvas's API Policy requires for anything broader. Do not repackage this as a multi-tenant service.
Development
Environment variables: CANVAS_BASE_URL, CANVAS_TOKEN, optional
CANVAS_MAX_PAGES (default 10) and CANVAS_TIMEOUT (seconds, default 30).
See env.template.
Contributing
Issues and pull requests are welcome: see CONTRIBUTING.md for setup, the architectural rules worth knowing before you change anything, and the bar for adding a new curated tool.
Found a security problem? Do not open a public issue. See SECURITY.md for private reporting, particularly important here, since this project handles password-equivalent Canvas tokens.
Changes are recorded in CHANGELOG.md.
Licence
MIT © 2026 Johannsen Lum.
Use it, change it, redistribute it, build something commercial on it: the only condition is that you keep the copyright notice and licence text. It comes with no warranty of any kind.
Contributions are accepted under the same licence.
來源:README.md,提交 bd7ec03
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分