Sponsored by Deepsite.site

Canvas LMS MCP

Created By
bruchris20 days ago
Open-source TypeScript MCP server that connects AI agents to Canvas LMS (Instructure). Provides 42 tools across 15 Canvas domains — courses, assignments, submissions, rubrics, quizzes, discussions, modules, files, and more. Includes full grading and rubric assessment capabilities. Three deployment modes: stdio (Claude Desktop, Cursor, VS Code), HTTP, and library import. Standalone Canvas API client also available.
Overview

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.

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

Comparison

canvas-lms-mcpvishalsachdev/canvas-mcpDMontgomery40/mcp-canvas-lms
LanguageTypeScriptPythonTypeScript
Tools10480+54
LicenseLicense: MITLicenseLicense
Last commitLast commitLast commitLast 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 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 canvas-lms-mcp

VS Code

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

Gemini CLI

gemini mcp add canvas-lms npx canvas-lms-mcp

Codex CLI

codex mcp add canvas-lms -- npx canvas-lms-mcp
Manual Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "canvas-lms": {
      "command": "npx",
      "args": ["-y", "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", "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", "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", "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 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 (104)

CategoryTools
Healthhealth_check
Courseslist_courses, get_course, get_syllabus, create_course, update_course
Assignmentslist_assignments, get_assignment, list_assignment_groups, create_assignment, update_assignment, delete_assignment
Submissionslist_submissions, get_submission, grade_submission, comment_on_submission
Rubricslist_rubrics, get_rubric, get_rubric_assessment, submit_rubric_assessment
Quizzeslist_quizzes, get_quiz, list_quiz_submissions, list_quiz_questions, get_quiz_submission_answers, score_quiz_question
Fileslist_files, list_folders, get_file, upload_file, delete_file
Gradebook Historylist_gradebook_history_days, get_gradebook_history_day, list_gradebook_history_submissions, get_gradebook_history_feed
Userslist_students, get_user, get_profile, search_users, list_course_users
Groupslist_groups, list_group_members
Enrollmentslist_enrollments, enroll_user, remove_enrollment
Discussionslist_discussions, get_discussion, list_announcements, post_discussion_entry, create_discussion, update_discussion, delete_discussion
Moduleslist_modules, get_module, list_module_items, create_module, update_module, create_module_item
Pageslist_pages, get_page, create_page, update_page, delete_page
Calendarlist_calendar_events, create_calendar_event, update_calendar_event
Conversationslist_conversations, get_conversation, get_conversation_unread_count, send_conversation
Peer Reviewslist_peer_reviews, get_submission_peer_reviews, create_peer_review, delete_peer_review
Accountsget_account, list_accounts, list_sub_accounts, list_account_courses, list_account_users, get_account_reports
Analyticssearch_course_content, get_course_analytics, get_student_analytics, get_course_activity_stream
Outcomesget_root_outcome_group, list_outcome_groups, list_outcome_group_links, get_outcome_group, list_outcome_group_outcomes, list_outcome_group_subgroups, get_outcome, get_outcome_alignments, get_outcome_results, get_outcome_rollups, get_outcome_contributing_scores, get_outcome_mastery_distribution
Studentget_my_courses, get_my_grades, get_my_submissions, get_my_upcoming_assignments
Dashboardget_dashboard_cards, get_todo_items, get_upcoming_events, get_missing_submissions

76 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)

ResourceURI TemplateType
Course Syllabuscanvas://course/{courseId}/syllabustext/html
Assignment Descriptioncanvas://course/{courseId}/assignment/{assignmentId}/descriptiontext/html

Deployment Modes

stdio (Default)

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

npx 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 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 'canvas-lms-mcp'

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

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

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

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

const courses = await canvas.courses.list()

CLI Reference

FlagEnv VariableDefaultDescription
--tokenCANVAS_API_TOKEN(required)Canvas personal access token
--base-urlCANVAS_BASE_URL(required)Canvas instance URL
serve--stdio modeSwitch to HTTP mode
--port--3001HTTP server port
--allowed-originCANVAS_ALLOWED_ORIGINhttp://localhost:3000CORS allowed origin

Environment Variables

VariableRequiredDescription
CANVAS_API_TOKENYesCanvas personal access token
CANVAS_BASE_URLYesCanvas instance URL (e.g., https://school.instructure.com)
CANVAS_ALLOWED_ORIGINNoCORS 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/sdk@1.29.0 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

See CONTRIBUTING.md for the full contribution and validation workflow.

  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

License

MIT

Server Config

{
  "mcpServers": {
    "canvas-lms": {
      "command": "npx",
      "args": [
        "-y",
        "@bruchris/canvas-lms-mcp"
      ],
      "env": {
        "CANVAS_API_TOKEN": "<YOUR_TOKEN>",
        "CANVAS_BASE_URL": "https://your-institution.instructure.com"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp