canvas-mcp
Read-only integration with the Canvas LMS API using a personal access token. Provides tools to query courses, assignments and upcoming deadlines, announcements, modules and completion state, course files, wiki pages, discussion topics and replies, grade summaries, calendar events, and real submission status. Also computes a local per-course grade-progress dashboard (floor/ceiling/needed-for-target) from a confirmed grading scheme, with tools to preview, apply, and undo natural-language grading changes. Handles pagination and returns slimmed payloads (or raw Canvas JSON on request).
Used as the SMTP provider for the optional daily email report script, which diffs the day's Canvas state against the last sent report and emails only changes (new grades, files, announcements, progress) plus upcoming deadlines. Gmail requires an App Password in the notify.env configuration.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
canvas-mcp
An MCP server for Canvas LMS that is read-only against Canvas and only ever writes local state. It lets Claude Desktop / Claude Code query your courses, assignments, deadlines, announcements, modules, files, pages, discussions, grades and calendar through your own Canvas API token, and track a per-course grade-progress dashboard computed locally.
Read-only against Canvas by design: the HTTP layer only exposes
GET. There is no code path that can create, modify or delete anything in Canvas. The grade-progress feature writes only to the localdata/directory.Handles Canvas pagination (
Link: rel="next") — list tools always return all pages.Slims Canvas's large JSON payloads down to the fields a model needs; pass
raw=trueto any tool to get the untouched Canvas response.All timestamps are ISO 8601, with an added
*_localstring in your local time (CANVAS_TZ, default America/Toronto).
Security
Your Canvas access token inherits ALL permissions of your account — including write access. The read-only guarantee comes from this server's design (it never issues anything but GET), not from the token itself. Treat the token like a password:
Never commit it. This repo's
.gitignoreexcludesToken.txt,.env,*.token,notify.env,scripts/local_env.cmdanddata/(your grades), but stay vigilant.Prefer
CANVAS_TOKEN_FILEover pasting the token into config files.Revoke the token in Canvas (Account → Settings → Approved Integrations) if it ever leaks.
Related MCP server: lms-cli
Setup
Requires Python 3.11+ and uv.
git clone <this repo>
cd canvas-mcp
uv syncGenerate a Canvas access token: in Canvas, go to Account → Settings → Approved Integrations → New Access Token.
Configuration (environment variables only)
Variable | Required | Meaning |
| yes | Your Canvas instance, e.g. |
| one of the two | The access token itself |
| one of the two | Path to a file containing the token (whitespace is stripped) |
| no | IANA timezone for |
The server exits at startup with a clear error if the base URL or token is missing.
Run
CANVAS_BASE_URL=https://q.utoronto.ca CANVAS_TOKEN_FILE=/path/to/Token.txt uv run canvas-mcpDebug interactively with the MCP inspector:
CANVAS_BASE_URL=https://q.utoronto.ca CANVAS_TOKEN_FILE=/path/to/Token.txt \
npx @modelcontextprotocol/inspector uv run canvas-mcpClaude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"canvas": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/canvas-mcp", "canvas-mcp"],
"env": {
"CANVAS_BASE_URL": "https://q.utoronto.ca",
"CANVAS_TOKEN_FILE": "/absolute/path/to/Token.txt"
}
}
}
}Or with the token inline (less recommended): replace CANVAS_TOKEN_FILE with "CANVAS_TOKEN": "<your token>".
Claude Code
claude mcp add canvas \
--env CANVAS_BASE_URL=https://q.utoronto.ca \
--env CANVAS_TOKEN_FILE=/absolute/path/to/Token.txt \
-- uv run --directory /absolute/path/to/canvas-mcp canvas-mcpTools
Tool | Description |
| Verify the token — returns your Canvas profile |
| Active courses (id, name, course_code, term) |
| Assignments; bucket: upcoming / past / undated / unsubmitted / all |
| Deadlines across all active courses, sorted by due date |
| Announcements, HTML converted to plain text |
| Modules and their items with completion state |
| Course files with size, content type, download url |
| Wiki page body as plain text |
| Discussion topics and replies |
| Your grade summary for a course |
| Calendar + assignment events for the next N days |
| Real submission status computed in code (not module progress) |
| Pre-computed grade progress (floor/ceiling/needed-for-target) |
| Preview a natural-language grading change (stages a patch) |
| Apply a previewed change — only after the user confirms |
| Undo the most recent confirmed grading change |
Grade progress (local state)
Canvas rarely stores a clean weighting, so weights come from a confirmed grading.json per course. The flow — all scores computed in code, the LLM only drafts structure / parses instructions:
# 1. extract a draft (assignment-group weights, else syllabus text/PDF via a local LLM)
uv run python scripts/extract_grading.py [--course-id N]
# 2. review the draft, then confirm it into grading.json
uv run python scripts/confirm_grading.py --course-id N
# 3. refresh progress + render the dashboard (no LLM, for cron)
uv run python scripts/update_progress.py # -> data/dashboard.html
# later: amend in natural language (parsed to a validated patch, previewed, then written)
uv run python scripts/amend_grading.py --course-id N "期中考了 21/25"
uv run python scripts/amend_grading.py --course-id N --undoThe local LLM is an OpenAI-compatible endpoint (LM Studio by default) configured via LLM_BASE_URL / LLM_MODEL. It never computes grades and never writes files.
Daily email report (optional, Windows)
scripts/daily_report.py diffs today's state against the last sent report and emails only what changed (new grades, new files, new announcements, progress) plus the next 7 days of deadlines. Announcement summaries use the local LLM if available and fall back to the first 150 characters otherwise.
Copy
notify.env.exampleto a file outside the repo (default location:notify.envnext to the repo folder, or pointNOTIFY_ENVat it) and fill in SMTP settings. For Gmail use an App Password.Copy
scripts/local_env.cmd.exampletoscripts/local_env.cmd(git-ignored) and set your Canvas URL, token file andNOTIFY_ENVpaths.Try it:
uv run python scripts/daily_report.py --dry-run --no-llmRegister the scheduled task (daily 07:45):
powershell -ExecutionPolicy Bypass -File scripts\install_schedule.ps1. Remove it withscripts\uninstall_schedule.ps1.
Every tool accepts raw=true to return Canvas's original JSON. Errors (401/403/404…) come back as readable {"error": ...} objects instead of exceptions; 429 is retried once.
Tests
uv run pytestTests mock the Canvas API with respx — no network or token needed.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage your Canvas coursework with quick access to courses, assignments, and grades. Track upcomin…
Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.
Read-only access to your tabletop campaigns: codex, sessions, and session notes.
Unofficial NTNU course data: search, timetables, grades, course info, and exam logistics.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceProvides MCP clients with structured local access to Canvas LMS data—such as assignments, rubrics, module readings, feedback, and deadlines—for academic planning via stdio, using an authenticated browser session instead of an API token.-
- AlicenseNot gradedqualityAmaintenanceEnables natural-language queries across multiple schools' Canvas and Blackboard accounts for courses, notifications, assignments, grades, feedback, and schedules, with read-only access and local todo/calendar export.9MIT
- AlicenseNot gradedqualityAmaintenanceEnables students, instructors, and account administrators to interact with Canvas LMS APIs for courses, assignments, submissions, grades, discussions, files, users, reports, and account administration workflows.21 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables students, instructors, and account administrators to interact with Canvas LMS through its API, covering courses, assignments, submissions, grades, modules, discussions, files, users, and institutional reports. Supports both local stdio and streamable HTTP transports with robust retries, pagination, and error handling.21 npmMIT