canvas-mcp
Provides read-only access to Canvas LMS through the user's Firefox session cookie or a personal access token, enabling agents to list courses, check due assignments, inspect course contents, mirror course files locally, query raw Canvas API GET endpoints, and read the Canvas calendar feed.
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
Read-only Canvas access for one student, as a CLI and an MCP server.
Description
Canvas has a full REST API, but some schools disable the personal access
tokens that normally unlock it. canvas-mcp reads the canvas_session cookie
that Firefox already holds and uses it for GET requests only. An agent can
then answer questions about coursework: what is due, what is still owed, what
a course holds, and where its files are on the disk.
One core, canvas_mcp.Canvas, does the work. The canvas CLI and the
canvas-mcp stdio server each register the same operations and add no logic.
The client cannot write to Canvas. Its authenticated transport refuses any
request that is not a GET over https to the configured host.
Related MCP server: Canvas LMS MCP Server
Getting Started
Dependencies
Linux and Firefox, with Canvas open in a normal (non-private) window.
Firefox session restore, so that
browser.startup.pageis3. Firefox only saves session cookies to disk with this setting.uv and Python 3.11 or later.
Installing
git clone https://github.com/ramirc0/canvas-mcp
cd canvas-mcp
uv syncSet the Canvas host name. It MUST match the host exactly.
export CANVAS_HOST=school.instructure.comTwo optional variables:
CANVAS_TOKEN: a personal access token. It takes precedence over the cookie.CANVAS_ICS_URL: the calendar feed URL from Canvas, under Calendar, Calendar Feed. It backscanvas calendar. Treat it as a password.
Executing program
From the command line:
uv run canvas courses
uv run canvas due --until 2026-12-31
uv run canvas mirror 101
uv run canvas raw '/api/v1/users/self'As an MCP server, for example in a .mcp.json:
{
"mcpServers": {
"canvas": {
"command": "uv",
"args": ["run", "--project", "/path/to/canvas-mcp", "canvas-mcp"],
"env": { "CANVAS_HOST": "school.instructure.com" }
}
}
}skill/SKILL.md tells an agent which CLI command answers which question.
Course files are mirrored to ~/Canvas/<course id>-<code>/. They are untrusted
input. Do not execute anything from that tree.
Help
uv run canvas --help
uv run canvas due --helpStaleSession: log into Canvas in Firefox again.MissingCookie: open Canvas in a non-private Firefox window and wait about 15 seconds for Firefox to save its session. The message lists the profiles searched and whether session restore is on.NotPermitted: Canvas denies your account that resource.The mirror skips a file when its module requires you to view it. Open it in Canvas once, then run the mirror again.
Authors
Christian Ramirez
License
This project is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
yt-dlp, for the idea of reading cookies from the browser at call time.
lucanardinocchi/canvas-mcp, a token-based Canvas MCP server that showed which questions students ask.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only access to a student's recorded classes: transcripts, notes, slides and concept map.
Read your plat.plus courses, tasks, course pages, sessions, files and messages. Read-only.
Read-only access to Epivo's live course catalogue for AI agents.
Read Corsizio events, attendees and registrations, including payment status. Read-only.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides read-only access to Canvas LMS data including courses, assignments, grades, and deadlines through 23 structured tools.23-
- AlicenseAqualityDmaintenanceProvides read-only access to Canvas LMS, enabling users to view active courses, grades, and upcoming assignments through natural language queries.2MIT
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to Canvas LMS data, enabling an LLM to query courses, assignments, grades, submissions, announcements, discussions, modules, pages, and files via the Canvas REST API.-
- AlicenseAqualityBmaintenanceEnables AI apps to read a student's courses, due dates, grades, missing work, announcements, modules, discussions, syllabus, and calendar events in a read-only way. It cannot submit, edit, or delete anything, and credentials go only to the user's own school.21120 npmMIT