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

@bruchris/canvas-lms-mcp

v0.5.1

Published

TypeScript MCP 1.x server for Canvas LMS — 88 tools across Canvas courses, assignments, grades, quizzes, discussions, admin workflows, and more.

Readme

Canvas LMS MCP Server

The TypeScript MCP server for Canvas LMS.

CI npm License: MIT Node npm downloads

MCP server for Canvas LMS. Read courses, assignments, submissions, rubrics, quizzes; grade, comment, manage course content, and handle Canvas admin workflows from any AI agent.

88 tools across Canvas courses, assignments, submissions, rubrics, quizzes, files, users, groups, enrollments, discussions, modules, pages, calendar, conversations, peer reviews, accounts, analytics, student workflows, dashboard, and health checks. Three deployment modes: stdio, HTTP, and library import.

Comparison

| | @bruchris/canvas-lms-mcp | vishalsachdev/canvas-mcp | DMontgomery40/mcp-canvas-lms | |---|---|---|---| | Language | TypeScript | Python | TypeScript | | Tools | 88 | 80+ | 54 | | License | License: MIT | License | License | | Last commit | Last commit | Last commit | Last commit |

Quick Start

1. Get a Canvas API Token

  1. Log in to your Canvas instance
  2. Go to Account > Settings
  3. Scroll to Approved Integrations and click + New Access Token
  4. Give it a name (e.g., "MCP Server") and click Generate Token
  5. Copy the token immediately -- you won't see it again

2. One Command Setup

npx add-mcp @bruchris/canvas-lms-mcp

This auto-detects your installed AI clients (Claude Code, Cursor, VS Code, etc.) and configures them. You will be prompted for your Canvas API token and base URL.

Client-Specific Commands

Claude Code

claude mcp add canvas-lms --env CANVAS_API_TOKEN=your-token --env CANVAS_BASE_URL=https://school.instructure.com -- npx -y @bruchris/canvas-lms-mcp

VS Code

code --add-mcp '{"name":"canvas-lms","command":"npx","args":["-y","@bruchris/canvas-lms-mcp"],"env":{"CANVAS_API_TOKEN":"your-token","CANVAS_BASE_URL":"https://school.instructure.com"}}'

Gemini CLI

gemini mcp add canvas-lms npx @bruchris/canvas-lms-mcp

Codex CLI

codex mcp add canvas-lms -- npx @bruchris/canvas-lms-mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "canvas-lms": {
      "command": "npx",
      "args": ["-y", "@bruchris/canvas-lms-mcp"],
      "env": {
        "CANVAS_API_TOKEN": "your-token-here",
        "CANVAS_BASE_URL": "https://your-institution.instructure.com"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "canvas-lms": {
      "command": "npx",
      "args": ["-y", "@bruchris/canvas-lms-mcp"],
      "env": {
        "CANVAS_API_TOKEN": "your-token-here",
        "CANVAS_BASE_URL": "https://your-institution.instructure.com"
      }
    }
  }
}

VS Code

Add to your VS Code settings (settings.json):

