π Canvas LMS MCP Server
A robust Model Context Protocol (MCP) server that connects Claude AI to your Canvas LMS account β letting you interact with your coursework using natural language.
Built with Python Β· Canvas REST API Β· MCP SDK
β¨ Features (14 Tools across 4 Modules)
π Assignments & Courses
| Tool | Description |
|---|---|
canvas_get_course_list |
List all active enrolled courses |
canvas_get_assignments |
Get all assignments (all courses or filtered) |
canvas_get_upcoming_deadlines |
Deadlines in the next N days, color-coded by urgency |
canvas_get_assignment_details |
Full details of a specific assignment |
canvas_get_submission_status |
Submitted vs. missing across all courses |
π Grades
| Tool | Description |
|---|---|
canvas_get_course_grades |
Current grades with visual progress bars |
canvas_get_grade_breakdown |
Assignment-level breakdown with running total |
canvas_get_missing_assignments |
All unsubmitted assignments |
π’ Announcements & Modules
| Tool | Description |
|---|---|
canvas_get_announcements |
Recent announcements across courses |
canvas_get_course_modules |
Modules with locked/completed status |
canvas_get_module_items |
Items in a module with completion checkboxes |
π Calendar
| Tool | Description |
|---|---|
canvas_get_calendar_events |
All events for the next N days |
canvas_get_weekly_schedule |
Week-at-a-glance view |
canvas_get_upcoming_events |
Next N events across all courses |
π Setup
1. Clone the repo
git clone https://github.com/yourusername/canvas-mcp.git
cd canvas-mcp
2. Install dependencies
pip install -r requirements.txt
3. Configure your Canvas credentials
cp .env.example .env
Edit .env:
CANVAS_BASE_URL=https://yourschool.instructure.com
CANVAS_API_TOKEN=your_token_here
How to get your Canvas API Token:
- Log into Canvas
- Go to Account β Settings
- Scroll to Approved Integrations
- Click New Access Token
- Copy the token into your
.env
4. Configure Claude Desktop
Add this to your claude_desktop_config.json:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"canvas": {
"command": "python",
"args": ["/absolute/path/to/canvas-mcp/server.py"],
"env": {
"CANVAS_BASE_URL": "canvas_base_url"
"CANVAS_API_TOKEN": "your_token_here"
}
}
}
}
5. Restart Claude Desktop
The Canvas tools will now appear in your Claude sidebar!
π¬ Example Prompts
Once connected, try asking Claude:
- "What assignments do I have due this week?"
- "What's my current GPA estimate?"
- "Am I missing any assignments?"
- "What announcements have my professors posted recently?"
- "Show me my grade breakdown for course 12345"
- "What does my week look like?"
ποΈ Project Structure
canvas-mcp/
βββ server.py # MCP server entry point (14 tools)
βββ canvas_client.py # Canvas REST API wrapper with pagination
βββ tools/
β βββ assignments.py # Assignment & course tools
β βββ grades.py # Grade tools
β βββ announcements.py# Announcement & module tools
β βββ calendar.py # Calendar tools
βββ .env.example # Environment config template
βββ requirements.txt
βββ README.md
π Privacy & Security
- Read-only β this server never writes, submits, or modifies your Canvas data
π οΈ Tech Stack
- Python 3.10+
- MCP SDK β Model Context Protocol
- httpx β Async-ready HTTP client
- python-dotenv β Environment config
- Canvas LMS REST API