Skip to main content
Glama
zwanner

Canvas LMS MCP Server

by zwanner

Canvas LMS MCP 서버

Model Context Protocol 서버로, MCP 클라이언트(Claude Desktop, Claude Code 또는 MCP를 지원하는 다른 도구)가 Canvas LMS 계정에 읽기 전용으로 접근할 수 있게 해줍니다.

두 가지 질문에 답합니다:

  • "내가 듣는 과목과 성적은?" — 현재 성적이 포함된 진행 중인 과목.

  • "아직 제출할 과제와 마감일은?" — 마감일이 있는 미제출 과제.

통신은 표준 stdio 전송 방식을 사용하므로, 클라이언트가 서버를 하위 프로세스로 실행합니다. MCP 트래픽 외에는 stdout에 아무것도 출력되지 않습니다.

요구 사항

  • Node.js 18.17 이상(서버는 내장 fetch를 사용)

  • Canvas 개인 액세스 토큰

Related MCP server: Canvas MCP Server

설치

cd canvas-mcp-server
npm install

구성

두 변수 모두 필수입니다. 둘 중 하나라도 누락되면 서버는 명확한 메시지를 출력하고 종료됩니다.

변수

설명

예시

CANVAS_API_URL

Canvas 인스턴스 루트 URL. 끝의 / 또는 /api/v1은 자동으로 정규화됩니다.

https://asu.instructure.com

CANVAS_ACCESS_TOKEN

Canvas 개인 액세스 토큰.

7~AbCdEf...

Canvas 액세스 토큰 발급받기

  1. Canvas에 로그인합니다.

  2. **계정 → 설정(Account → Settings)**으로 이동합니다.

  3. 승인된 통합(Approved Integrations) 아래에서 **+ 새 액세스 토큰(New Access Token)**을 클릭합니다.

  4. 용도를 입력하고 (선택 사항) 만료일을 설정한 다음 **토큰 생성(Generate Token)**을 클릭합니다.

  5. 토큰을 즉시 복사하세요. 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

학생으로 현재 등록된 모든 과목과 현재 성적을 반환합니다.

매개변수

유형

기본값

설명

include_all_terms

boolean

false

이미 종료된 학기의 진행 중인 등록 과목도 포함합니다.

기관에서 성적 평가 기간(grading period)을 사용하는 경우 Canvas는 성적을 두 번 보고합니다. 한 번은 진행 중인 평가 기간에 대한 것이고, 다른 한 번은 전체 과목에 대한 것입니다. grades.scope 필드가 어느 것을 가리키는지 나타냅니다:

  • current_grading_period — 점수는 진행 중인 평가 기간을 기준으로 하며, course_total_score / course_total_grade는 전체 과목 성적을 나타냅니다.

  • course_total — 기관에서 평가 기간을 사용하지 않으므로, 점수는 전체 과목 성적입니다.

  • unavailable — Canvas가 성적 데이터가 포함된 등록 정보를 반환하지 않았습니다.

두 범위 모두에서 current_*는 아직 채점되지 않은 과제를 무시하고, final_*는 채점되지 않은 과제를 0점으로 계산합니다.

{
  "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

진행 중인 과목 중 아직 제출하지 않은 과제를 마감일이 가까운 순서대로 정렬하여 반환합니다.

매개변수

유형

기본값

설명

days_ahead

integer 1–365, 또는 null

14

조회할 미래 기간(일). null은 상한을 제거합니다.

include_overdue

boolean

true

기한이 지났지만 제출되지 않은 과제를 포함합니다.

include_undated

boolean

false

마감일이 없는 미제출 과제를 포함합니다.

course_ids

string[]

모든 진행 중 과목

특정 Canvas 과목 ID로 범위를 제한합니다.

과제가 "미제출(outstanding)"로 간주되는 조건은 게시(published)되었고 채점 가능(gradable)하며 아직 제출·채점·면제되지 않은 경우입니다. 구체적으로 다음 항목은 제외됩니다:

  • 제출 타임스탬프가 있는 항목

  • 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"
}

하나의 과목을 읽을 수 없는 경우(제한됨, 종료됨 또는 기타 오류) 해당 과목은 errors에 나열되고 나머지 과목은 계속 결과를 반환합니다.

