mcp-canvas-lms-toolkit
A powerful Model Context Protocol (MCP) interface for interacting with and administering the Canvas Learning Management System (LMS) via its RESTful API endpoints. Facilitates the automation of complex academic workflows, including user provisioning, curriculum deployment, and performance data extraction.
Author

DMontgomery40
Quick Info
Actions
Tags
Canvas MCP Toolkit: Comprehensive LMS Orchestration Platform (v2.2.0)
An exhaustive MCP server designed to manage every facet of the Canvas environment, supporting roles from students through to executive account governance.
🌟 Major Updates in Version 2.2.0
- CRITICAL FIX: Rectified a persistent
HTTP 404during course instantiation, resolving an oversight regarding the mandatoryaccount_idparameter. - Governance Layer: Introduction of robust tools for institutional account oversight.
- Data Extraction: Functionality to trigger and retrieve institutional-level analytics and usage reports.
- Identity Services: Full lifecycle management for user identities across the organizational hierarchy.
- Hierarchy Support: Native handling of nested sub-accounts and complex organizational structures.
- API Adherence: Strict validation ensuring all operations conform precisely to the official Canvas REST specification.
⚙️ Core Capabilities Summary
🧑🎓 Learner Functions
- Curriculum Access: Retrieve all enrolled courses, associated syllabi, and multimedia assets.
- Submission Pipeline: Interface for delivering required work (textual input, file uploads, external URL references) and tracking submission status.
- Interaction Hub: Access to threaded discussions, official announcements dissemination, and internal messaging.
- Performance Metrics: Real-time monitoring of scores, completion progress across learning pathways, and schedule synchronization.
- Assessment Engine: Capability to initiate quiz attempts and review immediate feedback/scoring.
- Resource Retrieval: Secure browsing and downloading of restricted course files and documentation.
👩🏫 Educator Capabilities
- Structure Definition: Provisioning and configuration of new academic courses (now reliably linked to an owning account).
- Evaluation Control: Grading submissions, applying qualitative feedback, and managing associated evaluation rubrics.
- Roster Management: Enrolling authorized learners and modulating access permissions.
- Material Deployment: Creation and modification of assessments, learning activities, and dialogue prompts.
🏛️ Institutional Administrators (New Focus Area)
- Account Administration: Deep-level configuration and metadata management for Canvas organizational units.
- Identity Provisioning: Creation, modification, and deactivation of user identities spanning all accounts.
- Catalog Oversight: Comprehensive listing and lifecycle management of all provisioned course instances.
- Reporting Engine: Initiating and retrieving critical operational datasets (enrollment statistics, grade distributions, activity logs).
- Structural Mapping: Managing the relationship and inheritance between parent and child organizational units.
🚀 Technical Implementation Highlights
- Resilience: Built-in exponential backoff for transient network errors, comprehensive exception mapping, and full request pagination support.
- Deployment Agility: Optimized for cloud-native environments (Docker base images, Kubernetes manifests, standardized health probes).
- Quality Assurance: Extensive unit tests, integration validation suites, dependency mocking, and high code coverage metrics.
- Development Standard: Written entirely in TypeScript, enforcing strong static typing throughout the codebase.
- Feature Depth: Over fifty distinct, fine-grained utility functions mapped to Canvas functionality.
🚀 Deployment Pathways
Method 1: Recommended Claude Desktop Configuration
Integrate into your claude_desktop_config.json file:
{ "mcpServers": { "canvas-lms-orchestrator": { "command": "npx", "args": ["-y", "canvas-mcp-server"], "env": { "CANVAS_API_TOKEN": "Your_Secure_Credential", "CANVAS_DOMAIN": "your_institution.instructure.com" } } } }
Method 2: Direct NPM Installation
bash
Global installation
npm install -g canvas-mcp-server
Environment setup
export CANVAS_API_TOKEN="Your_Secure_Credential" export CANVAS_DOMAIN="your_institution.instructure.com"
Execution
canvas-mcp-server
Method 3: Containerized Execution (Docker)
bash docker run -d \n --name canvas-service \n -e CANVAS_API_TOKEN="token_value" \n -e CANVAS_DOMAIN="domain.instructure.com" \n ghcr.io/dmontgomery40/mcp-canvas-lms:latest
📚 Administration Workflow Schemas
Course Provisioning (Resolved)
"Initiate the creation of a seminar titled 'Advanced Biology' within organizational unit 123"
Status: Now successfully provisions courses by guaranteeing the inclusion of the necessary account_id context.
User Lifecycle Operations
"Establish a new matriculated learner, Jane Smith, associated with the address jane.smith@university.edu, under the root organizational structure"
Result: Creates the user entity, handling pseudonym assignment and initial enrollment mappings.
Institutional Data Retrieval
"Pull a comprehensive record of all current enrollments pertaining to account 456 for the academic term in progress"
Result: Triggers the asynchronous reporting mechanism to generate the requested analytical dataset.
Catalog Querying
"Display every active Computer Science catalog item residing within the Engineering administrative unit"
Result: Executes complex, filtered searches across the entire managed course inventory.
🎓 Student Interaction Scenarios
Reviewing Imminent Deadlines
"What scholastic tasks are scheduled for completion within the next seven days?"
Action: Aggregates and presents due dates, associated points, and current submission status.
Delivering Coursework
"Facilitate the upload of my final paper for 'Intro to Literature', Assignment designation 3"
Action: Guides the user through the submission process, supporting rich text/file attachment methods.
Grade Inquiry
"What is my running average score in the Microbiology subject?"
Action: Retrieves the latest calculated score, grade letter, and associated instructor commentary.
Forum Participation
"Present the most recent entries in the 'Ethics' class discussion board"
Action: Fetches the latest threads and permits drafting of replies or new posts.
Learning Path Tracking
"Outline the remaining required steps within the sequence for Mathematics 200 level course"
Action: Visualizes module completion status and identifies the next sequential objective.
🔑 API Credential Acquisition
- Navigate to Canvas Interface → User Profile → Settings Area
- Locate and select "Manage Access Tokens" or "Approved Integrations"
- Initiate a "New Token Generation"
- Assign Label: "Claude MCP Integration Service"
- CRITICAL: Securely store the generated alphanumeric token string.
⚠️ Admin Prerequisite: Ensure the token possesses the necessary scope/permissions for account-level read/write operations.
🏭 Production Deployment Blueprints
Docker Compose Orchestration
bash git clone https://github.com/DMontgomery40/mcp-canvas-lms.git cd mcp-canvas-lms cp .env.example .env
Populate .env with secrets and configuration
docker-compose up -d
Kubernetes Manifest Deployment
bash kubectl create secret generic canvas-secrets \n --from-literal=CANVAS_API_TOKEN="token_value" \n --from-literal=CANVAS_DOMAIN="domain.instructure.com"
kubectl apply -f k8s/deployment.yaml
Service Health Verification
bash
Direct HTTP check
curl http://localhost:3000/health
Tool-based validation
npm run health-check
🧑💻 Development & Contribution
bash
Environment initialization
git clone https://github.com/DMontgomery40/mcp-canvas-lms.git cd mcp-canvas-lms npm install
Start coding with live reloading
npm run dev:watch
Quality checks
npm run test npm run lint
🛠️ Exposed Utility Functions (Feature Set)
✅ Student Interface Utilities
- `canvas_health_check` - Connectivity probe. - `canvas_list_courses` - Inventory of accessible courses. - `canvas_get_course` - Detailed course manifest retrieval. - `canvas_list_assignments` - Fetch active assignments list. - `canvas_submit_assignment` - Deliver required academic output. - `canvas_get_submission` - Verify submission state. - `canvas_list_modules` - Retrieve learning pathway structures. - `canvas_mark_module_item_complete` - Manually advance progress. - `canvas_list_discussion_topics` - View forum threads. - `canvas_post_to_discussion` - Contribute to ongoing dialogue. - `canvas_get_user_grades` - Aggregate performance data. - `canvas_list_calendar_events` - Display chronological commitments. - `canvas_list_files` - Access shared digital assets. - `canvas_get_syllabus` - Obtain course outline document.🛠️ Instructor Control Utilities
- `canvas_create_course` - Instantiate new course entity *(requires account context)*. - `canvas_create_assignment` - Define new assessment tasks. - `canvas_submit_grade` - Input evaluation scores for submissions. - `canvas_enroll_user` - Add authorized participants to roster. - `canvas_list_quizzes` - Inventory of available online tests. - `canvas_create_quiz` - Provision new assessment instances. - `canvas_list_rubrics` - View grading criteria sets.🛡️ Account Governance Utilities (Admin)
- `canvas_get_account` - Retrieve details for a specific organizational node. - `canvas_list_account_courses` - Audit courses within an administrative boundary. - `canvas_create_user` - Inject new identities into the system. - `canvas_list_sub_accounts` - Map organizational topology. - `canvas_create_account_report` - Trigger high-level data extraction jobs.⚠️ Version 2.2.0 Migration Notes
Course Creation Refactoring
Previous (Failing) Schema: javascript { "tool": "canvas_create_course", "arguments": { "name": "Test Course" } } // Fails: No destination
Current (Functional) Schema: javascript { "tool": "canvas_create_course", "arguments": { "account_id": 123, // ✅ Mandatory Context "name": "Test Course", "course_code": "TEST-001" } }
🛣️ Future Development Trajectory
- Phase 2.3: Implementing advanced batch processing and refined search operators.
- Phase 2.4: Introduction of offline data synchronization capabilities and enhanced analytics visualization hooks.
- Phase 3.0: Migration towards a GraphQL abstraction layer and integration of proactive, AI-driven operational insights.
📜 Licensing and Support
Distributed under the MIT License. For assistance, raise an issue on the GitHub repository.