{
  "mcp.servers": {
    "canvas-lms": {
      "command": "npx",
      "args": ["-y", "@bruchris/canvas-lms-mcp"],
      "env": {
        "CANVAS_API_TOKEN": "your-token-here",
        "CANVAS_BASE_URL": "https://your-institution.instructure.com"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "canvas-lms": {
      "command": "npx",
      "args": ["-y", "@bruchris/canvas-lms-mcp"],
      "env": {
        "CANVAS_API_TOKEN": "your-token-here",
        "CANVAS_BASE_URL": "https://your-institution.instructure.com"
      }
    }
  }
}

ChatGPT / HTTP Clients

Run the server in HTTP mode, then point your client at the endpoint:

npx @bruchris/canvas-lms-mcp serve --port 3001 \
  --token your-token-here \
  --base-url https://your-institution.instructure.com

The MCP endpoint is http://localhost:3001/mcp. Per-request credentials can be passed via X-Canvas-Token and X-Canvas-Base-URL headers.

Example Prompts

Once configured, try these prompts with your AI client:

  • "List all my active courses"
  • "Show me the assignments for course 12345"
  • "What's the average grade on the midterm exam?"
  • "Grade Alice's essay submission with a B+ and add feedback"
  • "Show me the rubric for the final project"
  • "What discussions are happening in my Biology course?"
  • "List all upcoming calendar events for course 12345"
  • "Send a message to student 67890 about their missing assignment"

Tool Inventory

All Registered Tools (88)

| Category | Tools | |----------|-------| | Health | health_check | | Courses | list_courses, get_course, get_syllabus, create_course, update_course | | Assignments | list_assignments, get_assignment, list_assignment_groups, create_assignment, update_assignment, delete_assignment | | Submissions | list_submissions, get_submission, grade_submission, comment_on_submission | | Rubrics | list_rubrics, get_rubric, get_rubric_assessment, submit_rubric_assessment | | Quizzes | list_quizzes, get_quiz, list_quiz_submissions, list_quiz_questions, get_quiz_submission_answers, score_quiz_question | | Files | list_files, list_folders, get_file, upload_file, delete_file | | Users | list_students, get_user, get_profile, search_users, list_course_users | | Groups | list_groups, list_group_members | | Enrollments | list_enrollments, enroll_user, remove_enrollment | | Discussions | list_discussions, get_discussion, list_announcements, post_discussion_entry, create_discussion, update_discussion, delete_discussion | | Modules | list_modules, get_module, list_module_items, create_module, update_module, create_module_item | | Pages | list_pages, get_page, create_page, update_page, delete_page | | Calendar | list_calendar_events, create_calendar_event, update_calendar_event | | Conversations | list_conversations, get_conversation, get_conversation_unread_count, send_conversation | | Peer Reviews | list_peer_reviews, get_submission_peer_reviews, create_peer_review, delete_peer_review | | Accounts | get_account, list_accounts, list_sub_accounts, list_account_courses, list_account_users, get_account_reports | | Analytics | search_course_content, get_course_analytics, get_student_analytics, get_course_activity_stream | | Student | get_my_courses, get_my_grades, get_my_submissions, get_my_upcoming_assignments | | Dashboard | get_dashboard_cards, get_todo_items, get_upcoming_events, get_missing_submissions |

60 tools are read-only and 28 tools perform Canvas write operations.

All write tools require appropriate Canvas permissions. Canvas enforces its own permission model -- the MCP server does not bypass it.

MCP Resources (2)

| Resource | URI Template | Type | |----------|-------------|------| | Course Syllabus | canvas://course/{courseId}/syllabus | text/html | | Assignment Description | canvas://course/{courseId}/assignment/{assignmentId}/description | text/html |

Deployment Modes

stdio (Default)

For local AI clients like Claude Desktop, Cursor, and VS Code. The server communicates over stdin/stdout.

npx @bruchris/canvas-lms-mcp --token $CANVAS_API_TOKEN --base-url $CANVAS_BASE_URL

HTTP

For web-based clients or hosted services. Starts an HTTP server with Streamable HTTP transport.

npx @bruchris/canvas-lms-mcp serve \
  --token $CANVAS_API_TOKEN \
  --base-url $CANVAS_BASE_URL \
  --port 3001 \
  --allowed-origin https://your-app.example.com

Endpoints:

  • POST /mcp -- MCP protocol endpoint
  • GET /health -- Health check (returns {"status":"ok"})

Docker

docker compose up -d

Requires CANVAS_API_TOKEN and CANVAS_BASE_URL environment variables. See docker-compose.yml.

services:
  canvas-lms-mcp:
    build: .
    ports:
      - "3001:3001"
    environment:
      - CANVAS_API_TOKEN=${CANVAS_API_TOKEN}
      - CANVAS_BASE_URL=${CANVAS_BASE_URL}

Library Import

Use the server factory directly in your own Node.js application:

import { createCanvasMCPServer } from '@bruchris/canvas-lms-mcp'

const { server, canvas } = createCanvasMCPServer({
  token: userToken,
  baseUrl: canvasBaseUrl,
})

Or use the Canvas client standalone (no MCP dependency):

import { CanvasClient } from '@bruchris/canvas-lms-mcp/canvas'

const canvas = new CanvasClient({
  token: userToken,
  baseUrl: canvasBaseUrl,
})

const courses = await canvas.courses.list()

CLI Reference

| Flag | Env Variable | Default | Description | |------|-------------|---------|-------------| | --token | CANVAS_API_TOKEN | (required) | Canvas personal access token | | --base-url | CANVAS_BASE_URL | (required) | Canvas instance URL | | serve | -- | stdio mode | Switch to HTTP mode | | --port | -- | 3001 | HTTP server port | | --allowed-origin | CANVAS_ALLOWED_ORIGIN | http://localhost:3000 | CORS allowed origin |

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | CANVAS_API_TOKEN | Yes | Canvas personal access token | | CANVAS_BASE_URL | Yes | Canvas instance URL (e.g., https://school.instructure.com) | | CANVAS_ALLOWED_ORIGIN | No | CORS origin for HTTP mode (default: http://localhost:3000) |

Development

pnpm install       # Install dependencies
pnpm dev           # Watch mode build
pnpm build         # Production build
pnpm test          # Run tests (294 tests)
pnpm lint          # ESLint + Prettier check
pnpm lint:fix      # Auto-fix lint issues
pnpm typecheck     # TypeScript strict type check

Dependency audit

The pnpm.overrides.hono entry pins hono to 4.12.14 because @modelcontextprotocol/[email protected] allows vulnerable hono <4.12.14 versions. Remove the override when the MCP SDK publishes a release that depends on a patched hono range.

Architecture

src/canvas/       Standalone Canvas REST API client (pure fetch, no MCP dependency)
src/tools/        MCP tool definitions with Zod input schemas
src/resources/    MCP resource templates (syllabus, assignment description)
src/server.ts     Factory: createCanvasMCPServer(config)
src/stdio.ts      stdio transport entry point
src/http.ts       HTTP transport entry point
src/cli.ts        CLI argument parser

Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Use conventional commits (feat:, fix:, chore:, test:, docs:)
  4. Ensure pnpm lint && pnpm typecheck && pnpm test pass
  5. Open a pull request

Guides

  • Getting Started -- Step-by-step setup for non-developers: token, config, first query, troubleshooting
  • Student Guide -- Token setup, AI client configuration, 10 example prompts
  • Educator Guide -- Grading workflows, write operations, privacy considerations
  • Integration Guide -- Three integration patterns with code examples

License

MIT