
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@imazhar101/mcp-canvas-server
Advanced tools
Canvas LMS MCP Server - Provides tools for interacting with Canvas API
A comprehensive Model Context Protocol (MCP) server for interacting with Canvas LMS API. This server provides a modular architecture with extensive enrollment management utilities and course operations.
# Install globally
npm install -g @imazhar101/mcp-canvas-server
# Or run directly with npx
npx @imazhar101/mcp-canvas-server
npm install
npm run build
Set the following environment variables:
export CANVAS_BASE_URL="https://your-school.instructure.com"
export CANVAS_API_TOKEN="your-canvas-api-token"
To use this server with Cline (VS Code extension), add the following to your Cline MCP settings:
File Location:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Configuration:
{
"mcpServers": {
"canvas-lms": {
"command": "npx",
"args": ["@imazhar101/mcp-canvas-server"],
"env": {
"CANVAS_BASE_URL": "https://your-school.instructure.com",
"CANVAS_API_TOKEN": "your-canvas-api-token"
},
"disabled": false,
"alwaysAllow": ["list_courses", "get_course", "list_enrollments"]
}
}
}
For active development with automatic rebuilding:
npm run dev
This runs TypeScript in watch mode, automatically recompiling when files change.
The server follows a modular architecture:
src/types/
): TypeScript interfaces for Canvas API entitiessrc/services/
): Business logic and Canvas API interactionssrc/tools/
): MCP tool definitions and request handlerssrc/helpers/
): Utility functions and shared codesrc/types/*.ts
filesrc/services/*-service.ts
src/tools/*-tools.ts
Currently, the server uses manual testing with Canvas API endpoints. For automated testing:
Set the following environment variables:
export CANVAS_BASE_URL="https://your-canvas-instance.instructure.com"
export CANVAS_API_TOKEN="your_canvas_api_token"
npm start
Add to your MCP client configuration:
{
"mcpServers": {
"canvas": {
"command": "node",
"args": ["/path/to/canvas-server/build/index.js"],
"env": {
"CANVAS_BASE_URL": "https://your-canvas-instance.instructure.com",
"CANVAS_API_TOKEN": "your_canvas_api_token"
}
}
}
}
list_courses
- List courses for the current userget_course
- Get details of a specific coursecreate_course
- Create a new course in an accountupdate_course
- Update an existing coursedelete_course
- Delete or conclude a courselist_course_users
- List users enrolled in a courseget_course_user
- Get details of a specific user in a courseget_user_progress
- Get user progress in a courseget_course_settings
- Get course settingsupdate_course_settings
- Update course settingslist_enrollments
- List enrollments for a course, section, or userget_enrollment
- Get a specific enrollment by IDcreate_enrollment
- Create a new enrollment in a course or sectionupdate_enrollment
- Conclude, deactivate, or delete an enrollmentaccept_enrollment
- Accept a course invitationreject_enrollment
- Reject a course invitationreactivate_enrollment
- Reactivate an inactive enrollmentadd_last_attended_date
- Add last attended date to student enrollmentget_temporary_enrollment_status
- Get temporary enrollment status for a userbulk_create_enrollments
- Create multiple enrollments at onceenroll_students
- Enroll multiple users as students in a courseremove_enrollments
- Remove multiple enrollments from a courseget_active_students
- Get active student enrollments for a courseget_course_teachers
- Get teacher enrollments for a courseget_pending_enrollments
- Get pending enrollments (invitations) for a coursemake_account_admin
- Make a user an account admin with specified roleremove_account_admin
- Remove admin privileges from a userlist_account_admins
- List all administrators for an accountlist_my_admin_roles
- List current user's admin rolesquery_grade_changes_by_assignment
- Query grade changes for a specific assignmentquery_grade_changes_by_course
- Query grade changes for a specific coursequery_grade_changes_by_student
- Query grade changes for a specific studentquery_grade_changes_by_grader
- Query grade changes by a specific graderquery_grade_changes_advanced
- Advanced query with multiple filter criteriacreate_grading_standard
- Create a new grading standard in a course or accountlist_grading_standards
- List grading standards available in a contextget_grading_standard
- Get details of a specific grading standardlist_course_pages
- List pages in a course with sorting and filtering optionsget_course_page
- Get details of a specific course pagecreate_course_page
- Create a new page in a courseupdate_course_page
- Update an existing course pagedelete_course_page
- Delete a course pagelist_user_logins
- List user logins for an account or specific usercreate_user_login
- Create a new login for an existing useredit_user_login
- Edit an existing user logindelete_user_login
- Delete a user loginlist_authentication_providers
- List authentication providers for an accountget_authentication_provider
- Get details of a specific authentication providercreate_authentication_provider
- Create a new authentication providerupdate_authentication_provider
- Update an existing authentication providerdelete_authentication_provider
- Delete an authentication providerlist_lti_launch_definitions
- List LTI launch definitions for a course or accountsrc/
├── types/ # TypeScript interfaces and types
│ ├── index.ts # Common types and base interfaces
│ ├── course.ts # Course-related types
│ ├── enrollment.ts # Enrollment-related types
│ ├── user.ts # User-related types
│ ├── assignment.ts # Assignment-related types
│ ├── submission.ts # Submission-related types
│ ├── module.ts # Module-related types
│ ├── external-tool.ts # External tool types
│ ├── quiz.ts # Quiz-related types
│ ├── admin.ts # Admin-related types
│ ├── grade-change-log.ts # Grade change log types
│ └── grading-standard.ts # Grading standard types
├── services/ # Business logic layer
│ ├── course-service.ts # Course operations
│ ├── enrollment-service.ts # Enrollment operations
│ ├── user-service.ts # User operations
│ ├── assignment-service.ts # Assignment operations
│ ├── submission-service.ts # Submission operations
│ ├── module-service.ts # Module operations
│ ├── external-tool-service.ts # External tool operations
│ ├── quiz-service.ts # Quiz operations
│ ├── admin-service.ts # Admin operations
│ ├── grade-change-log-service.ts # Grade change log operations
│ └── grading-standard-service.ts # Grading standard operations
├── tools/ # MCP tool definitions and handlers
│ ├── course-tools.ts # Course tool definitions
│ ├── enrollment-tools.ts # Enrollment tool definitions
│ ├── user-tools.ts # User tool definitions
│ ├── assignment-tools.ts # Assignment tool definitions
│ ├── submission-tools.ts # Submission tool definitions
│ ├── module-tools.ts # Module tool definitions
│ ├── external-tool-tools.ts # External tool definitions
│ ├── quiz-tools.ts # Quiz tool definitions
│ ├── admin-tools.ts # Admin tool definitions
│ ├── grade-change-log-tools.ts # Grade change log tool definitions
│ └── grading-standard-tools.ts # Grading standard tool definitions
└── index.ts # Main server entry point
StudentEnrollment
- Regular studentsTeacherEnrollment
- Course instructorsTaEnrollment
- Teaching assistantsObserverEnrollment
- Course observers (parents, mentors)DesignerEnrollment
- Course designersactive
- Active enrollmentinvited
- Pending invitationcreation_pending
- Being createddeleted
- Removed enrollmentrejected
- Declined invitationcompleted
- Concluded enrollmentinactive
- Temporarily disabledThe server supports efficient bulk operations for:
// Using the list_enrollments tool
{
"context": "course",
"context_id": "12345",
"type": ["StudentEnrollment"],
"state": ["active"],
"include": ["user"]
}
// Using the enroll_students tool
{
"course_id": "12345",
"user_ids": ["user1", "user2", "user3"],
"enrollment_state": "active",
"notify": true
}
// Using the create_course tool
{
"account_id": "1",
"name": "Introduction to Programming",
"course_code": "CS101",
"start_at": "2024-01-15T00:00:00Z",
"end_at": "2024-05-15T00:00:00Z",
"default_view": "modules",
"grading_standard_id": 5,
"offer": true
}
// Using the make_account_admin tool
{
"account_id": "1",
"user_id": 12345,
"role_id": 2,
"send_confirmation": true
}
// Using the query_grade_changes_by_course tool
{
"course_id": "12345",
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-12-31T23:59:59Z"
}
// Using the query_grade_changes_advanced tool
{
"course_id": 12345,
"student_id": 67890,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-12-31T23:59:59Z"
}
// Using the create_grading_standard tool
{
"context_type": "course",
"context_id": "12345",
"title": "Standard Letter Grades",
"points_based": false,
"scaling_factor": 1.0,
"grading_scheme_entry": [
{"name": "A", "value": 94},
{"name": "A-", "value": 90},
{"name": "B+", "value": 87},
{"name": "B", "value": 84},
{"name": "B-", "value": 80},
{"name": "C+", "value": 77},
{"name": "C", "value": 74},
{"name": "C-", "value": 70},
{"name": "D+", "value": 67},
{"name": "D", "value": 64},
{"name": "D-", "value": 61},
{"name": "F", "value": 0}
]
}
// Using the list_grading_standards tool
{
"context_type": "course",
"context_id": "12345"
}
// Using the get_grading_standard tool
{
"context_type": "course",
"context_id": "12345",
"grading_standard_id": "5"
}
// Using the list_course_pages tool
{
"course_id": "12345",
"sort": "title",
"order": "asc",
"published": true,
"include": ["body"]
}
// Using the create_course_page tool
{
"course_id": "12345",
"title": "Course Syllabus",
"body": "<h1>Welcome to the Course</h1><p>This is the course syllabus...</p>",
"published": true,
"front_page": false
}
// Using the list_user_logins tool
{
"user_id": "12345"
}
// Using the create_authentication_provider tool
{
"account_id": "1",
"auth_type": "saml",
"idp_entity_id": "https://example.com/saml/metadata",
"log_in_url": "https://example.com/saml/login",
"log_out_url": "https://example.com/saml/logout",
"certificate_fingerprint": "aa:bb:cc:dd:ee:ff",
"identifier_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
}
// Using the list_lti_launch_definitions tool
{
"course_id": "12345",
"placements": ["course_navigation", "assignment_menu"],
"only_visible": true
}
The server provides comprehensive error handling:
Problem: 401 Unauthorized
or Invalid access token
Solutions:
CANVAS_API_TOKEN
is correct and has not expiredCANVAS_BASE_URL
is correctcurl -H "Authorization: Bearer YOUR_TOKEN" https://your-canvas-instance.instructure.com/api/v1/users/self
Problem: 403 Forbidden
with rate limit messages
Solutions:
X-Rate-Limit-Remaining
header in responsesProblem: Connection timeouts or network errors
Solutions:
ping your-canvas-instance.instructure.com
Problem: Unknown tool
or Method not found
errors
Solutions:
Problem: Insufficient privileges
or specific Canvas permission errors
Solutions:
Problem: Invalid parameter or malformed request errors
Solutions:
2024-01-15T00:00:00Z
)MIT License - see LICENSE file for details.
FAQs
Canvas LMS MCP Server - Provides tools for interacting with Canvas API
The npm package @imazhar101/mcp-canvas-server receives a total of 1 weekly downloads. As such, @imazhar101/mcp-canvas-server popularity was classified as not popular.
We found that @imazhar101/mcp-canvas-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.