@charlie.act7/canvas-mcp-server
v1.1.8
Published
MCP Server for Canvas LMS - Use AI to interact with your courses, assignments, and grades.
Maintainers
Readme
🎓 Canvas LMS MCP Server
Bring AI to your Canvas Virtual Classroom! 🚀
This project is a Model Context Protocol (MCP) server for Canvas LMS. It acts as a bridge that allows AI assistants (like Claude Desktop, Claude Code, Cursor, etc.) to query and manage your Canvas courses using natural language.
Table of Contents
- How It Works
- Use Cases & Examples
- Setup Guide
- CLI Configuration
- Supported Tools & Resources
- Local Development
- License
How It Works
When you interact with the server, communication flows as follows:
graph LR
User([User]) -->|Natural Language Instruction| AI["AI Assistant (e.g., Claude)"]
AI -->|MCP Request| MCP["Canvas MCP Server"]
MCP -->|REST API - HTTPS| Canvas["Canvas LMS"]
Canvas -->|Response| MCP
MCP -->|Processed Data| AI
AI -->|Friendly Answer| User- You ask the AI (e.g., "Create an assignment due next Friday").
- The AI detects your intent and communicates with the Canvas MCP Server, sending the required parameters.
- The server makes a secure call to the official Canvas API.
- Canvas processes the action and returns the response.
- The AI confirms the success of the action back to you in plain, natural language.
Use Cases & Examples
Here are some realistic, everyday prompts you can use with your AI assistant:
[!TIP] Token Saving & Efficiency: Whenever possible, specify the Canvas ID or the direct Canvas URL (e.g.,
https://[your_institution].instructure.com/courses/[course_id]/assignments/[assignment_id]) in your prompts. This prevents the AI from scanning all your courses/resources, leading to faster responses and substantial token savings.
📖 Course Auditing & Querying
- 💬 "What active courses do I have this semester? Check if there are multiple active sections/parallels."
- 💬 "Show me all ungraded submissions for 'Essay 1: Introduction to Sociology' in Sociology 101."
- 💬 "Who is in Student Group A for the Chemistry class?"
- 💬 "Does the assignment 'Project Proposal' have an active rubric associated? If so, retrieve its criteria."
✍️ Creating & Organizing Course Content
- 💬 "Create a new module named 'Week 1: Foundations' in my course."
- 💬 "Add a SubHeader 'REQUIRED READINGS' inside the 'Week 1' module, and link the syllabus page to it."
- 💬 "In my Business course, create an assignment called 'Case Study 1: Market Analysis'. Add an instructions table with columns for Criteria, Requirements, and Points."
💯 Grading & Absence Management
- 💬 "For assignment 'Case Study 1', find all students who haven't submitted their work. Assign them a grade of 0 and add the comment: 'Activity not submitted. Please contact the instructor if you have a valid excuse.'"
- 💬 "Grade John's submission for 'Essay 1' with a 90 based on the rubric, and add a comment: 'Great job! The analysis is well-structured, though you could expand more on the conclusion. Keep it up!'"
Setup Guide
To connect your AI assistant to Canvas, you need to configure two things: your Canvas credentials and your AI client (like Claude).
Step 1: Obtain Canvas Credentials
To let the server act on your behalf, it needs permission:
- Log in to your Canvas LMS account.
- Go to Account ➡️ Settings in the sidebar menu.
- Scroll down to the Approved Integrations section and click + New Access Token.
- Enter a purpose (e.g., "Claude Assistant") and click Generate Token.
- Copy the generated token immediately and store it somewhere safe (you won't be able to see it again after closing the page).
[!IMPORTANT] You will also need your Canvas Domain. This is the web address of your school/university, for example:
myschool.instructure.com.
Step 2: Connect to your AI Client
Option A: Claude Desktop (Desktop Application)
- Open your Claude Desktop configuration file. On Windows, it is located at:
%APPDATA%\Claude\claude_desktop_config.json(On macOS:~/Library/Application Support/Claude/claude_desktop_config.json) - Add the Canvas server configuration under
mcpServers:
{
"mcpServers": {
"canvas": {
"command": "npx",
"args": ["-y", "@charlie.act7/canvas-mcp-server"],
"env": {
"CANVAS_API_TOKEN": "YOUR_ACCESS_TOKEN_HERE",
"CANVAS_API_DOMAIN": "myschool.instructure.com"
}
}
}
}- Save the file and restart Claude Desktop. You will see a socket/plug icon indicating the server is successfully connected.
Option B: Claude Code (Terminal CLI)
If you are using the Claude Code terminal tool, install the plugin by running:
/plugin install canvas-lms@claude-communityThen, configure your credentials interactively:
/canvas-lms:configCLI Configuration
If you prefer to configure your credentials locally for development, run:
npx @charlie.act7/canvas-mcp-server configThis will guide you step-by-step to input your domain and API token, storing them securely in a local configuration file.
Supported Tools & Resources
Tools List
The server exposes the following tools organized by category:
| Category | Included Tools | |---|---| | Courses | List courses, get course details, set basic configuration | | Modules | List and manage course modules | | Pages | List pages, read page content HTML | | Files | List files uploaded to a course | | Announcements | List and create announcements | | Assignments | List, create, and update assignments; bulk update due dates | | Submissions | View student submissions and attachments | | Grading | Grade submissions, audit course grades | | Quizzes | List quizzes, manage questions, update quiz dates | | Students | Course roster, progress tracking, and student details | | Groups | List and manage student groups | | Calendar | List and create calendar events/reminders | | Rubrics | Create and manage grading rubrics | | Communication | Send direct messages, manage discussions and threads |
Supported MCP Resources
For clients supporting direct resources:
canvas://courses/{id}/readme— Formatted course summary.canvas://courses/{id}/pages/{slug}— Direct HTML content of Canvas pages.
Local Development
To clone this repository and modify the code:
- Install Dependencies:
npm install - Build the Project (TypeScript to JavaScript):
npm run build - Start Server in Stdio Mode (MCP):
npm start - Start HTTP Server with Swagger Documentation:
If you want to use this as an OpenAI GPT Custom Action, spin up the web server with:
Then visitnpm run start:httphttp://localhost:3000to view the interactive Swagger interface.
License
This project is licensed under the MIT License. Created by Charlie Cárdenas Toledo.