동작 참고 사항

  • 페이지네이션. Canvas는 모든 컬렉션을 Link 헤더로 페이지네이션합니다. 클라이언트는 페이지당 100개 레코드 기준으로 rel="next"를 따라가며, 엔드포인트당 최대 20페이지로 제한되어 잘못된 응답으로 인한 무한 루프를 방지합니다.

  • 동시성. 과제는 한 번에 최대 5개 과목씩 가져와 Canvas 속도 제한을 피합니다.

  • 현재 학기. 기본적으로 종료되지 않은 학기의 과목만 반환됩니다. Canvas의 기본 학기는 종료일이 없으므로 항상 포함됩니다.

  • 오류. Canvas 오류는 MCP 도구 오류로 반환되며, 상태 코드와 Canvas의 원본 메시지, 그리고 일반적인 경우에 대한 힌트(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

Available Tools

2 tools
list_courses_and_gradesList active courses and gradesA
Read-only

Fetch every course the user is actively enrolled in as a student, together with the current grade for each. When the institution uses grading periods, the score reported is for the grading period in progress and the whole-course total is included alongside it (see the 'scope' field). Defaults to the current term only.

NameRequiredDescriptionDefault
include_all_termsNoInclude active enrollments from terms that have already ended.

Output Schema

NameRequiredDescription
coursesYes
course_countYes
retrieved_atYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true. The description adds useful behavioral nuance beyond those: grading-period behavior, inclusion of the whole-course total alongside the in-progress score, and the 'scope' field for interpretation. This is valuable context for a read-only listing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences. The first sentence front-loads the primary purpose, and the second adds an important grading-period nuance. There is no filler or repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only listing tool with one optional parameter, an output schema, and high schema coverage, the description is complete. It explains active enrollment, grading-period behavior, and term defaulting, which is sufficient for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the only parameter, include_all_terms, is well documented in the schema with a clear description and default value. The main description restates the default behavior ('Defaults to the current term only') but adds no additional parameter-level meaning, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Fetch every course the user is actively enrolled in as a student') and a clear resource ('courses... together with the current grade for each'). It also adds meaningful scope distinctions like 'Defaults to the current term only' and grading-period behavior, which clearly separates it from the sibling assignment-listing tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: when you need active course enrollments and current grades, defaulting to the current term. It does not explicitly mention alternatives or exclusions relative to list_upcoming_assignments, but the course/grade vs. assignment subject matter implies the boundary clearly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_upcoming_assignmentsList upcoming unsubmitted assignmentsA
Read-only

Fetch assignments across the user's active courses that are still outstanding — not submitted, not graded, and not excused — with their due dates, sorted soonest first. Past-due work that was never turned in is included by default.

NameRequiredDescriptionDefault
course_idsNoRestrict to these Canvas course IDs. Defaults to all active courses.
days_aheadNoHow far ahead to look, in days. Pass null for no upper bound.
include_overdueNoInclude past-due assignments that were never submitted.
include_undatedNoInclude outstanding assignments that have no due date.

Output Schema

NameRequiredDescription
errorsYesCourses that could not be read; the rest of the results are still valid.
windowYes
assignmentsYes
retrieved_atYes
courses_checkedYes
assignment_countYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true and openWorldHint=true, so the description doesn't need to repeat those. It goes beyond the annotations by specifying the filtering logic (not submitted, not graded, not excused), sorting order (soonest first), and default inclusion of overdue items. This adds useful behavioral context without contradicting the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and every clause adds value. It efficiently conveys the tool's scope, filtering criteria, ordering, and default behavior without any fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists (as noted in the context), the description doesn't need to explain return values. The tool is relatively simple with 4 optional parameters, and the description plus schema fully cover the behavior. It could be a 5, but the absence of any prerequisites or error conditions keeps it at a solid 4.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers 100% of the parameters with descriptions. The tool description adds a bit more by explaining the filtering and sorting behavior, which relates to how the parameters interact (e.g., include_overdue default true). Since schema coverage is high, a baseline 3 is appropriate, but the description's mention of 'sorted soonest first' and 'Past-due work ... included by default' adds context beyond the schema, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Fetch') and identifies the resource ('assignments across the user's active courses') with clear criteria ('not submitted, not graded, not excused'). It also notes the sorting by due date and the inclusion of past-due unsubmitted work, which distinguishes it from the sibling tool (list_courses_and_grades) that focuses on grades and courses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes it clear that the tool is for outstanding assignments, which implies using it when you need to see what's due or overdue. It does not explicitly state when NOT to use it or mention the sibling alternative, but the context is sufficiently clear for most use cases, and the default behavior (including overdue) is disclosed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedlist_courses_and_grades
    • First observedlist_upcoming_assignments

TDQS

A4.3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools serve clearly distinct purposes: one retrieves course enrollments with grades, the other retrieves upcoming assignments. There is no ambiguity in selecting between them.

Naming Consistency5/5

Both tools follow a consistent 'list_' prefix followed by a clear noun phrase ('courses_and_grades', 'upcoming_assignments'), making the naming pattern uniform and predictable.

Tool Count3/5

With only two tools, the server feels minimal but not entirely unreasonable for a focused student dashboard scope. The count is at the borderline of being thin, as agents may expect additional related operations.

Completeness3/5

The tool surface covers the two primary student needs (grades and upcoming assignments) but lacks operations like retrieving individual course details, assignment submissions, or past assignmentscars. This leaves notable gaps for broader academic workflows, though it may suffice for a narrow use case.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers