npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@imazhar101/mcp-canvas-server

v2.1.3

Published

Canvas LMS MCP Server - Provides tools for interacting with Canvas API

Downloads

592

Readme

Canvas MCP Server v2.1.3

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.

Features

🏗️ Modular Architecture

  • Type-safe interfaces for all Canvas entities
  • Service layer for business logic separation
  • Tool layer for MCP tool definitions and handlers
  • Organized by data types (courses, enrollments, users)

📚 Course Management

  • List, create, update, and delete courses
  • Manage course settings and configurations
  • Handle course users and progress tracking
  • Support for all Canvas course properties

👥 Comprehensive Enrollment Utilities

  • List enrollments across courses, sections, or users
  • Create enrollments with full parameter support
  • Bulk enrollment operations for efficiency
  • Enrollment state management (active, invited, concluded, etc.)
  • Accept/reject course invitations
  • Reactivate inactive enrollments
  • Track last attended dates
  • Temporary enrollment status management
  • Role-based filtering and advanced queries

🔐 Admin Management

  • Create and remove account admins with role-based permissions
  • List account administrators with filtering capabilities
  • Manage admin roles and permissions
  • Self-service admin role queries

📁 Files & Folders

  • Browse a course, user, or group Files area, with server-side sorting and content-type filtering
  • Address folders by name via path resolution instead of numeric IDs
  • Organise — rename, move, copy, and create folders
  • Delete files and folders (irreversible; non-empty folders require an explicit force)
  • Upload through Canvas's full three-step handshake
  • Usage rights management for copyright-restricted courses

📊 Grade Change Auditing

  • Query grade changes by assignment, course, student, or grader
  • Advanced filtering with time ranges and multiple criteria
  • Comprehensive audit trails for grade modifications
  • Support for all Canvas grading events

Installation & Usage

Option 1: npm Package (Recommended)

# Install globally (pinned to latest stable)
npm install -g @imazhar101/[email protected]

# Or run directly with npx (pinned)
npx @imazhar101/[email protected]

Option 2: Build from Source

  1. Clone this repository
  2. Install dependencies:
    npm install
  3. Build the project:
    npm run build

Configuration

Single-instance mode (most users)

Set these two env vars and the env parameter becomes optional on every tool call:

export CANVAS_BASE_URL="https://your-school.instructure.com"
export CANVAS_API_TOKEN="your-canvas-api-token"

Multi-environment mode (beta + prod)

Register named environments — the env parameter ("beta" or "prod") is then required on each call:

export CANVAS_BASE_URL_BETA="https://your-school.beta.instructure.com"
export CANVAS_API_TOKEN_BETA="your-beta-token"

export CANVAS_BASE_URL_PROD="https://your-school.instructure.com"
export CANVAS_API_TOKEN_PROD="your-prod-token"

You can also combine both modes — CANVAS_BASE_URL + CANVAS_API_TOKEN registers as "default" and the env parameter stays optional.

Cline MCP Configuration

To use this server with Cline (VS Code extension), add the following to your Cline MCP settings:

File Location:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Windows: %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Configuration:

{
  "mcpServers": {
    "canvas-lms": {
      "command": "npx",
      "args": ["@imazhar101/[email protected]"],
      "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"]
    }
  }
}

Development

Development Mode

For active development with automatic rebuilding:

npm run dev

This runs TypeScript in watch mode, automatically recompiling when files change.

Code Structure

The server follows a modular architecture:

  • Types (src/types/): TypeScript interfaces for Canvas API entities
  • Services (src/services/): Business logic and Canvas API interactions
  • Tools (src/tools/): MCP tool definitions and request handlers
  • Helpers (src/helpers/): Utility functions and shared code

