Skip to main content
Glama

Canvas MCP Server

npm version license MCP

Connect AI assistants to Canvas LMS — manage courses, grade submissions, edit pages, and analyze rubrics through natural conversation.

Quick Start

  1. Get a Canvas API token — Canvas → Account → Settings → Approved Integrations → New Access Token

  2. Install via Claude Desktop Extension or npx @r-huijts/canvas-mcp

  3. Try a prompt — "List all my active Canvas courses"

Related MCP server: Canvas MCP Server

Table of Contents

Features

  • Courses — list active courses, post announcements

  • Assignments — create, update, delete assignments and assignment groups; bulk date updates

  • Submissions — grade work, post feedback, download submission files

  • Rubrics — view rubrics, analyze statistics, attach rubrics to assignments

  • Students — enrollment lists with privacy-first anonymization

  • Sections — list sections and section-filtered submissions

  • Modules — full module and module-item CRUD

  • Files — browse the course Files section: folder trees, file lists, and per-folder contents

  • Pages — edit content, manage revisions, and use the styleguide system (generate-styleguide, patch-page-content)

  • Quizzes — full quiz, question, and question-group CRUD

  • Quiz results — per-student answers, item analysis, report generation, and regrading

  • ePortfolios — list and read student ePortfolios

  • Prompts — analyze-rubric-statistics for multi-assignment rubric visualizations

  • Performance — ETag-based response caching to reduce API load and token use

69 tools and 1 prompt in total. See docs/TOOLS.md for the full parameter reference.

