Skip to content
Back to search

mcp-canvas-lms

Version 2.2 - 54 tools available - an MCP server for interacting with the Canvas LMS API. This server allows you to manage courses, assignments, enrollments, and grades within Canvas.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dmontgomery40--mcp-canvas-lms/badge.svg)](/listings/dmontgomery40--mcp-canvas-lms)

HTML

<a href="/listings/dmontgomery40--mcp-canvas-lms"><img src="/api/listings/dmontgomery40--mcp-canvas-lms/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Option 1: Claude Desktop Integration (Recommended MCP Setup)

Add to `claude_desktop_config.json`:

{
  "mcpServers": {
    "canvas-mcp-server": {
      "command": "npx",
      "args": ["-y", "canvas-mcp-server"],
      "env": {
        "CANVAS_API_TOKEN": "your_token_here",
        "CANVAS_DOMAIN": "your_school.instructure.com"
      }
    }
  }
}

Option 2: NPM Package

# Install globally
npm install -g canvas-mcp-server

# Configure
export CANVAS_API_TOKEN="your_token_here"
export CANVAS_DOMAIN="your_school.instructure.com"

# Run
canvas-mcp-server

Option 3: Docker

docker run -d \
  --name canvas-mcp \
  -p 3000:3000 \
  -e CANVAS_API_TOKEN="your_token" \
  -e CANVAS_DOMAIN="school.instructure.com" \
  -e MCP_TRANSPORT="streamable-http" \
  -e MCP_HTTP_HOST="0.0.0.0" \
  -e MCP_HTTP_PORT="3000" \
  -e MCP_HTTP_PATH="/mcp" \
  ghcr.io/dmontgomery40/mcp-canvas-lms:latest

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 492 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Canvas MCP Server v2.3.0
  2. ## Security and disclosure history
  3. This project is an independent MCP server for Canvas LMS APIs. It is not affiliated with, endorsed by, or maintained by Instructure or Canvas.
  4. In June 2025, during development of this MCP, I identified a Broken Access Control issue in the Canvas environment at bootcampspot.instructure.com. The issue exposed personally identifiable information for other students enrolled in my course.
  5. I reported the issue through Bugcrowd on June 5, 2025, and also contacted Instructure / Canvas security channels directly. The Bugcrowd report was later closed as "Not Applicable." In subsequent correspondence, Instructure stated that the bootcampspot.instructure.com environment was outside its control.
  6. Public references:
  7. - Disclosure thread: https://www.reddit.com/r/cybersecurity/comments/1t6wmkw/reported_a_broken_access_control_bug_to/
  8. - Bugcrowd activity timeline: https://imgur.com/gallery/canvas-vuln-declared-n-11-months-ago-zYfHnBs
  9. - Later Instructure / BootcampSpot correspondence: https://imgur.com/a/BnhgXme
  10. This repository does not publish exploit steps, affected tenant details beyond what is already public, live URLs, screenshots containing student data, or proof-of-concept abuse flows.
  11. Separately, Instructure publicly disclosed a Canvas security incident in May 2026, and public reporting has linked the incident to ShinyHunters claims. This repository makes no claim that the June 2025 report caused, enabled, predicted, or is technically connected to the May 2026 incident.
  12. This disclosure is documented here for project history and transparency only.
  13. # What this is
  14. > A comprehensive Model Context Protocol (MCP) server for Canvas LMS with complete student, instructor, and account administration functionality
  15. ## 🚀 What's New in v2.3.0
  16. - **🌐 NEW**: Streamable HTTP transport support (`MCP_TRANSPORT=streamable-http`)
  17. - **🖥️ Preserved**: First-class stdio transport for local MCP clients
  18. - **🧪 Added**: Behavior tests for lifecycle, transports, and structured failure-path errors
  19. - **🧱 Improved**: Stricter tool schemas and codemode-oriented tool descriptions
  20. - **🔧 FIXED**: Course creation "page not found" error (missing `account_id` parameter)
  21. - **👨‍💼 Account Management**: Complete account-level administration tools
  22. - **📊 Reports & Analytics**: Generate and access Canvas account reports
  23. - **👥 User Management**: Create and manage users at the account level
  24. - **🏢 Multi-Account Support**: Handle account hierarchies and sub-accounts
  25. - **✅ API Compliance**: All endpoints now follow proper Canvas API patterns
  26. ## 🎯 Key Features
  27. ### 🎓 For Students
  28. - **Course Management**: Access all courses, syllabi, and course materials
  29. - **Assignment Workflow**: View, submit (text/URL/files), and track assignments
  30. - **Communication**: Participate in discussions, read announcements, send messages
  31. - **Progress Tracking**: Monitor grades, module completion, and calendar events
  32. - **Quizzes**: Take quizzes, view results and feedback
  33. - **File Access**: Browse and download course files and resources
  34. ### 👨‍🏫 For Instructors
  35. - **Course Creation**: Create and manage course structure *(now with proper account support)*
  36. - **Grading**: Grade submissions, provide feedback, manage rubrics
  37. - **User Management**: Enroll students, manage permissions
  38. - **Content Management**: Create assignments, quizzes, discussions
  39. ### 👨‍💼 For Account Administrators (NEW!)
  40. - **Account Management**: Manage institutional Canvas accounts
  41. - **User Administration**: Create and manage users across accounts
  42. - **Course Oversight**: List and manage all courses within accounts
  43. - **Reporting**: Generate enrollment, grade, and activity reports
  44. - **Sub-Account Management**: Handle account hierarchies and structures
  45. ### 🛠️ Technical Excellence
  46. - **Robust API**: Automatic retries, pagination, comprehensive error handling
  47. - **Cloud Ready**: Docker containers, Kubernetes manifests, health checks
  48. - **Well Tested**: Unit tests, integration tests, mocking, coverage reports
  49. - **Type Safe**: Full TypeScript implementation with strict types
  50. - **50+ Tools**: Comprehensive coverage of Canvas LMS functionality
  51. ## Quick Start
  52. ### Option 1: Claude Desktop Integration (Recommended MCP Setup)
  53. Add to `claude_desktop_config.json`:
  54. ```json
  55. {
  56. "mcpServers": {
  57. "canvas-mcp-server": {
  58. "command": "npx",
  59. "args": ["-y", "canvas-mcp-server"],
  60. "env": {
  61. "CANVAS_API_TOKEN": "your_token_here",
  62. "CANVAS_DOMAIN": "your_school.instructure.com"
  63. }
  64. }
  65. }
  66. }
  67. ```
  68. ### Option 2: NPM Package
  69. ```bash
  70. # Install globally
  71. npm install -g canvas-mcp-server
  72. # Configure
  73. export CANVAS_API_TOKEN="your_token_here"
  74. export CANVAS_DOMAIN="your_school.instructure.com"
  75. # Run
  76. canvas-mcp-server
  77. ```
  78. ### Option 3: Docker
  79. ```bash
  80. docker run -d \
  81. --name canvas-mcp \
  82. -p 3000:3000 \
  83. -e CANVAS_API_TOKEN="your_token" \
  84. -e CANVAS_DOMAIN="school.instructure.com" \
  85. -e MCP_TRANSPORT="streamable-http" \
  86. -e MCP_HTTP_HOST="0.0.0.0" \
  87. -e MCP_HTTP_PORT="3000" \
  88. -e MCP_HTTP_PATH="/mcp" \
  89. ghcr.io/dmontgomery40/mcp-canvas-lms:latest
  90. ```
  91. ## Transport Modes
  92. The server supports two explicit transport modes:
  93. - `stdio` (default): best for Claude Desktop/Codex/Cursor local MCP wiring.
  94. - `streamable-http`: best for local HTTP integrations and containerized workflows.
  95. ### Transport environment variables
  96. ```bash
  97. # Required Canvas auth
  98. CANVAS_API_TOKEN=your_token
  99. CANVAS_DOMAIN=your_school.instructure.com
  100. # Transport selection
  101. MCP_TRANSPORT=stdio # or streamable-http
  102. # Streamable HTTP settings
  103. MCP_HTTP_HOST=127.0.0.1
  104. MCP_HTTP_PORT=3000
  105. MCP_HTTP_PATH=/mcp
  106. MCP_HTTP_STATEFUL=true
  107. MCP_HTTP_JSON_RESPONSE=true
  108. MCP_HTTP_ALLOWED_ORIGINS=
  109. ```
  110. ## 💼 Account Admin Workflow Examples
  111. ### Create a New Course (FIXED!)
  112. ```
  113. "Create a new course called 'Advanced Biology' in account 123"
  114. ```
  115. **Now properly creates courses with required account_id parameter**
  116. ### Manage Users
  117. ```
  118. "Create a new student user John Doe with email john.doe@school.edu in our main account"
  119. ```
  120. **Creates user accounts with proper pseudonym and enrollment setup**
  121. ### Generate Reports
  122. ```
  123. "Generate an enrollment report for account 456 for the current term"
  124. ```
  125. **Initiates Canvas reporting system for institutional analytics**
  126. ### List Account Courses
  127. ```
  128. "Show me all published Computer Science courses in our Engineering account"
  129. ```
  130. **Advanced filtering and searching across account course catalogs**
  131. ## 🎓 Student Workflow Examples
  132. ### Check Today's Assignments
  133. ```
  134. "What assignments do I have due this week?"
  135. ```
  136. **Lists upcoming assignments with due dates, points, and submission status**
  137. ### Submit an Assignment
  138. ```
  139. "Help me submit my essay for English 101 Assignment 3"
  140. ```
  141. **Guides through text submission with formatting options**
  142. ### Check Grades
  143. ```
  144. "What's my current grade in Biology?"
  145. ```
  146. **Shows current scores, grades, and assignment feedback**
  147. ### Participate in Discussions
  148. ```
  149. "Show me the latest discussion posts in my Philosophy class"
  150. ```
  151. **Displays recent discussion topics and enables posting responses**
  152. ### Track Progress
  153. ```
  154. "What modules do I need to complete in Math 200?"
  155. ```
  156. **Shows module completion status and next items to complete**
  157. ## Getting Canvas API Token
  158. 1. **Log into Canvas** → Account → Settings
  159. 2. **Scroll to "Approved Integrations"**
  160. 3. **Click "+ New Access Token"**
  161. 4. **Enter description**: "Claude MCP Integration"
  162. 5. **Copy the generated token** Save securely!
  163. ⚠️ **Account Admin Note**: For account-level operations, ensure your API token has administrative privileges.
  164. ## Production Deployment
  165. ### Docker Compose
  166. ```bash
  167. git clone https://github.com/DMontgomery40/mcp-canvas-lms.git
  168. cd mcp-canvas-lms
  169. cp .env.example .env
  170. # Edit .env with your Canvas credentials
  171. docker-compose up -d
  172. ```
  173. ### Kubernetes
  174. ```bash
  175. kubectl create secret generic canvas-mcp-secrets \
  176. --from-literal=CANVAS_API_TOKEN="your_token" \
  177. --from-literal=CANVAS_DOMAIN="school.instructure.com"
  178. kubectl apply -f k8s/
  179. ```
  180. ### Health Monitoring
  181. ```bash
  182. # Check application health
  183. curl http://localhost:3000/health
  184. # Or use the built-in health check
  185. npm run health-check
  186. ```
  187. ## Development
  188. ```bash
  189. # Setup development environment
  190. git clone https://github.com/DMontgomery40/mcp-canvas-lms.git
  191. cd mcp-canvas-lms
  192. npm install
  193. # Start development with hot reload
  194. npm run dev:watch
  195. # Run tests
  196. npm run test
  197. npm run coverage
  198. # Code quality
  199. npm run lint
  200. npm run type-check
  201. ```
  202. ## 📚 Available Tools (50+ Tools)
  203. <details>
  204. <summary><strong>🎓 Core Student Tools (Click to expand)</strong></summary>
  205. - `canvas_health_check` - Check API connectivity
  206. - `canvas_list_courses` - List all your courses
  207. - `canvas_get_course` - Get detailed course info
  208. - `canvas_list_assignments` - List course assignments
  209. - `canvas_get_assignment` - Get assignment details
  210. - `canvas_submit_assignment` - Submit assignment work
  211. - `canvas_get_submission` - Check submission status
  212. - `canvas_list_modules` - List course modules
  213. - `canvas_get_module` - Get module details
  214. - `canvas_list_module_items` - List items in a module
  215. - `canvas_mark_module_item_complete` - Mark items complete
  216. - `canvas_list_discussion_topics` - List discussion topics
  217. - `canvas_get_discussion_topic` - Get discussion details
  218. - `canvas_post_to_discussion` - Post to discussions
  219. - `canvas_list_announcements` - List course announcements
  220. - `canvas_get_user_grades` - Get your grades
  221. - `canvas_get_course_grades` - Get course-specific grades
  222. - `canvas_get_dashboard` - Get dashboard info
  223. - `canvas_get_dashboard_cards` - Get course cards
  224. - `canvas_get_upcoming_assignments` - Get due dates
  225. - `canvas_list_calendar_events` - List calendar events
  226. - `canvas_list_files` - List course files
  227. - `canvas_get_file` - Get file details
  228. - `canvas_list_folders` - List course folders
  229. - `canvas_list_pages` - List course pages
  230. - `canvas_get_page` - Get page content
  231. - `canvas_list_conversations` - List messages
  232. - `canvas_get_conversation` - Get conversation details
  233. - `canvas_create_conversation` - Send messages
  234. - `canvas_list_notifications` - List notifications
  235. - `canvas_get_syllabus` - Get course syllabus
  236. - `canvas_get_user_profile` - Get user profile
  237. - `canvas_update_user_profile` - Update profile
  238. </details>
  239. <details>
  240. <summary><strong>👨‍🏫 Instructor Tools (Click to expand)</strong></summary>
  241. - `canvas_create_course` - Create new courses *(FIXED: now requires account_id)*
  242. - `canvas_update_course` - Update course settings
  243. - `canvas_create_assignment` - Create assignments
  244. - `canvas_update_assignment` - Update assignments
  245. - `canvas_list_assignment_groups` - List assignment groups
  246. - `canvas_submit_grade` - Grade submissions
  247. - `canvas_enroll_user` - Enroll students
  248. - `canvas_list_quizzes` - List course quizzes
  249. - `canvas_get_quiz` - Get quiz details
  250. - `canvas_create_quiz` - Create quizzes
  251. - `canvas_start_quiz_attempt` - Start quiz attempts
  252. - `canvas_list_rubrics` - List course rubrics
  253. - `canvas_get_rubric` - Get rubric details
  254. </details>
  255. <details>
  256. <summary><strong>👨‍💼 Account Management Tools (NEW!)</strong></summary>
  257. - `canvas_get_account` - Get account details
  258. - `canvas_list_account_courses` - List courses in an account
  259. - `canvas_list_account_users` - List users in an account
  260. - `canvas_create_user` - Create new users in accounts
  261. - `canvas_list_sub_accounts` - List sub-accounts
  262. - `canvas_get_account_reports` - List available reports
  263. - `canvas_create_account_report` - Generate account reports
  264. </details>
  265. ## 🔧 Breaking Changes in v2.2.0
  266. ### Course Creation Fix
  267. **BEFORE (Broken):**
  268. ```javascript
  269. {
  270. "tool": "canvas_create_course",
  271. "arguments": {
  272. "name": "My Course" // ❌ Missing account_id - caused "page not found"
  273. }
  274. }
  275. ```
  276. **AFTER (Fixed):**
  277. ```javascript
  278. {
  279. "tool": "canvas_create_course",
  280. "arguments": {
  281. "account_id": 123, // ✅ Required account_id
  282. "name": "My Course",
  283. "course_code": "CS-101"
  284. }
  285. }
  286. ```
  287. ## 🌟 Example Claude Conversations
  288. **Student**: *"I need to check my upcoming assignments and submit my English essay"*
  289. **Claude**: *I'll help you check your upcoming assignments and then assist with submitting your English essay. Let me start by getting your upcoming assignments...*
  290. [Claude uses `canvas_get_upcoming_assignments` then helps with `canvas_submit_assignment`]
  291. ---
  292. **Instructor**: *"Create a new Advanced Physics course in the Science department and enroll my teaching assistant"*
  293. **Claude**: *I'll help you create the Advanced Physics course in your Science department account and then enroll your TA...*
  294. [Claude uses `canvas_create_course` with proper account_id, then `canvas_enroll_user`]
  295. ---
  296. **Administrator**: *"Generate an enrollment report for all Computer Science courses this semester"*
  297. **Claude**: *I'll generate a comprehensive enrollment report for your CS courses...*
  298. [Claude uses `canvas_list_account_courses` with filters, then `canvas_create_account_report`]
  299. ## 🔍 Troubleshooting
  300. **Common Issues:**
  301. - ❌ **401 Unauthorized**: Check your API token and permissions
  302. - ❌ **404 Not Found**: Verify course/assignment IDs and access rights
  303. - ❌ **"Page not found" on course creation**: Update to v2.2.0 for account_id fix
  304. - ❌ **Timeout**: Increase `CANVAS_TIMEOUT` or check network connectivity
  305. **Debug Mode:**
  306. ```bash
  307. export LOG_LEVEL=debug
  308. npm start
  309. ```
  310. **Health Check:**
  311. ```bash
  312. npm run health-check
  313. ```
  314. ## 🤝 Contributing
  315. We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  316. ### Quick Contribution Setup
  317. ```bash
  318. git clone https://github.com/DMontgomery40/mcp-canvas-lms.git
  319. cd mcp-canvas-lms
  320. npm install
  321. npm run dev:watch
  322. # Make changes, add tests, submit PR
  323. ```
  324. ## 📈 Roadmap
  325. - **v2.3**: Enhanced reporting, bulk operations, advanced search
  326. - **v2.4**: Mobile support, offline capability, analytics dashboard
  327. - **v3.0**: Multi-tenant, GraphQL API, AI-powered insights
  328. ## 🙋 Support & Community
  329. - 🐛 **Bug Reports**: [GitHub Issues](https://github.com/DMontgomery40/mcp-canvas-lms/issues)
  330. - 💬 **Questions**: [GitHub Discussions](https://github.com/DMontgomery40/mcp-canvas-lms/discussions)
  331. - 📖 **Documentation**: [Wiki](https://github.com/DMontgomery40/mcp-canvas-lms/wiki)
  332. ## Appendix: MCP in Practice (Code Execution, Tool Scale, and Safety)
  333. Last updated: 2026-03-23
  334. ### Why This Appendix Exists
  335. MCP is still one of the most useful interoperability layers for agentic tooling. The tradeoff is that large MCP servers can expose dozens of tools, and naive tool-calling can flood context windows with tool schemas, call traces, and low-signal chatter.
  336. In practice, larger tool surfaces only help when orchestration stays token-efficient and execution behavior is constrained.
  337. ### The Shift to Code Execution / Code Mode
  338. Recent production workflows move orchestration out of conversational turns and into executable loops. This keeps context overhead lower, improves determinism, and makes runs auditable.
  339. Core reading:
  340. - [Cloudflare: Code Mode](https://blog.cloudflare.com/code-mode/)
  341. - [Cloudflare: Code Execution with MCP](https://blog.cloudflare.com/code-execution-with-mcp/)
  342. - [Anthropic: Code Execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp)
  343. ### Recommended Setup for Power Users
  344. For lower-noise, repeatable MCP usage, start with codemode-oriented routing:
  345. - [codemode-mcp (jx-codes)](https://github.com/jx-codes/codemode-mcp)
  346. - [UTCP](https://www.utcp.io)
  347. Even with strong setup, model behavior can be hit-or-miss across providers and versions. Keep retries and deterministic fallbacks.
  348. ### Peter Steinberger Workflow Pattern
  349. A high-leverage pattern is turning broad MCP tool surfaces into narrower CLI/task interfaces:
  350. - [MCPorter](https://github.com/steipete/mcporter)
  351. - [OpenClaw](https://github.com/steipete/openclaw)
  352. ### What Works Best With Which MCP Clients
  353. - Claude Code / Codex / Cursor agent workflows: usually strong for direct MCP + code-execution loops.
  354. - Thin hosted chat clients: often safer with wrapped CLIs/gateways instead of full raw tool exposure.
  355. - High-tool-count servers: usually better when split into narrow task gateways.
  356. This ecosystem changes quickly. If you are reading this now, parts of this section may already be out of date.
  357. ### Prompt Injection: Risks, Consequences, and Mitigations
  358. Prompt injection remains an open problem for tool-using agents. It is manageable, but not solved.
  359. Primary risks:
  360. - Hidden instructions in retrieved content or tool output.
  361. - Secret/token exfiltration through unintended calls.
  362. - Unauthorized state changes in systems or data.
  363. Mitigation baseline:
  364. - Least-privilege credentials and scoped tokens.
  365. - Destination/action allowlists and strict schema validation.
  366. - Human confirmation for destructive operations.
  367. - Sandboxed execution and resource limits.
  368. - Structured logging and replayable execution traces.
  369. Treat every tool output as untrusted input unless explicitly verified.
  370. ## 📄 License
  371. MIT License - see [LICENSE](LICENSE) file for details.
  372. ---
  373. <div align="center">
  374. <strong>Canvas MCP Server v2.2.0</strong><br>
  375. <em>Empowering students, educators, and administrators with seamless Canvas integration</em><br><br>
  376. ⭐ **Star this repo if it helps you!** ⭐
  377. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.