canvas-mcp
Read-only cache and MCP interface for Canvas LMS: syncs courses, grades, assignment groups and rubrics, submission comments, modules, pages, announcements, calendar events, missing work, and course files, then provides tools for upcoming/missing work, grade projection, exams, feedback, syllabus, modules, files, and hybrid search.
Sends optional push notifications via ntfy for a morning digest of work due in 48 hours, newly missing work, letter-grade cutoff crossings, and exam reminders.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@canvas-mcp what's due this week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
canvas-mcp
A read-only cache of your Canvas LMS courses, served to AI assistants over the Model Context Protocol. Point Claude, ChatGPT or any MCP client at it and ask "what's due this week?", "what do I need on the final for a B?" or "find the lecture on molecular orbitals".
It is plain Python (standard library plus one vendored, hash-pinned wheel), built to run as a small Kubernetes pod but usable anywhere.
What it does
Syncs on a schedule (default 30 minutes) with your personal Canvas API token: courses, grades, assignment groups and rubrics, submission comments, modules, pages, announcements, calendar events, missing work and course files. Hidden Files/Pages tabs are worked around by following module items and links in the syllabus, pages and assignments. Every request is a
GET; the token is sent only to your Canvas host and never to file-download redirects.Keeps an archive: courses that leave your active list at the end of a term stay in the cache, with their files.
Serves MCP tools that read only the cache, never Canvas: upcoming and missing work, grades and grade projection, exams, calendar, feedback, syllabus, pages, modules, files and search. Nothing can submit, message or change anything in Canvas.
Extracts and indexes documents: text from PDFs (via
pypdf) and text files, searchable by keyword and by meaning (hybrid search with a small static embedding model, no GPU or model server).Optionally notifies through ntfy, only about what Canvas does not tell you itself: a morning digest of work due in 48 hours, newly missing work, letter-grade cutoff crossings and exam reminders.
Related MCP server: Canvas LMS MCP Server
Tools
Tool | Purpose |
| Last sync time and whether the token still works |
| Credit courses and current scores |
| Work due in the next N days, with state, platform and completion |
| Work Canvas marks missing |
| Scores per course or per assignment |
| Average needed on remaining work per letter cutoff |
| Announcements |
| Pages, files, assignments, grades and announcements changed recently |
| Course structure, filterable by module or week |
| Page and syllabus text with resolved links |
| Instructions, rubric with your scores, feedback, submission status |
| Recent instructor comments and rubric notes |
| Exams (from the calendar, assignments and syllabus text) and one timeline |
| Files, as documents or extracted text by page |
| Hybrid keyword + semantic search with page citations |
Every result carries synced_at and is returned both as JSON text and as MCP
structuredContent.
Facts, inferences and unknowns
Tools keep three things apart, so an agent does not present a guess as fact:
Assignment state is graded, graded but hidden, submitted and ungraded, missing, past due with unknown status, or upcoming. Work done outside Canvas (Gradescope, PrairieLearn, a Google Form) has
completion: "unknown", never "nothing to do".Grade projections separate graded, remaining and unknown work. They apply Canvas drop rules and accept syllabus policy that Canvas lacks (
group_weights,group_rules,future_work), and reportprojection_completeonly when nothing is unknown.Exam dates read from syllabus text are marked
confidence: "syllabus text"with their sources. The year comes from the text or the page title before the term, and stated weekdays are checked.coveragesays what was searched: no exams found does not mean no exams.
Running it
# 1. Sync (needs a Canvas token in $CANVAS_CREDENTIALS/token)
CANVAS_BASE_URL=https://canvas.example.edu \
CANVAS_CREDENTIALS=./credentials CANVAS_DATA=./data CANVAS_DEPS=./vendor \
python app/canvas_sync.py once
# 2. Serve MCP over stdio for a local client
CANVAS_DATA=./data python app/canvas_mcp.pyFor Claude Code: claude mcp add canvas -- python /path/to/app/canvas_mcp.py
(with CANVAS_DATA set). python app/canvas_sync.py serve keeps syncing and
exposes Prometheus metrics on port 9464 (/metrics, /healthz).
Remote clients (ChatGPT)
python app/canvas_mcp.py serve-http serves streamable HTTP on POST /mcp
(port CANVAS_MCP_PORT, default 8080). It is meant to sit behind
Cloudflare Access
with managed OAuth. Every request must carry an Access JWT, which the server
verifies itself (RS256 against the team's keys, issuer, expiry, allowed
emails). Set CANVAS_ACCESS_TEAM (e.g. yourteam.cloudflareaccess.com) and
CANVAS_ACCESS_EMAILS, and optionally CANVAS_ACCESS_AUD.
For ChatGPT, allow both of its OAuth callbacks in the Access app's dynamic
client registration: https://chatgpt.com/connector_platform_oauth_redirect
and https://chatgpt.com/connector/oauth/*. Access does not advertise RFC 9207
issuer identification, so ChatGPT uses the per-connection one.
Configuration
Variable | Default | Meaning |
|
| Your Canvas host |
|
| Directory with |
|
| Cache directory |
|
| Seconds between syncs |
|
| Download limits |
|
| Directory with |
|
| Embedding model, downloaded once and hash-checked |
| unset, | ntfy topic URL and token; notifications are off without a URL |
Defaults lean toward UW–Madison (base URL, letter scale A 93 / AB 88 / B 83 /
BC 78 / C 70, subject aliases such as CS 354 → COMPSCI). Pass targets to
project_grade for other scales.
Student API tokens may be short-lived. With CANVAS_CREDENTIALS/expires set,
the metrics expose the expiry, so you can alert before it lapses. The token
file is re-read every cycle, so rotating it needs no restart.
Supply chain
Runtime dependencies are the Python standard library plus
vendor/pypdf-7.1.0-py3-none-any.whl. Its SHA-256 is pinned invendor/manifest.jsonand checked before import.The embedding model (
minishlab/potion-base-8M, MIT) is fetched from a fixed revision and refused if either file's SHA-256 differs (FILESinapp/canvas_semantic.py). No neural network runs at query time: a text's vector is the normalized mean of its WordPiece tokens' rows.
Development
python -m unittest discover -s tests -vThe tests are offline: Canvas, ntfy, Cloudflare Access and the embedding model are all faked. A tiny generated model checks the tokenizer and index, and a throwaway RSA key checks JWT verification.
License
MIT
Available Tools
18 toolscanvas_statusA
When Canvas data was last synced and whether the API token still works.
Inputs: no named parameters.
get_assignmentA
One assignment in full: instructions, links, rubric, dates, attempts, whether it needs a Canvas submission, and your submission status.
Inputs: course (required), assignment (required).
get_calendarA
One timeline for the next N days: Canvas calendar events, assignment deadlines (with submission status) and exams found in syllabus text.
Inputs: days, course.
get_course_modulesA
A course's modules and their items, in order. Filter with module (name or week number, e.g. '14'); detail='summary' lists modules with item counts only, to save context.
Inputs: course (required), detail, module.
get_exam_scheduleA
Upcoming exams across courses (or one course): from the Canvas calendar and exam assignments (confidence 'canvas') and from dates in syllabi, syllabus PDFs and course pages (confidence 'syllabus text': confirm before relying on them). Exams carry kind (exam or makeup exam), start_at/end_at in Central time when the text gives a time, and structured sources (file_id, page_number, url). coverage says what was searched per course: no exams found is not no exams.
Inputs: course, include_past.
get_feedbackA
Instructor comments and rubric notes on your submissions from the last N days, newest first. get_assignment shows one assignment's feedback with per-criterion scores.
Inputs: days, course.
get_gradesB
Canvas current scores for every course, or graded work for one course.
Inputs: course, include_other.
get_missing_assignmentsC
Assignments Canvas marks as missing.
Inputs: no named parameters.
get_pageB
The text of a course page by its title or URL slug (from get_course_modules).
Inputs: page (required), course (required).
get_recent_announcementsC
Announcements posted in the last N days.
Inputs: days, course, include_other.
get_recent_changesA
What changed in the last N days: pages and files updated, assignments posted or edited, grades entered and announcements. Catches updates instructors post on pages instead of announcements. Each event has a stable id; poll with since (an ISO timestamp) instead of days.
Inputs: days, since, course, include_other.
get_syllabusA
A course's syllabus text with its links. Linked Canvas files and files named like a syllabus come back with file ids for read_course_file.
Inputs: course (required).
get_upcoming_assignmentsA
Assignments due in the next N days. Each has state (graded, graded_hidden, submitted_ungraded, missing, past_due_unknown, upcoming), requires_student_action (true/false/null = unknown), requires_canvas_submission, submission_platform (canvas, gradescope, prairielearn, google form, ...) and completion (done/not_done/unknown). Work outside Canvas has completion 'unknown': do not drop it from to-do lists.
Inputs: days, course, include_other.
list_course_filesC
Files in a course (slides, PDFs, notes), optionally filtered by name or folder.
Inputs: course (required), query.
list_coursesB
Credit courses in the cache with their current Canvas score; archived courses are from past terms.
Inputs: include_other.
project_gradeA
Current percentage and the average needed to reach each letter cutoff (UW scale by default). Work is graded, remaining, or unknown (done or past due but score hidden/ungraded/missing; never counted as remaining). Canvas drop rules apply; weighted groups with nothing posted count as remaining. Supply syllabus policy Canvas lacks with future_work, group_weights and group_rules; duplicates of Canvas work are rejected. Present letters as definitive only when projection_complete is true; with unknown scores, needed_average_on_unscored_percent replaces needed_average_on_remaining_percent.
Inputs: course (required), targets, future_work, group_rules, +1 more.
read_course_fileA
Contents of a cached course file by id: the document itself (PDFs up to 10 MiB), or with as_text its extracted text per page, which also works for larger PDFs. Narrow long documents with first_page/last_page.
Inputs: file_id (required), as_text, last_page, first_page.
search_course_materialsA
Search syllabi, pages, assignment instructions, announcements, module items, file names and the text inside cached PDFs; hits cite file_id and page_number. mode=hybrid (default) fuses keyword matches (every term present) with semantic matches by meaning, so 'how electrons bond in molecules' finds molecular-orbital lectures; keyword or semantic alone are available. Each hit says how it matched; semantic hits carry a confidence (high/medium/low), and queries made only of words the model does not know return no semantic hits. Identical text in several files is one hit listing the others in also_in.
Inputs: query (required), mode, limit, course, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools target distinct resources (courses, grades, modules, pages, files, syllabus, feedback, exams), and descriptions actively disambiguate near-neighbors like get_recent_changes vs get_recent_announcements or get_assignment vs get_missing_assignments. The main overlap is among the time-window tools (get_upcoming_assignments, get_calendar, get_exam_schedule, get_missing_assignments), which a careful agent can separate but could occasionally misselect.
Strong, predictable snake_case verb_noun pattern throughout (list_courses, get_assignment, read_course_file, search_course_materials). Only minor deviations break the pattern: canvas_status (noun-only) and project_grade (verb without a clear get_ prefix).
At 18 tools the set is on the high end of the comfortable band, but each tool maps to a distinct Canvas surface (courses, assignments, grades, files, pages, modules, exams, calendar, search, status). No tool appears redundant filler, so the count is justified for an LMS domain.
Coverage is broad for a read-only student workflow: courses, assignments, grades and projections, modules, pages, syllabus, files, cross-material search, exams, calendar, feedback, and sync status. The notable gap is the absence of any write/submission actions (submit assignment, post, mark done), so lifecycle coverage is complete for reading but not for acting.
Maintenance
Related MCP Connectors
Read-only access to Epivo's live course catalogue for AI agents.
Search university course materials, your flashcards, quizzes, streak and quota. All tools read-only.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Read-only access to a company's ERP for Claude, ChatGPT and Gemini, with OAuth and an audit trail.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI systems to interact with Canvas Learning Management System data, allowing users to access courses, assignments, quizzes, planner items, files, and syllabi through natural language queries.2241 PyPI7MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access Canvas LMS course content, including assignments, modules, announcements, and files, to help students manage their coursework.ISC
- AlicenseAqualityDmaintenanceProvides read-only access to Canvas LMS, enabling users to view active courses, grades, and upcoming assignments through natural language queries.2MIT
- AlicenseAqualityBmaintenanceEnables students to ask an AI assistant about their Canvas LMS data, including assignments, grades, missing submissions, discussions, and upcoming items, while keeping access read-only and private.43MIT