canvas-mcp
Provides tools for interacting with Canvas LMS, enabling users to list active courses, upcoming assignments, and recent announcements.
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 List my assignments due in the next 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
An MCP server that exposes Canvas LMS data (courses, assignments, announcements) to any MCP-compatible client (Claude Desktop, Claude Code, etc.).
This repository ships with no credentials. There is no Canvas token and no email address anywhere in it. You supply your own token in a local
.envfile that is git-ignored and never leaves your machine. See Where your token goes.
Prerequisites
uv (Python package manager)
A Canvas LMS account with an API token
Related MCP server: Canvas MCP
Setup
1. Generate a Canvas API token
Log in to your school's Canvas site (for example
https://canvas.fen.uchile.cl)Go to Account → Settings → Approved Integrations
Click + New Access Token, give it a name, and copy the token
2. Configure the environment
Where your token goes: in a file named exactly .env, in the root of this
project folder (right next to main.py). That file is listed in .gitignore,
so git will never commit or push it.
Copy the template:
cp .env.example .envThen open .env and fill in the blanks:
# Your Canvas instance URL -- change this to your school's Canvas address
CANVAS_URL=https://canvas.fen.uchile.cl
# Paste the token from step 1 here
CANVAS_API_TOKEN=
# Optional second account (use account="udd" in the tools). Leave blank if unused.
CANVAS_UDD_URL=
CANVAS_UDD_TOKEN=Only CANVAS_URL and CANVAS_API_TOKEN are required. The CANVAS_UDD_* pair is
for an optional second Canvas account; leave both blank if you only have one.
Never commit
.env, never paste your token into a chat, and never put it in a file that gets shared. It grants full access to your Canvas account. If it leaks, delete the token in Canvas (Account -> Settings -> Approved Integrations) and generate a new one.
3. Install dependencies
uv sync4. Run the server manually (optional test)
uv run python main.pyThe server communicates over stdio, so it won't print anything until an MCP client connects.
Connecting to Claude Desktop
Add the following to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"canvas": {
"command": "uv",
"args": ["run", "--project", "/absolute/path/to/canvas-mcp", "python", "main.py"]
}
}
}Replace /absolute/path/to/canvas-mcp with the real path to this folder. Use
forward slashes / even on Windows.
No token goes in this file. It is read from your
.env(see Where your token goes) --python-dotenvloads it automatically.
Connecting to Claude Code
Add the MCP server in your Claude Code settings or run:
claude mcp add canvas -- uv run --project /absolute/path/to/canvas-mcp python main.pyAvailable Tools
Tool | Description |
| Lists all active enrolled courses |
| Lists upcoming assignments sorted by due date |
| Lists recent announcements per course |
Project structure
canvas-mcp/
├── main.py # MCP server
├── .env # Your token lives here (git-ignored, never pushed)
├── .env.example # Template
├── pyproject.toml # Project metadata & dependencies
└── uv.lock # Locked dependency versionsAvailable Tools
10 toolsget_announcementsA
List recent announcements for all active enrolled courses.
Inputs: account. Returns: result
get_assignmentsC
List upcoming assignments across all active enrolled courses, sorted by due date.
Args: days_ahead: Number of days ahead to look for assignments (default: 30).
Inputs: account, days_ahead. Returns: result
get_course_discussionsA
List discussion topics (not announcements) for a course.
Args: course_id: The numeric Canvas course ID (get it from get_courses).
Inputs: course_id (required), account. Returns: result
get_course_filesA
List files in a Canvas course, optionally scoped to a folder path.
Args: course_id: The numeric Canvas course ID (get it from get_courses). folder_path: Subfolder path to list (e.g. "lecture slides"). Leave empty for root.
Inputs: course_id (required), account, folder_path. Returns: result
get_course_gradesC
Show the current user's grades for all assignments in a course.
Args: course_id: The numeric Canvas course ID (get it from get_courses).
Inputs: course_id (required), account. Returns: result
get_course_modulesA
List all modules and their items for a course.
Args: course_id: The numeric Canvas course ID (get it from get_courses).
Inputs: course_id (required), account. Returns: result
get_course_pagesB
List wiki pages in a course, or fetch the body of a specific page.
Args: course_id: The numeric Canvas course ID (get it from get_courses). page_url: The URL slug of a specific page to read (e.g. "syllabus"). Leave empty to list all pages.
Inputs: course_id (required), account, page_url. Returns: result
get_course_peopleA
List people enrolled in a course, optionally filtered by role.
Args: course_id: The numeric Canvas course ID (get it from get_courses). role: Filter by enrollment role. One of: StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, DesignerEnrollment. Leave empty for all.
Inputs: course_id (required), role, account. Returns: result
get_coursesB
List all active enrolled courses from Canvas LMS.
Inputs: account. Returns: result
read_course_fileA
Download and read the text content of a file from a Canvas course. Supports PDF (with OCR fallback for scanned PDFs), Word (.docx), PowerPoint (.pptx), Excel (.xlsx), and plain-text/HTML files. Use get_course_files to find file IDs.
Args: course_id: The numeric Canvas course ID. file_id: The numeric Canvas file ID.
Inputs: file_id (required), course_id (required), account. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Every tool targets a distinct resource and action. get_courses vs get_assignments vs get_announcements are clearly separated, and even similar tools like get_course_files (listing) and read_course_file (reading content) are unambiguous.
All tools follow a verb_noun pattern with 'get_' prefix, except read_course_file which uses 'read_'. This is a minor deviation but the rest are consistent, and the naming is predictable overall.
The 10 tools are well-scoped for a read-only Canvas LMS server. They cover the main course-related resources without being excessive, fitting comfortably within the ideal 3-15 range.
For a read-only surface, it covers the major resources: courses, assignments, announcements, files, modules, people, grades, discussions, and pages. Minor gaps exist (e.g., no single-course detail endpoint, no calendar events), but the core read workflows are covered without dead ends.
Maintenance
Related MCP Connectors
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
MCP adapter for the Paxaver school community platform. Streamable HTTP, OAuth 2.1, capability auth.
Public read-only MCP access to digital learning concepts, semantic relationships, and citations.
Use your Pronto feed, Spaces, Posts, Artifacts, and agents from any MCP client.
Related MCP Servers
- AlicenseAqualityCmaintenanceRead-only MCP server for Canvas LMS that exposes tools to list courses, assignments, grades, submissions, syllabi, announcements, modules, pages, and files, without any write operations.1112 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to connect to a self-hosted Canvas LMS account to read courses, assignments, grades, modules, files, discussions, announcements, and Inbox messages, and to submit work or perform teacher actions with confirmation safeguards.MIT
- AlicenseNot gradedqualityAmaintenanceEnables interaction with Canvas LMS through its API for managing courses, assignments, submissions, enrollments, grades, discussions, files, and account administration via MCP clients.21 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables interaction with Canvas LMS through its API, supporting course, assignment, enrollment, grade, discussion, file, and account administration workflows for students, instructors, and administrators via MCP clients.21 npmMIT