Canvas LMS MCP Server (canvas-mcp)
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Ask Claude about your Canvas courses, assignments, deadlines, modules, and grades from one place.
canvas-mcp is a local-first MCP server for Canvas LMS users (students, instructors, and MCP builders). It turns Canvas REST API actions into MCP tools that work from Claude Code, Claude Desktop, and other MCP-compatible clients.
> **Status:** alpha. Single-user, no warranty, API surface may still shift. File issues if it breaks.
Who this is for
- **Students** who want one view across multiple courses
- **Educators** who want faster access to assignments, modules, and announcements
- **MCP users** who want Canvas data in local Claude workflows
What you can ask Claude
- “What assignments are due this week across all my active courses?”
- “Show upcoming events and planner items for next week.”
- “List my current grades by course.”
- “Get the modules (with items) for course 12345.”
- “Show announcements for course 12345.”
- “Fetch the page syllabus from course 12345.”
Quick start
Prerequisite: **Python 3.10+**.
1) Create a Canvas personal access token
In Canvas: **Account → Settings → Approved Integrations → + New Access Token**.
Copy the token shown (Canvas does not show it again later).
2) Install
From PyPI (recommended):
Or from source:
3) Configure ~/.canvas.env
For token safety guidance (least privilege, file permissions, rotation/revocation, and vulnerability reporting), see SECURITY.md.
4) Register in your MCP client
Claude Code:
Claude Desktop:
- macOS example path: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows example path: %APPDATA%\Claude\claude_desktop_config.json
- Linux example path: ~/.config/Claude/claude_desktop_config.json
Tools exposed
- list_courses
- list_assignments
- list_modules
- list_announcements
- get_page
- get_file_info
- get_grades
- planner_items
- upcoming_events
- todo
Bulk dump
canvas-local-mcp-dump downloads course files and related content for offline indexing.
Output goes to ./canvas-dump/ by default. Override with CANVAS_DUMP_DIR=/path/to/dir.
Local-first, privacy and token flow
- The server runs locally and uses **stdio** transport with your MCP client.
- Configuration is read from ~/.canvas.env (CANVAS_BASE_URL, CANVAS_TOKEN).
- Requests go from your local server to the official Canvas API endpoints.
- No external token broker is used in the request path.
- Security guidance and disclosure policy: SECURITY.md.
Demo
No demo GIF is currently committed yet. You can still verify the workflow quickly:
Try these prompts
After registering the MCP server, ask Claude:
- “List my active Canvas courses.”
- “What assignments are due this week across all my active courses?”
- “Show upcoming events and planner items for next week.”
- “List my current grades by course.”
> Placeholder: add a short terminal/GIF walkthrough here in a future PR.
Development
Requires **Python 3.10+**.
CI runs lint + tests on Python 3.10–3.13 for every push and pull request.
Publishing a new release
Follow this order to publish a new version (e.g. 0.1.4) consistently across PyPI and the MCP Registry.