Canvas MCP Server
Provides tools to access UBC Canvas LMS data, including courses, assignments, announcements, and submissions.
Provides tools to access UBC Canvas LMS data through the Instructure Canvas platform.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Canvas MCP Server list my upcoming assignments"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Canvas MCP Server
An MCP (Model Context Protocol) server that exposes UBC Canvas LMS data as tools consumable by Claude Desktop, Claude Code, n8n AI Agent nodes, or any MCP-compatible client.
AI Agent / Claude Desktop / n8n
│ MCP tool calls
▼
canvas-mcp (this server)
│ REST
▼
https://ubc.instructure.com/api/v1/This server is read-only. It surfaces Canvas data; it never writes, drafts, or submits anything.
Prerequisites
Node.js 18 or higher (or Docker — see below)
A UBC Canvas personal access token (see below)
Related MCP server: Canvas MCP
Token Generation
Log in to Canvas at https://ubc.instructure.com
Click your avatar (top-left) → Account → Settings
Scroll to Approved Integrations → click + New Access Token
Give it a descriptive purpose (e.g. "MCP Server")
Copy the token — it will not be shown again
Security note: This token can read your grades, submissions, and course communications. Never share it, never commit it, and revoke it immediately if your machine is compromised.
Setup
# 1. Clone the repository
git clone <repo-url>
cd Canvas-MCP-Server
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env and paste your token:
# CANVAS_TOKEN=your_token_here
# CANVAS_BASE_URL=https://ubc.instructure.com/api/v1
# 4. Build
npm run build
# 5. Verify your token works
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' | node dist/index.jsAvailable Tools
Tool | Description |
| Verify your token and return your Canvas profile (name, email, login ID) |
| List all active courses. Returns course IDs required by other tools |
| List upcoming assignments for a course (default: next 14 days, max 90) |
| Full assignment details with plain-text description (HTML stripped) |
| Recent announcements from one or more courses (default: last 14 days) |
| Unified calendar view of upcoming assignment due dates across all courses |
| Your submission status for an assignment: score, grade, late/missing flags |
Fresh Ubuntu Setup (Docker)
Follow these three steps on a brand-new Ubuntu machine. No Node.js installation needed.
Step 1 — Install Docker Engine
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginAllow running Docker without sudo:
sudo usermod -aG docker $USER
newgrp docker # apply group change in current shell without logging out
docker run hello-world # confirm Docker is workingStep 2 — Clone the repo and set your token
git clone https://github.com/terraceonhigh/Canvas-MCP-Server.git
cd Canvas-MCP-Server
cp .env.example .env
nano .env # paste your CANVAS_TOKEN valueStep 3 — Build the image and verify
docker build -t canvas-mcp .
# Smoke-test: should print a valid JSON-RPC response to stdout
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' \
| docker run --rm -i \
-e CANVAS_TOKEN=$(grep CANVAS_TOKEN .env | cut -d= -f2) \
-e CANVAS_BASE_URL=https://ubc.instructure.com/api/v1 \
canvas-mcpThe token is read from
.envonly for this test command and passed via-eat runtime — it is never baked into the image.
Docker
You can run the server in a container instead of installing Node.js locally.
# Build the image
docker build -t canvas-mcp .
# Verify your token (one-shot test)
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' \
| docker run --rm -i \
-e CANVAS_TOKEN=your_token_here \
-e CANVAS_BASE_URL=https://ubc.instructure.com/api/v1 \
canvas-mcpThe container reads MCP messages from stdin and writes responses to stdout, so always pass -i to docker run. Never use -t (TTY), as it would corrupt the binary stdio stream.
Claude Desktop with Docker
{
"mcpServers": {
"canvas": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CANVAS_TOKEN=your_token_here",
"-e", "CANVAS_BASE_URL=https://ubc.instructure.com/api/v1",
"canvas-mcp"
]
}
}
}Claude Desktop Configuration
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"canvas": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/absolute/path/to/Canvas-MCP-Server",
"env": {
"CANVAS_TOKEN": "your_token_here",
"CANVAS_BASE_URL": "https://ubc.instructure.com/api/v1"
}
}
}
}Replace /absolute/path/to/Canvas-MCP-Server with the actual path on your machine.
n8n AI Agent Node
In any n8n AI Agent node:
Add a new MCP Tool credential
Set the command to
nodeand args to["dist/index.js"]Set the working directory to this project's path
Set
CANVAS_TOKENandCANVAS_BASE_URLas environment variables
The agent can then call tools like list_assignments, filter results, and pipe them to downstream services (task managers, calendars, notification systems) in the same workflow.
Architecture
src/
├── index.ts # MCP server entry point — registers all tools
├── canvas-client.ts # Authenticated fetch wrapper with automatic pagination
└── tools/
├── courses.ts # list_courses
├── assignments.ts # list_assignments, get_assignment
├── announcements.ts# list_announcements
├── calendar.ts # list_upcoming
└── submissions.ts # get_submission, whoamiKey design decisions:
Pagination is automatic — all list endpoints follow
Link: rel="next"headers until exhaustedHTML is always stripped — descriptions and announcement bodies are returned as clean plain text
Token is never logged — the
Authorizationheader is excluded from all error messages and debug outputStdout is sacred — all diagnostic output goes to stderr; stdout carries only MCP protocol messages
Known Limitations
Rate limits: Canvas enforces undocumented rate limits. Polling workflows should add delays between requests if 403s appear.
Token scope: A personal token reads everything you can see in Canvas. Treat it like a password.
Announcement interpretation: Pattern-matching (e.g. detecting class cancellations) is the consuming agent's job — this server returns clean text only.
Available Tools
7 toolsget_assignmentA
Get full details for a specific Canvas assignment, including a plain-text description (HTML stripped), points possible, submission types, due date, and rubric title if present. Requires course_id and assignment_id.
Inputs: course_id (required), assignment_id (required).
get_submissionA
Get the current user's submission status for a specific Canvas assignment. Returns score, grade, submission time, whether it is late or missing, and graded timestamp. Requires course_id and assignment_id.
Inputs: course_id (required), assignment_id (required).
list_announcementsA
List recent course announcements from one or more Canvas courses. Returns title, post date, and plain-text body (HTML stripped). Defaults to the last 14 days. Accepts multiple course IDs at once.
Inputs: course_ids (required), days_back.
list_assignmentsA
List upcoming assignments for a specific Canvas course. Filters to assignments due within a configurable window (default 14 days, max 90). Returns assignment ID, name, due date, points possible, and submission types. Requires a course_id from list_courses.
Inputs: course_id (required), days_ahead.
list_coursesA
List all active Canvas LMS courses for the authenticated user. Returns course IDs (required by all other tools), names, course codes, and term names.
Inputs: no named parameters.
list_upcomingA
List all upcoming assignment due dates across all courses in a unified calendar view. Returns assignment titles, due dates, course IDs, and points possible for the next 14 days by default.
Inputs: days_ahead.
whoamiA
Verify the Canvas API token is valid and return the authenticated user's profile: name, email, and login ID. Use this once at setup to confirm credentials are working.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools target clearly distinct resources or actions. list_assignments and list_upcoming both involve upcoming assignments, but one is course-scoped and the other is a cross-course calendar view, and the descriptions clarify this distinction.
Six of seven tools follow a consistent snake_case verb_noun pattern (list_courses, get_assignment, etc.). whoami is a conventional exception but is the only name that breaks the pattern.
Seven tools is well within the ideal 3-15 range and each tool earns its place for a read-only Canvas assistant. The set covers courses, assignments, deadlines, announcements, submissions, and authentication without unnecessary bloat.
The tools cover the core read-only student workflow: listing courses, viewing assignments and deadlines, reading announcements, checking submission status, and verifying authentication. There are minor gaps such as no assignment submission action, file/module access, or broader historical assignment listing, but these are workable for the apparent scope.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for Canvas LMS, providing 115+ tools to read courses, assignments, submissions, rubrics, quizzes; grade, comment, manage course content, and handle Canvas admin workflows from any AI agent.1851,034 npm10MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for Canvas LMS that exposes courses, assignments, modules, pages, files, grades, and submissions as tools for AI agents.-
- FlicenseNot gradedqualityDmaintenanceA remote MCP server for querying Canvas LMS courses, assignments, and grades. Enables natural language interaction with Canvas data via MCP clients like Claude Desktop.-
- AlicenseNot gradedqualityCmaintenanceMCP server for Canvas LMS with automatic OAuth authentication. Enables interaction with courses, assignments, grades, modules, discussions, quizzes, files, calendar, messaging, and more without manual API token management.2MIT