Canvas Agent
Allows AI assistants to manage courses, assignments, grades, submissions, rubrics, modules, discussions, calendar events, analytics, enrollments, and more through the Instructure Canvas LMS API.
Click on "Install 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 Agentlist my assignments due this week"
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 Agent
MCP server that connects AI assistants — Google's Antigravity CLI, Claude Code, and Claude Desktop — to Instructure Canvas LMS. Teachers and administrators can manage courses, assignments, grades, and more through natural language.
Looking to install Canvas Agent? Follow the setup guide at hughsibbele.github.io/Canvas-Agent — no technical background required.
Architecture
Canvas Agent ships as three MCP servers from one npm package, split by intent. The setup wizard registers all three by default; users who want to save context can drop admin or extras from their MCP config.
AI client (Claude Code / Claude Desktop / Antigravity CLI)
├─ spawns canvas-agent (core, 80 tools — daily teaching/grading)
├─ spawns canvas-agent-admin (18 tools — course/section/enrollment lifecycle)
└─ spawns canvas-agent-extras (36 tools — outcomes, groups, pages, files, messaging, …)
└─ MCP stdio transport
└─ Canvas REST API (bearer token auth)The three bins share a single import graph and a single per-course vault, so anonymization tokens stay consistent across servers. Core also includes a describe_canvas_mcps tool so the AI can tell the user which other bin to mount when a needed tool isn't loaded.
Component | Path | Role |
Core MCP entry point |
| The 79 daily teaching/grading tools + the |
Admin MCP entry point |
| The 18 course/section/enrollment lifecycle tools |
Extras MCP entry point |
| The 36 outcomes/groups/pages/files/messaging/late-policy/classic-quizzes tools |
CLI dispatcher |
|
|
Canvas API client |
| Thin fetch wrapper with automatic pagination ( |
Tool modules |
| One file per Canvas domain. Mixed-bucket files export per-bucket registrars (e.g. |
Privacy pipeline |
| Three-stage redaction at the MCP boundary: token-swap structured PII fields, redact student names inside free text, wrap untrusted content with prompt-injection delimiters. Per-course vault tracks role (student/teacher/unknown); teachers are exempt. Map lives in |
Setup wizard |
| Interactive CLI that validates credentials, detects Claude Code / Desktop / Antigravity CLI, and registers all three v2 bins. |
Tool-routing assertion harness |
| Boots all three split servers via the MCP SDK and asserts each exposes exactly its bucket (80 / 18 / 36) with no cross-server name collisions. Run via |
Landing site |
| Static GitHub Pages site with the end-user setup guide |
Tool modules
Module | File | v2 bin(s) | Covers |
Courses |
| core + admin | core: list courses, terms, assignment groups, modules, grading periods. admin: create/update/delete/conclude/reset/copy course, navigation tabs. |
Assignments |
| core | CRUD assignments, batch update dates |
Submissions |
| core | List/download submissions, download discussion entries |
Grading |
| core + extras | core: grade/bulk-grade/post/hide, missing & gradeable students. extras: late policy, grading standards. |
Rubrics |
| core | CRUD rubrics, copy across assignments/courses, associate with display toggles, link to outcomes, view/edit/delete assessments |
Outcomes |
| extras | List outcomes/groups, outcome results, mastery rollups |
Modules |
| core | CRUD modules and module items, publish modules |
Pages |
| extras | CRUD pages, front page, page revisions |
Discussions |
| core | CRUD discussions and batch updates (download entries lives in submissions.ts) |
Quizzes (Classic) |
| extras | List/get/update Classic Quizzes |
New Quizzes |
| core | List/CRUD New Quizzes, quiz items, accommodations, generate quiz reports |
Calendar |
| core | CRUD calendar events |
Files |
| extras | List/get/update/delete files, folders, quota |
Enrollments |
| core + admin | core: list students/sections/users, get profile. admin: crosslist, create/update/delete sections, enroll/drop users, move student. |
Communication |
| core + extras | core: post submission comment. extras: send_message, create_announcement. |
Groups |
| extras | Group sets, groups, membership, auto-distribute |
Analytics |
| core + extras | core: course/student activity, assignment analytics, student summaries. extras: messaging data. |
Scheduling |
| core + extras | core: assignment dates, batch updates, overrides, schedule overview. extras: classic-quiz dates. |
Meta |
| core |
|
Migrating from v1.x
v2 splits the v1 single-MCP surface into core / admin / extras. If your existing config has just canvas-agent, you'll keep working but lose access to anything that moved out of core. Add the relevant bin to your MCP config:
{
"mcpServers": {
"canvas-agent": { "command": "npx", "args": ["-y", "canvas-agent"] },
"canvas-agent-admin": { "command": "npx", "args": ["-y", "canvas-agent-admin"] },
"canvas-agent-extras": { "command": "npx", "args": ["-y", "canvas-agent-extras"] }
}
}The setup wizard (npx canvas-agent setup) registers all three by default — running it again is the simplest upgrade path.
Tool → bin lookup (alphabetical)
If you used a tool in v1, this table tells you which v2 bin it lives in. Tools not listed here are in canvas-agent (core).
Tool | v2 bin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The vault, anonymizer, and reveal CLI are unchanged — no data migration. You can also ask the AI "describe canvas-agent's MCPs" and it will surface the same info via the describe_canvas_mcps tool in core.
Development
git clone https://github.com/hughsibbele/Canvas-Agent.git
cd Canvas-Agent
npm install
cp .env.example .env # add your CANVAS_API_URL and CANVAS_API_TOKEN
npm run build
node dist/cli.js # start the core MCP server (default canvas-agent bin)
node dist/servers/admin.js # start admin server directly
node dist/servers/extras.js # start extras server directly
node dist/cli.js setup # run the setup wizard
npm test # boot all three servers and assert routingnpm run dev starts tsc --watch for iterating on tool modules.
Adding a tool
Decide which bucket it belongs to (core / admin / extras) — see V2_BUILD_PLAN.md for the rationale on existing tools.
Add the
server.tool(...)registration to the appropriateregister*Core/register*Admin/register*Extrasfunction insrc/tools/<domain>.ts. Create a new domain file + registrar if needed; export from the file and import/call in the matchingsrc/servers/<bucket>.ts.Update the routing manifest in
scripts/assert-tool-routing.mjsif the tool lands in admin or extras.npm testto verify.Rebuild (
npm run build) and restart your MCP client to pick up the new tool.
Each tool module follows the same pattern — define Zod input schemas and register them with server.tool(). Look at any existing module for the template.
Privacy & safety pipeline
Every Canvas response flows through a three-stage redaction pipeline in canvas-client.ts before it reaches the AI assistant:
Structured PII anonymizer (
src/anonymizer.ts). Walks the response and swaps student names, emails, login IDs, SIS ids, etc. for opaque tokens (Student_<6 hex>) on every user-shaped object. Records each user in a per-course vault keyed by Canvas user_id, with a derived role tag.Free-text name detector (
src/name-detector.ts). Scans free-text fields (discussion bodies, submission prose, comments, descriptions, filenames) for any known student's full name or sortable form ("Jane Doe"/"Doe, Jane") and replaces matches with the student's existing token. Uses Unicode-aware boundaries so names with apostrophes (O'Brien) and hyphens (Smith-Jones) match correctly. Per-course regex is cached and invalidated when the vault changes.Prompt-injection sandbox (
src/sandbox.ts). Wraps the same set of free-text fields with per-process nonce delimiters (<untrusted-canvas-content-NONCE>…</untrusted-canvas-content-NONCE>) so a downstream LLM treats student-authored content as data, not instructions. The nonce is process-random — a student can't guess it to forge a closing tag and "break out" of the sandbox.
On the write path, rehydrateText swaps tokens back to real names and strips any sandbox markers the LLM may have echoed back, so comments and announcements go out correctly addressed and don't leak protection markers into Canvas.
Roles — teachers stay readable
The vault tags each user as student, teacher, or unknown. Roles are derived from enrollment context (enrollments[].type, grader_* / assessor / edited_by / graded_by field positions) and merged monotonically (teacher > student > unknown, never downgrades). Known teachers skip tokenization entirely — their real names pass through to the AI. This keeps workflows like "did I grade this?" working and avoids treating staff as the subject of privacy protection.
CLI tools
canvas-agent reveal Student_a4f2c1 # decode a token (any course)
canvas-agent reveal Student_a4f2c1 --course 42 # single course
canvas-agent reveal --all --course 42 # dump every entry for a course
canvas-agent vault-gc # dry-run report of orphan vault rows
canvas-agent vault-gc --apply # actually prune them
canvas-agent vault-gc --course 42 --verbose # scope + show student-by-student detailvault-gc cleans up orphan rows that accumulated under the pre-1.5.0 id-vs-user_id bug, where each discussion entry / submission / comment minted a phantom vault row keyed by entry id instead of user id. Default mode is dry-run.
The whole pipeline can be disabled with CANVAS_AGENT_ANONYMIZE=0 (turns off both anonymization and free-text name detection) or CANVAS_AGENT_SANDBOX=0 (turns off only the prompt-injection wrapper).
Limits worth knowing
search_termqueries hit Canvas's real-name index. If the AI sends a token, Canvas finds nothing — reveal offline and search byuser_idinstead.download_submissionswrites submission attachments (Word docs, PDFs, etc.) as raw bytes to disk by design. Those files contain real student names and submission content; they stay on your local machine but aren't redacted.The free-text name detector matches only the full name and sortable form. First-name-only and last-name-only references go through unchanged (deliberate — too many false positives on common English words).
Account-level endpoints (
/accounts/*, top-level/conversationslists) carry no per-course context, so the per-course vault doesn't apply to them.
Canvas API gotchas
A few things worth knowing when adding or updating tools:
Grading periods scope grades and submissions to a single semester/term. Pass
grading_period_idto/courses/{id}/enrollments(returns per-periodcurrent_score/current_grade) and to/courses/{id}/students/submissions(returns only that period's submissions). Without it you get cumulative data, which is wrong for year-long courses where the gradebook resets each semester./courses/{id}/grading_periodsreturns a wrapped response —{"grading_periods": [...], "meta": {...}}— so thecanvasAllpagination helper won't flatten it. Usecanvasand unwrap manually (seelist_grading_periodsintools/courses.ts).Analytics endpoints don't support
grading_period_id—get_student_summaries,get_course_assignment_analytics, andget_student_assignment_dataalways return lifetime totals. For semester-scoped data, fetch submissions directly withgrading_period_id.
Links
npm: canvas-agent
Setup guide: hughsibbele.github.io/Canvas-Agent
Canvas API docs: canvas.instructure.com/doc/api
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hughsibbele/Canvas-Agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server