canvas-mcp-server
by smrik
README.md
# Canvas MCP Server
Automatically pull Canvas LMS course materials into Obsidian instead of manually downloading and organizing them.
## Why This Exists
Canvas LMS is great for courses, but managing materials requires constant downloads and folder organization. Canvas MCP Server bridges the gap: use an AI assistant to sync course files, assignments, grades, and announcements directly into your Obsidian vault, organized by course and module.
## Quick Example
```bash
# Your AI assistant runs these MCP tools:
list_courses() # → Find course ID
discover_course_files("123") # → Preview all files/structure
download_course("123", "My Course") # → Sync everything to Obsidian
# Result: Obsidian vault/Canvas/My Course/Modules/Week 1/lecture.pdf (downloaded)
```
## Status
**Dormant** — Not actively maintained. Provided as-is for reference.
## Available Tools
**Discovery:** `list_courses`, `discover_course_files`, `get_course_modules`
**Download:** `download_file`, `download_module`, `download_course`, `sync_course_files`
**Info:** `get_course_assignments`, `get_course_announcements`, `get_course_grades`, `get_upcoming_events`
**Jobs:** `get_job_status`, `list_jobs` (for background operations)
## Gotchas
**Auth Token Setup**
- Get from Canvas: Account Settings → Approved Integrations → New Access Token
- Token is required; server won't run without it
**Rate Limits**
- Canvas API allows ~3000 requests/hour
- Use `background=True` on large downloads to avoid timeout
**File Access Issues**
- Server uses 4-strategy fallback (global scope → public URL → course scope → user scope) to work around permission restrictions
- Students with limited Canvas API access still work in most cases
- Rare: if all 4 fail, manually download from Canvas web UI
## Setup
### Configuration
Environment variables or `.env` file:
```
CANVAS_BASE_URL=https://your-canvas-instance.edu
CANVAS_API_TOKEN=<your-token>
OBSIDIAN_VAULT_PATH=C:\path\to\your\vault
CANVAS_FOLDER=Canvas # subfolder in vault (default: Canvas)
PORT=8080
```
### Quick Start
```bash
pip install -r requirements.txt
python canvas_server.py
```
### Docker
```bash
docker build -t canvas-mcp-server .
docker run -e CANVAS_BASE_URL=... -e CANVAS_API_TOKEN=... \
-v /path/to/obsidian:/obsidian canvas-mcp-server
```
## Tech Stack
- Python 3.11, FastMCP, httpx, python-dotenv, Docker
## License
See CLAUDE.md for notes.
## Screenshots
_TODO (Patrik): add screenshots here._
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues