Local MCP server for Canvas LMS instances. It runs over stdio, keeps a live browser session open while the MCP is running, and exposes a read-only tool surface for deadlines, announcements, inbox conversations, course pages, modules, files, grades, and weekly planning.
- Works with Canvas LMS web sessions and the standard Canvas API.
- Supports weekly planning, assignments, announcements, inbox conversations, course pages, modules, files, grades, and content search.
- Runs locally over
stdioand opens a live browser session for authentication. - Published on npm as
@canvas-mcp/server.
UOC is only an example Canvas deployment. Replace the base URL with your university Canvas URL.
One quick way to check is:
- Go to Canvas login discovery.
- Select
Students and Educators. - Search for your university name.
- If your institution appears, it is using Canvas.
- Node.js 20+
- A local Chromium-based browser. The login flow prefers an installed browser such as Chrome, Edge, Brave, Vivaldi, or Opera; it falls back to Playwright Chromium if none is detected.
- This MCP uses the standard Canvas web session and Canvas API.
- It should work with many Canvas-based institutions, but the login experience can vary because each university may use different SSO or identity-provider flows.
- The current implementation is not hardcoded to UOC anymore; it opens whatever
CANVAS_BASE_URLyou configure and validates the session against that Canvas host. - The main compatibility requirement is that, after login, the Canvas instance exposes the standard authenticated API and sets a reusable Canvas session cookie in the browser session.
Run the published package directly with npx:
npx -y --package @canvas-mcp/server canvasmcp runWhen the server starts it opens a browser window automatically, waits for a valid Canvas session, and then keeps that window open while the MCP server is running. Do not close that browser window during use. When the MCP server stops normally or the client closes the stdio connection cleanly, the linked browser window should close with it.
By default, this project stores a persistent profile in an OS-standard user directory:
- Windows:
%LOCALAPPDATA%\canvas-mcp\profile - macOS:
~/Library/Application Support/canvas-mcp/profile - Linux:
~/.config/canvas-mcp/profile
You can still override it with CANVAS_PROFILE_DIR if needed.
Replace CANVAS_BASE_URL with your university Canvas URL.
Claude Desktop
{
"mcpServers": {
"canvasmcp": {
"command": "npx",
"args": [
"-y",
"--package",
"@canvas-mcp/server",
"canvasmcp",
"run"
],
"env": {
"CANVAS_BASE_URL": "https://canvas.your-university.edu"
}
}
}
}Cursor
{
"mcpServers": {
"canvasmcp": {
"command": "npx",
"args": [
"-y",
"--package",
"@canvas-mcp/server",
"canvasmcp",
"run"
],
"env": {
"CANVAS_BASE_URL": "https://canvas.your-university.edu"
}
}
}
}Windsurf
Windsurf uses ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"canvasmcp": {
"command": "npx",
"args": [
"-y",
"--package",
"@canvas-mcp/server",
"canvasmcp",
"run"
],
"env": {
"CANVAS_BASE_URL": "https://canvas.your-university.edu"
}
}
}
}Source: Windsurf MCP docs
Visual Studio Code
VS Code supports MCP servers through mcp.json. Add this to your user or workspace config:
{
"servers": {
"canvasmcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"--package",
"@canvas-mcp/server",
"canvasmcp",
"run"
],
"env": {
"CANVAS_BASE_URL": "https://canvas.your-university.edu"
}
}
}
}Source: VS Code MCP docs
Claude Code
Claude Code can add local stdio servers from the CLI. On Windows, the official docs note that npx often needs a cmd /c wrapper.
claude mcp add-json canvasmcp "{\"type\":\"stdio\",\"command\":\"cmd\",\"args\":[\"/c\",\"npx\",\"-y\",\"--package\",\"@canvas-mcp/server\",\"canvasmcp\",\"run\"],\"env\":{\"CANVAS_BASE_URL\":\"https://canvas.your-university.edu\"}}"Source: Claude Code MCP docs
Codex
Codex supports MCP server setup from the CLI or directly in ~/.codex/config.toml. The configuration is shared between the CLI and the app/IDE extension.
CLI:
codex mcp add canvasmcp --env CANVAS_BASE_URL=https://canvas.your-university.edu -- npx -y --package @canvas-mcp/server canvasmcp runConfig file:
[mcp_servers.canvasmcp]
command = "npx"
args = ["-y", "--package", "@canvas-mcp/server", "canvasmcp", "run"]
[mcp_servers.canvasmcp.env]
CANVAS_BASE_URL = "https://canvas.your-university.edu"Source: OpenAI Codex MCP docs
get_auth_statusget_profilelist_conversationsget_conversation_detaillist_current_coursesget_course_announcementsget_discussion_topic_detailget_course_assignmentsget_assignment_detailget_submission_statusget_course_activityget_course_calendar_eventsget_user_todoget_course_modulesget_module_itemslist_course_pagesget_course_page_detailget_course_filesget_grades_summarysearch_course_contentget_weekly_digest
get_weekly_digest is the preferred tool for "what do I have next week?" style questions because assignments alone are often incomplete in many Canvas courses.
For regular course pages (for example content pages that are not assignments or announcements), use:
list_course_pagesto discover available pages in a course.get_course_page_detailto retrieve full page content (body.html+body.text) for summarization.
CANVAS_BASE_URL
- Canvas base URL for your institution.
- Example:
https://aula.uoc.edu - Must use
https.
CANVAS_PROFILE_DIR
- Optional path to the Playwright persistent profile. If omitted, the MCP uses an OS-standard location in your user directory.
- Relative values are resolved from the project root.
CANVAS_BROWSER_PATH
- Optional path to a specific browser executable. In normal usage you should not need this; the MCP auto-detects common local browsers and falls back to Playwright Chromium.
Install dependencies:
pnpm installCreate local config if needed:
copy .env.example .envStart the MCP server in development:
pnpm devBuild and run the compiled server:
pnpm build
pnpm startRun checks:
pnpm typecheck
pnpm testIssues and pull requests are welcome for bug reports, fixes, and compatibility improvements.
By contributing, you agree that your contributions may be used in this project under the repository license and ownership terms. If you want to propose a larger change, open an issue first so the approach can be discussed before implementation.
- Tool responses may include
htmlfields returned by Canvas. Treat that HTML as untrusted content and sanitize it before rendering in any client UI. - The MCP only follows Canvas API requests on the configured
CANVAS_BASE_URLorigin.