Adding New Features

  1. Define types in the appropriate src/types/*.ts file
  2. Implement service logic in src/services/*-service.ts
  3. Create tool definitions in src/tools/*-tools.ts
  4. Update the main server class to register new tools
  5. Add documentation and examples to this README

Testing

Currently, the server uses manual testing with Canvas API endpoints. For automated testing:

  1. Set up test Canvas instance or use Canvas API mocking
  2. Create test cases for each service method
  3. Test tool integrations with MCP client
  4. Validate error handling and edge cases

Configuration

See the Configuration section above for full details on single-instance and multi-environment modes.

Usage

Running the Server

npm start

MCP Client Configuration

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"
      }
    }
  }
}

Available Tools

Course Tools

Basic Course Operations

  • list_courses - List courses for the current user
  • get_course - Get details of a specific course
  • create_course - Create a new course in an account
  • update_course - Update an existing course
  • delete_course - Delete or conclude a course

Course Users & Settings

  • list_course_users - List users enrolled in a course
  • get_course_user - Get details of a specific user in a course
  • get_user_progress - Get user progress in a course
  • get_course_settings - Get course settings
  • update_course_settings - Update course settings

Enrollment Tools

Core Enrollment Operations

  • list_enrollments - List enrollments for a course, section, or user
  • get_enrollment - Get a specific enrollment by ID
  • create_enrollment - Create a new enrollment in a course or section
  • update_enrollment - Conclude, deactivate, or delete an enrollment

Enrollment Management

  • accept_enrollment - Accept a course invitation
  • reject_enrollment - Reject a course invitation
  • reactivate_enrollment - Reactivate an inactive enrollment
  • add_last_attended_date - Add last attended date to student enrollment
  • get_temporary_enrollment_status - Get temporary enrollment status for a user

Bulk Operations

  • bulk_create_enrollments - Create multiple enrollments at once
  • enroll_students - Enroll multiple users as students in a course
  • remove_enrollments - Remove multiple enrollments from a course

Convenience Methods

  • get_active_students - Get active student enrollments for a course
  • get_course_teachers - Get teacher enrollments for a course
  • get_pending_enrollments - Get pending enrollments (invitations) for a course

Admin Tools

Account Administration

  • make_account_admin - Make a user an account admin with specified role
  • remove_account_admin - Remove admin privileges from a user
  • list_account_admins - List all administrators for an account
  • list_my_admin_roles - List current user's admin roles

Grade Change Log Tools

Audit Queries

  • query_grade_changes_by_assignment - Query grade changes for a specific assignment
  • query_grade_changes_by_course - Query grade changes for a specific course
  • query_grade_changes_by_student - Query grade changes for a specific student
  • query_grade_changes_by_grader - Query grade changes by a specific grader
  • query_grade_changes_advanced - Advanced query with multiple filter criteria

Grading Standards Tools

Grading Standards Management

  • create_grading_standard - Create a new grading standard in a course or account
  • list_grading_standards - List grading standards available in a context
  • get_grading_standard - Get details of a specific grading standard

Rubric Tools

Rubric Management

  • create_rubric - Create a rubric in a course, optionally attaching it to an assignment in the same call
  • update_rubric - Update a rubric (supplying criteria replaces the full set)
  • delete_rubric - Delete a rubric from a course
  • list_rubrics - List active rubrics in a course or account
  • get_rubric - Get a rubric, optionally including assessments and associations
  • get_rubric_used_locations - List the assignments and contexts where a rubric is used

Rubric Associations

  • create_rubric_association - Attach an existing rubric to an assignment, course, or account
  • update_rubric_association - Update an association, e.g. toggle use_for_grading
  • delete_rubric_association - Detach a rubric without deleting the rubric itself

To attach a rubric to an assignment for grading, pass association on create_rubric:

{
  "course_id": "9817",
  "title": "Integrating Practices Rubric",
  "criteria": [
    {
      "description": "Thesis clarity",
      "points": 4,
      "ratings": [
        { "description": "Exceeds", "points": 4 },
        { "description": "Meets", "points": 3 },
        { "description": "Not yet", "points": 0 }
      ]
    }
  ],
  "association": {
    "association_type": "Assignment",
    "association_id": 166773,
    "purpose": "grading",
    "use_for_grading": true
  }
}

Note: GET /courses/:id/rubrics returns 404 rather than an empty array when a course has no rubrics, so list_rubrics surfaces a "resource does not exist" error in that case.

Discussion & Announcement Tools

Announcements in Canvas are discussion topics with is_announcement: true — the same tools cover both.

Topic Management

  • list_discussion_topics - List topics in a course (pass only_announcements: true for announcements only)
  • get_discussion_topic - Get a single topic
  • create_discussion_topic - Create a topic, or an announcement with is_announcement: true
  • update_discussion_topic - Update title, body, publish state, schedule (delayed_post_at), lock state, or section scoping
  • delete_discussion_topic - Delete a topic or announcement
  • list_announcements - List announcements across one or more courses via Canvas's dedicated /announcements endpoint

Entries

  • get_discussion_topic_view - Full nested tree of entries and replies in one call
  • list_discussion_topic_entries - Top-level entries in a topic
  • list_discussion_entry_replies - Replies to a specific entry
  • post_discussion_entry - Post a top-level entry
  • post_discussion_entry_reply - Reply to an entry
  • mark_discussion_topic_read - Mark a topic and its entries read

Edit an announcement's body and lock replies:

{
  "course_id": "9817",
  "topic_id": "42315",
  "message": "<p>Updated: office hours moved to Thursday 2pm.</p>",
  "locked": true
}

Schedule an announcement for later:

{
  "course_id": "9817",
  "topic_id": "42315",
  "delayed_post_at": "2026-08-12T15:00:00Z"
}

Notes, all verified against Canvas beta:

  • list_announcements defaults to a 14-day window on Canvas's side. Pass start_date to look further back, or use list_discussion_topics with only_announcements: true for an unbounded per-course list.
  • Setting delayed_post_at on an already-posted announcement does not change published (stays true) or posted_at (stays in the past), but it does hide the announcement from students. Don't read published as "students can see it" — list_announcements with active_only: true is the reliable visibility check.
  • Clear a schedule by sending delayed_post_at: ""; the topic returns to active immediately.
  • delete_discussion_topic returns an envelope — { discussion_topic: { ..., workflow_state: "deleted" } }, not a bare object.

File & Folder Tools

Files and folders live in a course, user, or group context. Rather than one tool per context, the context-scoped tools take a context_type + context_id pair; tools that address a specific file or folder take its ID directly.

Browsing & Sorting

  • list_files - List files in a context's Files area, with sorting and filtering
  • list_folder_files - List the files directly inside one folder
  • get_file - Get a single file's metadata
  • get_file_public_url - Short-lived signed preview URL, usable without a Canvas session
  • list_folders - Every folder in a context, flattened
  • list_subfolders - The folders directly inside one folder
  • get_folder - Get a single folder by ID
  • resolve_folder_path - Resolve a human path to the folder chain from root to target
  • get_files_quota - Storage quota and usage in bytes

Canvas has no sort endpoint — sorting is sort + order on the list calls:

{
  "context_type": "course",
  "context_id": "9817",
  "sort": "updated_at",
  "order": "desc",
  "content_types": ["application/pdf"]
}

resolve_folder_path is how you start browsing without knowing any folder ID. Omit full_path for the context root; the last element of the response is the target folder.

Organising

  • create_folder - Create a folder (nest it with parent_folder_id or parent_folder_path)
  • update_file - Rename and/or move a file, or change its lock/visibility state
  • update_folder - Rename and/or move a folder
  • copy_file / copy_folder - Copy into a destination folder
  • upload_file - Upload via Canvas's three-step handshake (content_text or content_base64)

Rename and move are the same call — parent_folder_id moves it, name renames it, and both may be sent together:

{
  "file_id": "555",
  "name": "Syllabus v2.pdf",
  "parent_folder_id": "77"
}

Deleting

  • delete_file - Delete a file. replace: true repoints existing references at the same-named file in the parent course instead of breaking them
  • delete_folder - Delete a folder. Canvas refuses unless it is empty or force: true is set, which deletes every file and subfolder inside it

Both are effectively irreversible from the API — there is no restore tool. If you grant this server's tools selectively, these two are worth separating from the rest.

Usage Rights

Courses with "Require copyright info for files" enabled leave uploads unpublished until rights are set, so bulk file work needs these:

  • set_usage_rights - Apply copyright/licence info to files or folders (folders apply recursively)
  • remove_usage_rights - Clear it
  • list_content_licenses - Licence IDs valid for set_usage_rights in this context

Note: upload_user_file is deprecated. It only performed step 1 of Canvas's upload handshake — POSTing the metadata and returning the upload ticket — so it never transferred any bytes. Use upload_file.

Page Tools

Course Page Management

  • list_course_pages - List pages in a course with sorting and filtering options
  • get_course_page - Get details of a specific course page
  • create_course_page - Create a new page in a course
  • update_course_page - Update an existing course page
  • delete_course_page - Delete a course page

Login Tools

User Login Management

  • list_user_logins - List user logins for an account or specific user
  • create_user_login - Create a new login for an existing user
  • edit_user_login - Edit an existing user login
  • delete_user_login - Delete a user login

Authentication Provider Tools

Authentication Provider Management

  • list_authentication_providers - List authentication providers for an account
  • get_authentication_provider - Get details of a specific authentication provider
  • create_authentication_provider - Create a new authentication provider
  • update_authentication_provider - Update an existing authentication provider
  • delete_authentication_provider - Delete an authentication provider

LTI Launch Definition Tools

LTI Integration Management

  • list_lti_launch_definitions - List LTI launch definitions for a course or account

Architecture

Directory Structure

src/
├── 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
│   └── file.ts      # File and folder 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
│   └── file-service.ts       # File and folder 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
│   └── file-tools.ts         # File and folder tool definitions
└── index.ts         # Main server entry point

Key Design Principles

  1. Separation of Concerns: Types, services, and tools are clearly separated
  2. Type Safety: Full TypeScript support with comprehensive interfaces
  3. Modularity: Easy to extend with new Canvas API endpoints
  4. Error Handling: Comprehensive error handling with meaningful messages
  5. Canvas API Compliance: Follows Canvas API patterns and conventions

Enrollment Features Deep Dive

Supported Enrollment Types

  • StudentEnrollment - Regular students
  • TeacherEnrollment - Course instructors
  • TaEnrollment - Teaching assistants
  • ObserverEnrollment - Course observers (parents, mentors)
  • DesignerEnrollment - Course designers

Enrollment States

  • active - Active enrollment
  • invited - Pending invitation
  • creation_pending - Being created
  • deleted - Removed enrollment
  • rejected - Declined invitation
  • completed - Concluded enrollment
  • inactive - Temporarily disabled

Advanced Filtering

  • Filter by enrollment type and state
  • SIS integration support
  • Grading period filtering
  • Custom role support
  • Date range filtering

Bulk Operations

The server supports efficient bulk operations for:

  • Creating multiple enrollments simultaneously
  • Removing multiple enrollments
  • Enrolling multiple students with consistent settings

Examples

List Active Students in a Course

// Using the list_enrollments tool
{
  "context": "course",
  "context_id": "12345",
  "type": ["StudentEnrollment"],
  "state": ["active"],
  "include": ["user"]
}

Bulk Enroll Students

// Using the enroll_students tool
{
  "course_id": "12345",
  "user_ids": ["user1", "user2", "user3"],
  "enrollment_state": "active",
  "notify": true
}

Create Course with Settings

// 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
}

Make Account Admin

// Using the make_account_admin tool
{
  "account_id": "1",
  "user_id": 12345,
  "role_id": 2,
  "send_confirmation": true
}

Query Grade Changes by Course

// 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"
}

Advanced Grade Change Query

// 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"
}

Create Grading Standard

// 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}
  ]
}

List Grading Standards

// Using the list_grading_standards tool
{
  "context_type": "course",
  "context_id": "12345"
}

Get Grading Standard Details

// Using the get_grading_standard tool
{
  "context_type": "course",
  "context_id": "12345",
  "grading_standard_id": "5"
}

List Course Pages

// Using the list_course_pages tool
{
  "course_id": "12345",
  "sort": "title",
  "order": "asc",
  "published": true,
  "include": ["body"]
}

Create Course Page

// 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
}

List User Logins

// Using the list_user_logins tool
{
  "user_id": "12345"
}

Create Authentication Provider

// 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"
}

List LTI Launch Definitions

// Using the list_lti_launch_definitions tool
{
  "course_id": "12345",
  "placements": ["course_navigation", "assignment_menu"],
  "only_visible": true
}

Error Handling

The server provides comprehensive error handling:

  • Canvas API errors are properly formatted and returned
  • Network errors are handled gracefully
  • Invalid parameters are validated before API calls
  • Bulk operations continue processing even if individual items fail

Troubleshooting

Common Issues

Authentication Errors

Problem: 401 Unauthorized or Invalid access token

Solutions:

  • Verify your CANVAS_API_TOKEN is correct and has not expired
  • Ensure the token has appropriate permissions for the operations you're attempting
  • Check that your Canvas instance URL in CANVAS_BASE_URL is correct
  • Test the token directly with Canvas API using curl:
    curl -H "Authorization: Bearer YOUR_TOKEN" https://your-canvas-instance.instructure.com/api/v1/users/self

Rate Limiting

Problem: 403 Forbidden with rate limit messages

Solutions:

  • Canvas API has rate limits (typically 3000 requests per hour per token)
  • Implement delays between bulk operations
  • Consider using multiple API tokens for high-volume operations
  • Monitor the X-Rate-Limit-Remaining header in responses

Network Connectivity

Problem: Connection timeouts or network errors

Solutions:

  • Verify your Canvas instance is accessible from your network
  • Check firewall settings if running in corporate environment
  • Test basic connectivity: ping your-canvas-instance.instructure.com
  • Verify SSL certificates are valid

Tool Not Found Errors

Problem: Unknown tool or Method not found errors

Solutions:

  • Ensure you're using the exact tool name from the documentation
  • Check that the server is running the latest version
  • Verify the tool is properly registered in the main server class
  • Restart the MCP server if tools seem outdated

Permission Errors

Problem: Insufficient privileges or specific Canvas permission errors

Solutions:

  • Verify your Canvas user account has the required permissions
  • Admin tools require account admin privileges
  • Course operations require appropriate course-level permissions
  • Some operations require specific Canvas feature flags to be enabled

Data Format Issues

Problem: Invalid parameter or malformed request errors

Solutions:

  • Check that all required parameters are provided
  • Verify date formats use ISO 8601 format (e.g., 2024-01-15T00:00:00Z)
  • Ensure numeric IDs are passed as strings, not numbers
  • Validate array parameters contain expected value types

Debugging Tips

  1. Enable Debug Logging: Check MCP client logs for detailed error messages
  2. Test Individual Tools: Test problematic tools in isolation
  3. Validate Canvas Data: Verify that referenced courses, users, etc. exist in Canvas
  4. Check Canvas API Documentation: Reference Canvas API docs for parameter requirements
  5. Monitor Canvas Status: Check Canvas Status Page for service issues

Getting Help

  • Review Canvas API documentation for specific endpoint requirements
  • Check Canvas community forums for common integration issues
  • Verify Canvas instance configuration with your Canvas administrator
  • Test operations directly in Canvas UI to confirm permissions and data availability

Contributing

  1. Follow the existing modular architecture
  2. Add new types to the appropriate type files
  3. Implement business logic in service classes
  4. Create tool definitions in tool classes
  5. Update this README with new features

License

MIT License - see LICENSE file for details.

Changelog

v2.1.3

  • Fix: list tools returned only Canvas's first page (10 records) — e.g. list_assignments showed 10 of 21 assignments with no hint that more existed. Every list GET now follows the Link: rel="next" header and returns the full result set, requesting per_page=100 to keep round-trips low. Capped at 50 pages (5,000 records); hitting the cap logs a warning
  • Passing an explicit page still returns just that single page
  • Existing fetch_all flags keep working (now redundant)
  • No tool count change, no breaking changes

v2.1.2

  • Fix: create_assignment and update_assignment now expose external_tool_tag_attributes (url, new_tab, content_type, content_id, external_data, iframe). The service layer already forwarded it, but the field was absent from both input schemas, so an External Tool (LTI) assignment could be created with submission_types: ["external_tool"] yet had no launch URL — it had to be pasted by hand in the Canvas UI
  • Fix: AssignmentCreateParams.external_tool_tag_attributes was typed string; it is the nested object Canvas documents
  • Note: resource_link_id is read-only on write — send url, or bind to a registered tool with content_type: "context_external_tool" + content_id
  • No tool count change, no breaking changes

v2.1.1

  • Fix: v2.1.0 failed to start when installed from npm — ERR_MODULE_NOT_FOUND: Cannot find package '@opentelemetry/sdk-node', exit 1, no tools served. The shared telemetry module statically imported six @opentelemetry/* packages that are declared only in the monorepo root, so they resolved through hoisting inside the repo but were absent from the published tarball. They are now resolved at runtime, and tracing silently switches off when they are missing
  • Use v2.1.1, not v2.1.0. The Files & Folders API is unchanged between them; v2.1.0 simply could not start to serve it

v2.1.0

  • Feature: Files & Folders API — 20 tools. The server previously had no Files coverage at all, so an agent could read a course's assignments, pages and modules but could not see, sort, organise or delete anything in its Files section
  • Feature: list_files exposes Canvas's server-side sort/order (name, size, created_at, updated_at, content_type, user) plus search_term and content-type filters — there is no separate sort endpoint in the Canvas API
  • Feature: resolve_folder_path maps a human path ("Week 1/Readings") to the folder chain, so folders are addressable by name rather than by numeric ID
  • Feature: upload_file implements Canvas's full three-step upload handshake (metadata POST → multipart POST to the pre-signed store → confirmation), handling both the inst-fs 201 and the older S3 redirect
  • Deprecated: upload_user_file only ever performed step 1 of that handshake, so it returned an upload ticket instead of uploading anything. Left in place, marked deprecated in its description; use upload_file
  • Note: delete_file and delete_folder are effectively irreversible from the API. delete_folder requires force: true for a non-empty folder, which takes every descendant with it. Consider granting these separately from the rest of the Canvas tool surface
  • Tool count 207 → 227. No breaking changes

v2.0.10

  • Feature: Announcement editing — update_discussion_topic (PUT) and delete_discussion_topic (DELETE). Announcements could previously be created and read but never changed; there was no update or delete tool for discussion topics of any kind
  • Feature: list_announcements wrapping Canvas's dedicated /api/v1/announcements endpoint — spans multiple courses, supports start_date/end_date, active_only, latest_only
  • Docs: Added a Discussion & Announcement Tools section (the discussion tools shipped in v2.0.7 were never documented)
  • Note: delayed_post_at on an already-posted announcement hides it from students but leaves published: true and posted_at unchanged — check visibility with list_announcements + active_only, not published
  • Note: delete_discussion_topic returns an envelope ({discussion_topic}), consistent with the rubric endpoints
  • Tool count 204 → 207. No breaking changes

v2.0.9

  • Docs: Documented the Rubrics API tools, added changelog entries for v2.0.7 and v2.0.8, and updated the pinned version in the install examples
  • No code changes — identical runtime behaviour to v2.0.8

v2.0.8

  • Feature: Rubrics API — 9 tools covering the full lifecycle (create_rubric, update_rubric, delete_rubric, list_rubrics, get_rubric, get_rubric_used_locations, create_rubric_association, update_rubric_association, delete_rubric_association)
  • Feature: create_rubric can attach a rubric to an assignment in the same call via association (association_type: "Assignment", purpose: "grading")
  • Fix: skip_updating_points_possible is documented by Canvas under rubric[...] but is only honoured under rubric_association[...] — sent per the docs it is silently ignored and the assignment's points_possible is overwritten by the rubric total
  • Fix: Corrected rubric response types — these endpoints return envelopes ({rubric, rubric_association}), not bare objects
  • Note: GET /courses/:id/rubrics returns 404 rather than [] when a course has no rubrics; treat 404 as empty
  • Tool count 195 → 204. No breaking changes

v2.0.7

  • Feature: Discussion Topics API — list and read course discussion topics and entries
  • Fix: Link-header pagination via fetchAllPages() — list endpoints previously truncated silently at Canvas's per_page=10 default (observed: 10 of 462 assignment submissions returned)
  • Tool count 186 → 195. No breaking changes
  • Not published to npm (publish failed on an expired token); both changes ship in v2.0.8

v2.0.6

  • Fix: Removed hardcoded institution-specific URLs — no URLs are bundled in the package
  • Feature: Single-instance mode via CANVAS_BASE_URL + CANVAS_API_TOKEN — env param optional
  • Feature: Multi-env mode via CANVAS_BASE_URL_BETA/PROD + tokens — env param required with enum
  • Feature: Both modes can coexist; default env always auto-resolves when env is omitted

v2.0.5

  • Security: Upgraded @modelcontextprotocol/sdk from 0.6.0 → 1.29.0 (fixes ReDoS and DNS rebinding vulnerabilities)
  • Security: Upgraded axios from 1.6.0 → 1.16.1 (fixes 20 CVEs including SSRF, prototype pollution, CRLF injection, DoS, and auth bypass)
  • No breaking changes to tool API or behaviour

v2.0.0

  • Complete architectural refactor for modularity
  • Added comprehensive enrollment utilities
  • Improved type safety with detailed interfaces
  • Added bulk enrollment operations
  • Enhanced error handling
  • Added convenience methods for common operations
  • NEW: Admin management tools for account administration
  • NEW: Grade change log auditing capabilities
  • NEW: Assignment management with full CRUD operations
  • NEW: Submission handling and grading tools
  • NEW: Module and content management
  • NEW: External tool (LTI) integration
  • NEW: Quiz creation and management
  • NEW: User management and profile operations
  • NEW: Grading standards management with full CRUD operations
  • Expanded to support all major Canvas API endpoints
  • Added comprehensive type definitions for all Canvas entities

v1.0.0

  • Initial Canvas MCP server implementation
  • Basic course and user operations