Logo: Canvas MCP

Canvas MCP

Communautéit
boyuchengz

Read-only MCP server that connects Claude, ChatGPT and other AI assistants to Canvas LMS.

Editeurboyuchengz
Repositorycanvas-mcp
SproochJavaScript
Forks
29
Stären
117
Disponibel Tools
0
Transporttypstreamable-http
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Canvas MCP bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 117, Forks: 29.

canvas-mcp

CI License: MIT Node.js MCP

English | 简体中文

A read-only Model Context Protocol server for Canvas LMS. Deploy it once, add it as a custom connector in Claude or ChatGPT, and ask questions about your courses in plain language:

What's due this week, and which of it have I already submitted? What do I need on the final to keep an A in CS 225? Summarize the announcements from the last two weeks. Did the TA leave any comments on my last lab?

Every one of the 26 tools issues GET requests only. The server cannot submit, post, delete or mark anything as read, so even a leaked connector URL only exposes what you could already see.

Contents

Features

  • Every tool is read-only. No write endpoints are wrapped, and inbox threads and discussions are fetched without marking them as read.
  • The tools are built around the questions students actually ask: deadlines across all courses, missing work, grade weights, feedback and syllabus policies.
  • Output is compact. Canvas HTML becomes plain text, and responses keep only the fields a model needs.
  • It runs remotely over Streamable HTTP, so it works in web and mobile clients, not only desktop apps.
  • It's stateless. Each request gets a fresh server instance, and nothing is cached or stored.
  • Three runtime dependencies, no build step, no database.

Tools

AreaToolWhat it returns
Courseslist_coursesActive courses with IDs, codes and terms
get_syllabusSyllabus text
get_front_pageCourse home page text
list_modulesModules and the items inside each
list_pages / get_pageWiki pages and their contents
list_course_staffInstructors and TAs, with email when visible
list_groupsYour project / lab groups
Courseworkget_upcomingEverything due in the next N days, with submission status
get_todoCanvas To Do list
get_missingPast-due work you haven't submitted
list_assignments / get_assignmentAssignments, instructions, rubric, your score and feedback
list_quizzes / get_quizClassic Quizzes, settings and your attempts
get_calendar_eventsLectures, exams and office hours from the calendar
Gradesget_gradesCurrent and final score in every course
get_grade_breakdownAssignment groups, weights, drop rules and every score
Fileslist_files / get_fileCourse files; text-based files are returned inline
Communicationget_announcementsRecent announcements across courses
list_discussions / get_discussionDiscussion topics and full reply threads
list_inbox / get_inbox_messageInbox conversations and messages
get_recent_activityActivity stream: new grades, comments, replies

Parameters and output fields for each tool are documented in docs/tools.md.

How it works

The AI client calls the server at a URL that contains a long random secret. The server checks the secret in constant time, translates the tool call into one or more Canvas REST API GET requests using your personal access token, follows pagination, and returns a trimmed JSON result. The Canvas token never leaves the server.

Quick start

1. Create a Canvas access token

In Canvas, open Account → Settings, scroll to Approved Integrations, and click + New Access Token. Give it a purpose (e.g. "canvas-mcp") and an expiry date, then copy the token. Canvas only shows it once.

Some institutions restrict personal access tokens. Check your school's acceptable-use policy before deploying.

2. Generate a connector secret

bash
node -e "console.log(require('crypto').randomBytes(24).toString('hex'))"

3. Deploy

The server runs anywhere Node.js 20+ can accept HTTPS traffic. Railway is the quickest option:

bash
npm i -g @railway/cli
railway login
railway init
railway up

Then, in the Railway dashboard:

  1. Variables: add CANVAS_BASE_URL, CANVAS_API_TOKEN and MCP_SECRET.
  2. Settings → Networking: click Generate Domain.

Your connector URL is:

https://<your-domain>/<MCP_SECRET>/mcp

Render, Fly.io, a VPS and local setups are covered in docs/deployment.md.

Connecting a client

Claude (claude.ai, desktop and mobile): open Settings → Connectors, choose Add custom connector, and paste the connector URL. Leave the OAuth fields empty.

ChatGPT: enable developer mode for connectors, create a new connector, paste the connector URL and choose No authentication.

Claude Code:

bash
claude mcp add --transport http canvas https://<your-domain>/<MCP_SECRET>/mcp

Any other MCP client that supports the Streamable HTTP transport can use the same URL.

Start a conversation with something like "List my Canvas courses" to confirm it works.

Configuration

VariableRequiredDescription
CANVAS_BASE_URLyesYour Canvas instance, e.g. https://canvas.instructure.com or https://canvas.<school>.edu
CANVAS_API_TOKENyesPersonal access token from Canvas
MCP_SECRETyesRandom string of at least 24 URL-safe characters (A–Z a–z 0–9 - _); becomes part of the connector URL
PORTnoPort to listen on. Defaults to 8080; most platforms set it for you

The server validates all variables at startup and exits with a clear message if anything is missing.

Security

  • The Canvas client only exposes GET helpers, so there is no code path that writes to Canvas.
  • Requests without the correct secret get the same 404 as any unknown URL, and the secret is compared in constant time.
  • The Canvas token is only sent to CANVAS_BASE_URL. Pagination links to any other host are ignored, and file downloads use Canvas's pre-signed URLs without the token.
  • Nothing is cached or stored, and only errors are logged.

Treat the connector URL like a password: anyone who has it can read your Canvas data. If it leaks, change MCP_SECRET and redeploy. If your Canvas token leaks, delete it under Approved Integrations.

See SECURITY.md for how to report a vulnerability.

Limitations

  • Each deployment serves one user, since the server acts as whoever owns the token. Run a separate instance for each person.
  • PDFs, slides and Office files aren't parsed. get_file returns a temporary download link for them instead.
  • New Quizzes appear in list_assignments, not list_quizzes, and the Canvas API never exposes quiz questions to students.
  • Lists are capped at 500 items (5 pages of 100) per call, and long text at 20,000 characters.
  • get_calendar_events without a course_id covers at most 10 courses, which is a Canvas API limit.

Development

bash
git clone https://github.com/boyuchengz/canvas-mcp.git
cd canvas-mcp
npm install
cp .env.example .env   # fill in your values
npm run dev            # restarts on file changes
npm test

Inspect the running server interactively with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector
# Transport: Streamable HTTP, URL: http://localhost:8080/<MCP_SECRET>/mcp

Project structure

src/
├── server.js            Entry point: config, HTTP listener, graceful shutdown
├── app.js               Express app, secret check, MCP transport
├── config.js            Environment validation
├── canvas.js            Read-only Canvas REST client with pagination
├── text.js              HTML → plain text
└── tools/
    ├── courses.js       Courses, syllabus, modules, pages, staff, groups
    ├── coursework.js    Planner, to-do, assignments, quizzes, calendar
    ├── grades.js        Course totals and grade breakdown
    ├── files.js         File listing and content
    └── communication.js Announcements, discussions, inbox, activity
test/                    node:test suites (no network access needed)

Contributing

Bug reports, feature ideas and pull requests are welcome. Please read CONTRIBUTING.md first. New tools must stay read-only.

License

MIT © Boyucheng Zhang

This project is not affiliated with or endorsed by Instructure, Inc. Canvas is a trademark of Instructure, Inc.

Installatioun

TypingMind
{
  "mcpServers": {
    "boyuchengz-canvas-mcp": {
      "url": "https://<your-domain>/<MCP_SECRET>/mcp"
    }
  }
}

Canvas MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Canvas MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun verbënnt sech an TypingMind iwwer d'URL vun engem gehoste MCP-Server.

Eng MCP-Server-URL derbäisetzen

Benotzt dës Optioun, wann Canvas MCP schonn op engem externe Server gehost gëtt oder Är Ekipp ee gemeinsame Connector wëllt, op dee méi Benotzer kënne zougräifen.

1

MCP-Connectoren opmaachen

Gitt an TypingMind op „Plugins“, maacht „MCP-Connectoren“ op a wielt dann „URL derbäisetzen“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Gitt op „Plugins“.
  3. Maacht „MCP-Connectoren“ op.
  4. Klickt op „URL derbäisetzen“.
TypingMind-Formulaire, fir eng benotzerdefinéiert MCP-Server-URL derbäizesetzen
2

Déi kopéiert Server-URL asetzen

Gitt https://<your-domain>/<MCP_SECRET>/mcp am Feld „Server-URL“ an. Setzt e Verbindungsnumm, eng Beschreiwung, e Symbol, benotzerdefinéiert HTTP-Headeren oder OAuth-Clientastellungen derbäi, wann de Server se erfuerdert.

  1. Setzt https://<your-domain>/<MCP_SECRET>/mcp an d'Feld „Server-URL“ an.
  2. Gitt en Numm fir d'Verbindung mat Canvas MCP an.
  3. Wann Dir d'Verbindung méi einfach erëmerkenne wëllt, setzt eng Beschreiwung an e Symbol derbäi.
  4. Setzt benotzerdefinéiert HTTP-Headeren oder OAuth-Clientdetailer derbäi, wann de Server eng Authentifizéierung erfuerdert.
3

D'Verbindung erstellen

Klickt op „Verbindung erstellen“, gitt dann zeréck op d'Plugin-Lëscht a kontrolléiert, ob déi nei MCP-Verbindung aktiv ass.

  1. Klickt op „Verbindung erstellen“.
  2. Gitt zeréck op d'Lëscht vun de MCP-Connectoren.
  3. Kontrolléiert, ob d'Verbindung mat Canvas MCP als aktiv ugewise gëtt.
  4. Aktualiséiert d'Plugin-Lëscht, wann d'Verbindung net direkt ugewise gëtt.
4

Modeller wiesselen, ouni MCP nei ze verbannen

Start e Chat mat Ärem bevorzugte Modell, aktivéiert d'Tools vun der Integratioun Canvas MCP ënner „Plugins“ a wiesselt bei Bedarf op en anere Modell. D'MCP-Verbindung bleift am TypingMind-Aarbechtsberäich disponibel.

  1. Start en neie Chat an TypingMind.
  2. Wielt de KI-Modell, deen Dir benotze wëllt.
  3. Aktivéiert d'Tools vun der Integratioun Canvas MCP ënner „Plugins“.
  4. Biet de Modell, d'Tool ze benotzen, wann néideg.
  5. Wiesselt op en anere KI-Modell a benotzt déiselwecht MCP-Verbindung weider.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat Canvas MCP bei dëser Aufgab hëllefen?
Canvas MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Canvas MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server Canvas MCP benotzt?

Canvas MCP ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Canvas MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Canvas MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat Canvas MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Canvas MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech Canvas MCP MCP mat TypingMind?

Dir kënnt Canvas MCP mat TypingMind verbannen, andeems Dir d'URL vu sengem gehosten MCP-Server derbäisetzt. Dat ass nëtzlech, wann Dir eng Remote-MCP-Verbindung wëllt, op déi Dir vun Ärem TypingMind-Aarbechtsberäich aus zougräife kënnt.

Wéi eng Tools stellt Canvas MCP MCP an TypingMind zur Verfügung?

Canvas MCP stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Canvas MCP MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Canvas MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