Prerequisites

  • Node.js v16 or higher (for npm/source installs; not required for the Desktop Extension)

  • A Canvas API token with access to the courses you intend to manage

  • Your Canvas instance URL (e.g. https://yourschool.instructure.com)

Note: The server defaults to https://fhict.instructure.com if CANVAS_BASE_URL is not set. Set this variable to your own institution's Canvas URL.

Installation

Option 1: Desktop Extension (Easiest)

One-click installation with Claude Desktop Extensions:

  1. Download the latest extension from GitHub Releases (.mcpb or .dxt format, depending on the release)

  2. Open the file with Claude Desktop (double-click or drag-and-drop)

  3. Click "Install"

  4. Configure your Canvas API token and base URL through the Claude Desktop UI

Benefits: no terminal required, secure token storage in the OS keychain, bundled dependencies, cross-platform (macOS and Windows).

To build the extension yourself, see DESKTOP_EXTENSION.md.

npm install -g @r-huijts/canvas-mcp

Or run directly without installing:

npx @r-huijts/canvas-mcp

Option 3: From Source

git clone https://github.com/r-huijts/canvas-mcp
cd canvas-mcp
npm install
cp .env.example .env   # then edit with your credentials
npm run build
npm start

For development with auto-reload:

npm run dev

Configuration

Set these environment variables (via .env file, MCP client config, or shell):

Variable

Required

Description

CANVAS_API_TOKEN

Yes

Personal access token from Canvas

CANVAS_BASE_URL

No

Your Canvas instance URL (default: https://fhict.instructure.com)

See .env.example for a template.

Getting a Canvas API Token

  1. Log in to your Canvas instance

  2. Go to Account → Settings → Approved Integrations

  3. Click + New Access Token

  4. Copy the token — you won't be able to see it again

Your token must belong to a user with teacher (or equivalent) access to the courses you want to manage. Canvas personal access tokens inherit the permissions of the account that created them.

Claude Desktop Integration

  1. Open Claude Desktop's configuration file:

    macOS:

    code ~/Library/Application\ Support/Claude/claude_desktop_config.json

    Windows:

    code %AppData%\Claude\claude_desktop_config.json
  2. Add the Canvas MCP server:

    NPM package (recommended):

    {
      "mcpServers": {
        "canvas": {
          "command": "npx",
          "args": ["-y", "@r-huijts/canvas-mcp"],
          "env": {
            "CANVAS_API_TOKEN": "your_token_here",
            "CANVAS_BASE_URL": "https://your-canvas-instance.com"
          }
        }
      }
    }

    From source:

    {
      "mcpServers": {
        "canvas": {
          "command": "node",
          "args": ["/absolute/path/to/canvas-mcp/dist/index.js"],
          "env": {
            "CANVAS_API_TOKEN": "your_token_here",
            "CANVAS_BASE_URL": "https://your-canvas-instance.com"
          }
        }
      }
    }
  3. Restart Claude Desktop

The -y flag tells npx to accept the package installation prompt automatically.

Other MCP Clients

Any MCP client that supports stdio transport can use the same configuration pattern. Replace the config file path with your client's equivalent:

{
  "mcpServers": {
    "canvas": {
      "command": "npx",
      "args": ["-y", "@r-huijts/canvas-mcp"],
      "env": {
        "CANVAS_API_TOKEN": "your_token_here",
        "CANVAS_BASE_URL": "https://your-canvas-instance.com"
      }
    }
  }
}

This works with Cursor, VS Code MCP extensions, and other stdio-based clients. Consult your client's MCP documentation for where to place the config file.

Usage Examples

Copy-paste these prompts into your AI assistant after connecting the server:

List all my active Canvas courses
Post an announcement to course 12345 titled "Week 3 Update" with a summary of this week's topics
Show rubric statistics for assignment 67890 in course 12345
List all folders and files in the Files section of course 12345
Generate a styleguide for course 12345, then patch the syllabus page to match it
List all students in course 12345 with their actual names and emails

Student Data Privacy

This server includes privacy-first anonymization for student data. By default, student names and emails are pseudonymized; you can request real identities using natural language.

Default behavior:

  • Names become Student 1, Student 2, etc.

  • Emails become student1@example.com, student2@example.com

  • The same student always gets the same pseudonym across calls

  • Teacher and admin names are never anonymized

Requesting real data:

List all students in course 123, but show their actual names and emails

Affected tools: list-students, list-assignments (with submission data), list-assignment-submissions, list-section-submissions, list-rubric-assessments, get-submission-documents

Each affected tool accepts an anonymous parameter (default: true). Your AI assistant sets anonymous: false when you ask for real names.

The anonymization system targets student privacy while preserving educational context:

  • Students are the protected population whose privacy needs safeguarding

  • Knowing which instructor provided feedback is pedagogically valuable

  • Comments include an author.role field — only role === 'student' authors are anonymized

Example with anonymization enabled:

✅ "Excellent analysis! - Prof. Johnson"
❌ "I found this confusing - Student 1"

If you need full anonymization including staff, you can modify the logic in src/anonymizer.ts.

Tool Reference

Category

Count

Tools

Courses

2

list-courses, post-announcement

Students

1

list-students

Assignments

5

list-assignments, get-assignment, create-assignment, update-assignment, delete-assignment

Assignment Groups

3

list-assignment-groups, create-assignment-group, bulk-update-assignment-dates

Submissions

6

list-assignment-submissions, grade-submission, post-submission-comment, get-submission-documents, get-submission-file-info, download-submission-file

Sections

2

list-sections, list-section-submissions

Rubrics

4

list-rubrics, get-rubric-statistics, list-rubric-assessments, attach-rubric-to-assignment

Modules

10

list-modules, list-module-items, toggle-module-publish, create-module, update-module, delete-module, get-module-item, create-module-item, update-module-item, delete-module-item

Files

3

list-folders, list-files, list-folder-contents

Pages

9

list-pages, get-page-content, update-page-content, list-page-revisions, revert-page-revision, patch-page-content, apply-page-changes, generate-styleguide, get-styleguide

Quizzes

15

list-quizzes, get-quiz, create-quiz, update-quiz, delete-quiz, list-quiz-questions, get-quiz-question, create-quiz-question, update-quiz-question, delete-quiz-question, list-quiz-question-groups, get-quiz-question-group, create-quiz-question-group, update-quiz-question-group, delete-quiz-question-group

Quiz Results

6

list-quiz-submissions, get-quiz-statistics, get-quiz-submission-answers, get-quiz-report, get-quiz-submission-events, update-quiz-submission-score

ePortfolios

3

list-eportfolios, get-eportfolio, get-eportfolio-pages

Full parameter reference: docs/TOOLS.md

Available Prompts

analyze-rubric-statistics

Analyzes rubric statistics for formative assignments in a course and creates visualizations.

  • Required: courseName (string)

  • Creates grouped stacked bar and grouped bar charts across assignments and criteria

  • Includes progression analysis and trend identification

Troubleshooting

Server not appearing in Claude Desktop

  • Verify JSON syntax in your config file

  • Use absolute paths for source installs (dist/index.js, not build/index.js)

  • Ensure your Canvas API token is valid

  • Restart Claude Desktop

Connection errors

  • Confirm your token has access to the target courses

  • Verify CANVAS_BASE_URL points to your institution's Canvas instance

  • Check MCP logs:

    # macOS
    tail -f ~/Library/Logs/Claude/mcp*.log
    # Windows
    type %AppData%\Claude\Logs\mcp*.log

NPX issues

  • On Windows, ensure npm/npx are on your PATH

  • For permission errors, try running Claude Desktop as administrator (Windows)

  • Corporate networks may require npm proxy configuration

Debug logging

The server logs errors to stderr. Redirect when running manually:

node dist/index.js 2> debug.log

Performance & Caching

The server caches stable Canvas API responses to avoid redundant fetches and reduce token consumption.

How it works:

  • First request stores the response body and any ETag or Last-Modified header

  • Subsequent requests send conditional GETs (If-None-Match / If-Modified-Since); Canvas returns 304 Not Modified when data is unchanged

  • If Canvas omits validator headers, a 30-minute TTL is used as fallback

  • Write operations (POST, PUT, DELETE) evict affected cache entries

What is never cached:

  • Submission and grade data (/submissions endpoints) — always fetched live

  • Paginated fetchAllPages() calls (students, submissions, ePortfolios) bypass the ETag cache and always hit the network — relevant for large courses

Development

Architecture

MCP Client → stdio → src/index.ts → src/tools/* → CanvasClient → Canvas REST API

Key modules:

Tool registration

This server uses the MCP TypeScript SDK (v1.29.0). Each tool is registered with server.tool() using a five-argument form:

  1. Tool name (string)

  2. Tool description (string)

  3. Input schema (Zod schema)

  4. Tool annotations ({ readOnlyHint?, destructiveHint?, idempotentHint? })

  5. Execute function

server.tool(
  "list-courses",
  "List all active courses for the authenticated user. Returns course name, ID, course code, and term.",
  {},
  { readOnlyHint: true },
  async () => {
    return {
      content: [{ type: "text", text: "..." }]
    };
  }
);

Local development

npm install
npm run build    # compile TypeScript to dist/
npm start        # run compiled server
npm run dev      # run from source with tsx (hot reload)

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Install dependencies: npm install

  4. Build: npm run build

  5. Submit a pull request

There is currently no automated test suite — manual verification via an MCP client is the primary testing approach.

Security Notes

  1. API token security

    • Never commit your Canvas API token to version control

    • Use environment variables or secure configuration

    • Rotate tokens periodically

  2. Permissions

    • Use tokens with the minimum access needed for your use case

    • Review Canvas API access logs periodically

License

MIT — see LICENSE.

Available Tools

60 tools
apply-page-changesA
Idempotent

Write revised HTML content to a Canvas page. Accepts the full new body as newContent and saves it. Intended as the second step after patch-page-content.

Inputs: pageUrl (required), courseId (required), newContent (required), title, +1 more.

attach-rubric-to-assignmentB
Idempotent

Attach a rubric to an assignment.

Inputs: courseId (required), rubricId (required), assignmentId (required).

bulk-update-assignment-datesA
Idempotent

Bulk update due/unlock/lock dates for assignments in a course.

Inputs: courseId (required), assignmentDates (required).

create-assignmentB

Create a new assignment in a course. All fields are optional except courseId.

Inputs: courseId (required), name, due_at, published, +5 more.

create-assignment-groupB

Create a new assignment group (bucket) in a course. All fields optional except courseId.

Inputs: courseId (required), name, rules, position, +3 more.

create-moduleA

Create a new module in a course.

Inputs: name (required), courseId (required), position, unlock_at, +3 more.

create-module-itemA

Add a new item to a module. Type must be one of: File, Page, Discussion, Assignment, Quiz, SubHeader, ExternalUrl, ExternalTool.

Inputs: type (required), courseId (required), moduleId (required), title, +8 more.

create-quizB

Create a new quiz in a course.

Inputs: title (required), courseId (required), due_at, published, +3 more.

create-quiz-questionA

Create a new question in a quiz.

Inputs: quizId (required), courseId (required), question (required).

create-quiz-question-groupA

Create a new question group in a quiz.

Inputs: quizId (required), courseId (required), quizGroup (required).

delete-assignmentA
Destructive

Delete (archive) an assignment from a course.

Inputs: courseId (required), assignmentId (required).

delete-moduleA
Destructive

Delete a module from a course. This is permanent and removes all module items.

Inputs: courseId (required), moduleId (required).

delete-module-itemA
Destructive

Remove an item from a module.

Inputs: itemId (required), courseId (required), moduleId (required).

delete-quizB
Destructive

Delete a quiz from a course.

Inputs: quizId (required), courseId (required).

delete-quiz-questionB
Destructive

Delete a question from a quiz.

Inputs: quizId (required), courseId (required), questionId (required).

delete-quiz-question-groupA
Destructive

Delete a question group from a quiz.

Inputs: quizId (required), groupId (required), courseId (required).

download-submission-fileA
Read-only

Download the actual content of a file attached to a submission. Returns file content as base64 for binary files or as text for text files.

Inputs: fileId (required), forceBase64.

generate-styleguideA
Idempotent

Generate and save a Canvas styleguide page for a course with design standards, accessibility guidelines, and Canvas-specific formatting best practices. Creates the page at the given URL slug (default: canvas-styleguide).

Inputs: courseId (required), slug, customBranding, includeExamples.

get-assignmentA
Read-only

Fetch metadata for a single assignment (due date, points, rubric, submission types, etc).

Inputs: courseId (required), assignmentId (required).

get-eportfolioA
Read-only

Get details for a single ePortfolio by ID.

Inputs: eportfolioId (required).

get-eportfolio-pagesA
Read-only

List all pages in an ePortfolio. Returns id, position, name, content, and timestamps for each page.

Inputs: eportfolioId (required).

get-module-itemA
Read-only

Get details for a single module item.

Inputs: itemId (required), courseId (required), moduleId (required).

get-page-contentA
Read-only

Get the full content of a page by URL slug. Returns title, URL slug, page ID, published status, last-updated timestamp, and HTML body.

Inputs: pageUrl (required), courseId (required).

get-quizA
Read-only

Fetch metadata for a single quiz

Inputs: quizId (required), courseId (required).

get-quiz-questionB
Read-only

Fetch a single question from a quiz

Inputs: quizId (required), courseId (required), questionId (required).

get-quiz-question-groupA
Read-only

Fetch a single question group from a quiz

Inputs: quizId (required), groupId (required), courseId (required).

get-rubric-statisticsA
Read-only

Get statistics for rubric assessments on an assignment

Inputs: courseId (required), assignmentId (required), includePointDistribution.

get-styleguideA
Read-only

Fetch the Canvas styleguide page for a course. Returns the page title, last-updated timestamp, and full HTML body.

Inputs: courseId (required), slug.

get-submission-documentsA
Read-only

Retrieve a student's submission with attachment metadata and optional file downloads. Returns submission details, file information, and optionally the actual file content.

Inputs: userId (required), courseId (required), assignmentId (required), anonymous, +1 more.

get-submission-file-infoA
Read-only

Get detailed information about a specific file attached to a submission, including download URLs and metadata.

Inputs: fileId (required).

grade-submissionC
Idempotent

Write back a score, grade, rubric points, or comment for a student's submission.

Inputs: userId (required), courseId (required), assignmentId (required), score, +3 more.

list-assignment-groupsA
Read-only

List all assignment groups (buckets) in a course.

Inputs: courseId (required).

list-assignmentsA
Read-only

Get a list of all assignments in a course with submission status for students

Inputs: courseId (required), anonymous, studentId, includeSubmissionHistory.

list-assignment-submissionsB
Read-only

Fetch every student's submission status & comments for an assignment.

Inputs: courseId (required), assignmentId (required), anonymous.

list-coursesA
Read-only

List all active courses for the authenticated user. Returns course name, ID, course code, and term for each course.

Inputs: no named parameters.

list-eportfoliosA
Read-only

List all ePortfolios belonging to a user. Returns id, name, public flag, workflow state, and timestamps.

Inputs: userId (required).

list-module-itemsA
Read-only

Given a module ID, list its items (pages, quizzes, files, etc).

Inputs: courseId (required), moduleId (required).

list-modulesA
Read-only

Return all modules in a course (optionally inline items).

Inputs: courseId (required), includeItems.

list-page-revisionsA
Read-only

List all revisions for a page.

Inputs: pageUrl (required), courseId (required).

list-pagesA
Read-only

List all pages in a course. Returns title, URL slug, page ID, and published status for each page.

Inputs: courseId (required).

list-quiz-question-groupsA
Read-only

Get a list of all question groups in a quiz

Inputs: quizId (required), courseId (required).

list-quiz-questionsA
Read-only

Get a list of all questions in a quiz

Inputs: quizId (required), courseId (required).

list-quizzesB
Read-only

Get a list of all quizzes in a course

Inputs: courseId (required).

list-rubric-assessmentsB
Read-only

List all rubric assessments for an assignment.

Inputs: courseId (required), assignmentId (required), anonymous.

list-rubricsA
Read-only

List all rubrics in a course. Returns rubric title, ID, and description for each rubric.

Inputs: courseId (required).

list-sectionsA
Read-only

List all sections in a course. Returns section name, ID, SIS ID, and optional date ranges. Set includeStudentCount to include enrollment totals per section.

Inputs: courseId (required), includeStudentCount.

list-section-submissionsA
Read-only

Get all student submissions for a specific assignment filtered by section

Inputs: courseId (required), sectionId (required), assignmentId (required), anonymous, +1 more.

list-studentsB
Read-only

Get a complete list of all students enrolled in a specific course

Inputs: courseId (required), anonymous, includeEmail.

patch-page-contentA
Read-only

Fetch a page's current HTML body and return it alongside edit instructions for the model to apply. Does not write to Canvas — follow up with apply-page-changes to persist the result. Optionally includes the course styleguide for formatting reference. For full replacement, use update-page-content instead.

Inputs: pageUrl (required), courseId (required), instructions (required), title, +2 more.

post-announcementB

Post an announcement to a specific course

Inputs: title (required), message (required), courseId (required).

post-submission-commentA

Attach targeted feedback as a comment on a student's submission.

Inputs: userId (required), comment (required), courseId (required), assignmentId (required).

revert-page-revisionA
Idempotent

Revert a page to a previous revision.

Inputs: pageUrl (required), courseId (required), revisionId (required).

toggle-module-publishA

Publish/unpublish a module (toggles the current published state).

Inputs: courseId (required), moduleId (required).

update-assignmentB
Idempotent

Update an assignment. All fields are optional except courseId and assignmentId.

Inputs: courseId (required), assignmentId (required), name, due_at, +6 more.

update-moduleC
Idempotent

Update an existing module's name, position, prerequisites, sequential progress, or published state.

Inputs: courseId (required), moduleId (required), name, position, +5 more.

update-module-itemA
Idempotent

Update an existing module item's title, position, indent, external URL, published state, completion requirement, or move it to another module.

Inputs: itemId (required), courseId (required), moduleId (required), title, +8 more.

update-page-contentA
Idempotent

Update or create a page with new content, replacing the entire body. If no body/title/editingRoles is provided, nothing is written and guidance is returned (set showStyleguidePreview to also inline the styleguide). For targeted edits to existing content, use patch-page-content instead.

Inputs: pageUrl (required), courseId (required), body, title, +3 more.

update-quizC
Idempotent

Update an existing quiz in a course.

Inputs: quizId (required), courseId (required), title, due_at, +4 more.

update-quiz-questionC
Idempotent

Update an existing question in a quiz.

Inputs: quizId (required), courseId (required), question (required), questionId (required).

update-quiz-question-groupA
Idempotent

Update an existing question group in a quiz.

Inputs: quizId (required), groupId (required), courseId (required), quizGroup (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 60 tools

    Disambiguation4/5

    Most tools clearly target distinct resources and actions, but there is some potential overlap between patch-page-content and update-page-content (targeted vs full replacement) and among get-submission-documents, get-submission-file-info, and download-submission-file. Descriptions generally help distinguish them.

    Naming Consistency5/5

    All tool names follow a consistent lowercase hyphenated verb-noun pattern (e.g., list-pages, create-module, delete-quiz). This consistency makes it easy to predict tool behavior from the name alone.

    Tool Count1/5

    With 60 tools, this exceeds the 50+ threshold for extreme mismatch per the calibration guide. Even for a broad LMS like Canvas, the surface is overwhelming and could benefit from splitting into focused servers by domain (e.g., quizzes, assignments, pages).

    Completeness3/5

    Core teaching workflows are well covered: assignments, quizzes, pages, modules, submissions, and grading. However, there are notable gaps: announcements only support post (no list/delete), eportfolios lack create/update/delete, and there is no discussion management or course settings beyond basic listing.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers