Canvas LMS MCP Server
Canvas LMS MCP Server
Model Context Protocol サーバーで、MCP クライアント(Claude Desktop、Claude Code、その他 MCP を話せるものなら何でも)に Canvas LMS アカウントへの読み取り専用アクセスを提供します。
次の2つの質問に答えます:
「何を受講していて、成績はどうか?」 — 現在の成績が付いているアクティブなコース。
「まだ提出していないものは何で、いつ締切か?」 — 期限が設定されている未提出の課題。
通信は標準の stdio トランスポートを使用するため、クライアントはサーバーをサブプロセスとして起動します。MCP トラフィック以外は stdout に書き込まれません。
要件
Node.js 18.17 以降(サーバーは組み込みの
fetchを使用)Canvas の個人アクセストークン
Related MCP server: Canvas MCP Server
インストール
cd canvas-mcp-server
npm install設定
両方の変数が必須です。どちらかが欠けている場合、サーバーは明確なメッセージを表示して終了します。
変数 | 説明 | 例 |
| Canvas インスタンスのルート。末尾の |
|
| Canvas の個人アクセストークン。 |
|
Canvas アクセストークンの取得
Canvas にログインします。
Account → Settings に移動します。
Approved Integrations の下にある + New Access Token をクリックします。
目的を入力し、(任意で)有効期限を設定して、Generate Token をクリックします。
トークンをすぐにコピーします — Canvas は一度しか表示しません。
このトークンは Canvas のすべての権限を持ちます。バージョン管理には含めず、漏洩した場合は同じ設定ページから失効させてください。
クライアントの接続
MCP クライアント設定にサーバーを追加し、src/index.js の絶対パスを指定します:
{
"mcpServers": {
"canvas": {
"command": "node",
"args": ["/absolute/path/to/canvas-mcp-server/src/index.js"],
"env": {
"CANVAS_API_URL": "https://asu.instructure.com",
"CANVAS_ACCESS_TOKEN": "your-token-here"
}
}
}
}Claude Desktop —
claude_desktop_config.json(macOS:~/Library/Application Support/Claude/、Windows:%APPDATA%\Claude\)。Claude Code —
claude mcp add canvas --env CANVAS_API_URL=... --env CANVAS_ACCESS_TOKEN=... -- node /absolute/path/to/canvas-mcp-server/src/index.js
設定を編集したらクライアントを再起動します。
ツール
list_courses_and_grades
学生としてアクティブに登録されているすべてのコースと、その現在の成績。
パラメータ | 型 | デフォルト | 説明 |
| boolean |
| すでに終了したタームのアクティブな登録も含めます。 |
あなたの機関が grading period を使用している場合、Canvas は成績を2回報告します。進行中の period のものと、コース全体のものです。grades.scope フィールドはどちらを見ているかを示します:
current_grading_period— スコアは進行中の grading period を対象としており、course_total_score/course_total_gradeにはコース全体の数値が入ります。course_total— 機関が grading period を使用していないため、スコアはコース合計です。unavailable— Canvas が成績データ付きの登録を返しませんでした。
どちらのスコープでも、current_* はまだ採点されていない課題を無視しますが、final_* は未採点の課題をゼロとして数えます。
{
"courses": [
{
"id": "101",
"name": "Full Stack Web Development",
"course_code": "GIT-411",
"term": "Fall 2026",
"term_start": "2026-08-20T00:00:00Z",
"term_end": "2026-12-18T00:00:00Z",
"enrollment_state": "active",
"grades": {
"current_score": 88.0,
"current_grade": "B+",
"final_score": 80.5,
"final_grade": "B-",
"scope": "current_grading_period",
"grading_period_title": "Fall Term",
"course_total_score": 91.4,
"course_total_grade": "A-"
},
"html_url": "https://asu.instructure.com/courses/101"
}
],
"course_count": 1,
"retrieved_at": "2026-09-01T12:00:00.000Z"
}list_upcoming_assignments
アクティブなコース全体でまだ未提出の課題を、期限日順(早い順)に並べたもの。
パラメータ | 型 | デフォルト | 説明 |
| 整数 1〜365、または |
| どのくらい先まで見るか。 |
| boolean |
| 提出されていない期限切れの課題を含めます。 |
| boolean |
| 期限日のない未提出の課題を含めます。 |
| string[] | すべてのアクティブなコース | 特定の Canvas コース ID に制限します。 |
課題は、公開され、採点可能で、未提出・未採点・未免除の場合に未提出としてカウントされます。具体的には、以下は除外されます:
提出タイムスタンプがあるもの
submitted、pending_review、またはgraded状態の提出免除された課題
すでにスコアまたは成績が付いている課題(手動または紙ベースの入力)
not_gradedの課題(出席プレースホルダーなど)非公開の課題
{
"assignments": [
{
"id": "9004",
"name": "Missed lab writeup",
"course_id": "101",
"course_name": "Full Stack Web Development",
"due_at": "2026-08-28T06:59:00.000Z",
"days_until_due": -4.2,
"overdue": true,
"points_possible": 25,
"submission_types": ["online_upload"],
"submission_state": "unsubmitted",
"missing": true,
"locked": false,
"unlock_at": null,
"lock_at": null,
"html_url": "https://asu.instructure.com/courses/101/assignments/9004"
}
],
"assignment_count": 1,
"courses_checked": 2,
"window": {
"from": "2026-09-01T12:00:00.000Z",
"to": "2026-09-15T12:00:00.000Z",
"include_overdue": true,
"include_undated": false
},
"errors": [],
"retrieved_at": "2026-09-01T12:00:00.000Z"
}1つのコースが読み取れない場合 — 終了済み、制限付き、その他のエラー — そのコースは errors にリストされ、残りのコースは結果を返し続けます。
動作に関する注意
ページネーション。 Canvas はすべてのコレクションを
Linkヘッダーでページ分割します。クライアントはエンドポイントごとに100レコードずつrel="next"をたどり、最大20ページまでで打ち切るため、不正なレスポンスが無限ループを引き起こすことはありません。並行性。 Canvas のレート制限を避けるため、課題は最大5コースから同時に取得されます。
現在のターム。 デフォルトでは、タームが終了していないコースのみが返されます。Canvas のデフォルトタームには終了日がなく、常に含まれます。
エラー。 Canvas の失敗は、ステータスコードと Canvas 自身のメッセージを含む MCP ツールエラーとして返され、一般的なケース(401 → トークン不正、404 → URL 誤り)のヒントが付きます。
読み取り専用。 両方のツールは
readOnlyHintで注釈されています。サーバーはGETリクエストのみを発行し、Canvas データを変更することはありません。
開発
npm test # 36 tests: API client, grade logic, filtering, and an end-to-end MCP round tripテストスイートは記録された Canvas ペイロードを持つ fetch の代替を使用するため、ネットワークや実際のトークンは不要です。すべてのフィクスチャの日付は、テストが実行される時点を基準にしています。
src/
index.js MCP server: tool definitions, schemas, stdio wiring
canvas.js Canvas REST client: auth, pagination, error mapping
courses.js Active-course and grade normalization
assignments.js Outstanding-assignment filtering and due-date windowsライセンス
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceEnables interaction with Canvas LMS courses and assignments directly from your LLM, allowing you to retrieve, search, and summarize course information, check due dates, and access assignment details without leaving your AI assistant.4330
- FlicenseBqualityNot gradedmaintenanceProvides read-only access to Canvas LMS for students to retrieve courses, assignments, grades, files, discussions, and planner items. Includes optional NotebookLM integration for uploading course content to AI-powered study notebooks.45330
- AlicenseAqualityCmaintenanceEnables AI systems to interact with Canvas Learning Management System data, allowing users to access courses, assignments, quizzes, planner items, files, and syllabi through natural language queries.227MIT
- FlicenseBqualityDmaintenanceEnables interaction with Canvas LMS to access courses, modules, files, pages, assignments, submissions, announcements, upcoming deadlines, and syllabus.15
Related MCP Connectors
Read-only bank access for your AI agent. Connects Claude, ChatGPT, Cursor, Gemini, Codex.
Voice-led, FSRS-scheduled flashcards from YouTube, PDFs, web, or text. Auto-graded quizzes.
Read-only access to your VortexIQ store data: audits, KPIs, alerts, Brand DNA, reports, Ask VIQ.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/zwanner/canvas-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server