Canvas Mcp

io.github.admin978由 GitHub 帳號 admin978 發布v0.1.3更新於 Oct 25, 2026

Local-first MCP server for Canvas LMS. Stdio transport, no third-party broker.

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

在本機執行的 MCP 伺服器,讓助理讀取 Canvas LMS 的課程、作業、模組、成績、公告與規劃事項。

可以做什麼
列出課程及其作業、模組與公告,並讀取個別課程頁面與檔案資訊。依課程取得成績,並彙整各課程的規劃事項、即將到來的事件與待辦項目。另有獨立命令列工具可將課程檔案與相關內容批次下載到本機資料夾,方便離線建立索引。
適用情境
適合學生或教師想讓助理跨多門 Canvas 課程查詢截止日期、課程內容與成績,而不必在瀏覽器中開啟 Canvas 的情況。
執行需求
透過 stdio 在本機執行,需要 Python 3.10+ 與 PyPI 上的 canvas-local-mcp 套件。需在 CANVAS_BASE_URL 填入學校的 Canvas 根網址,並在 CANVAS_TOKEN 提供 Canvas 個人存取權杖,通常存放在本機環境檔案中。需要能連線到學校的 Canvas API。
安裝前請注意
CANVAS_TOKEN 中的 Canvas 個人存取權杖可存取你的 Canvas 帳號,請妥善保管環境檔案,外洩時應立即撤銷或更換權杖。批次下載工具會將課程檔案寫入本機目錄。專案標示為 alpha,單一使用者使用且不提供任何保證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Canvas Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Canvas LMS MCP Server (canvas-mcp)

[CI] [PyPI] [Python] [License]

Ask Claude about your Canvas courses, assignments, deadlines, modules, and grades from one place.

canvas-mcp is a local-first MCP server for Canvas LMS users (students, instructors, and MCP builders). It turns Canvas REST API actions into MCP tools that work from Claude Code, Claude Desktop, and other MCP-compatible clients.

Status: alpha. Single-user, no warranty, API surface may still shift. File issues if it breaks.

Who this is for

  • Students who want one view across multiple courses
  • Educators who want faster access to assignments, modules, and announcements
  • MCP users who want Canvas data in local Claude workflows

What you can ask Claude

  • “What assignments are due this week across all my active courses?”
  • “Show upcoming events and planner items for next week.”
  • “List my current grades by course.”
  • “Get the modules (with items) for course 12345.”
  • “Show announcements for course 12345.”
  • “Fetch the page syllabus from course 12345.”

Quick start

Prerequisite: Python 3.10+.

1) Create a Canvas personal access token

In Canvas: Account → Settings → Approved Integrations → + New Access Token. Copy the token shown (Canvas does not show it again later).

2) Install

From PyPI (recommended):

bash
pip install canvas-local-mcp

Or from source:

bash
git clone https://github.com/admin978/canvas-mcp.git && cd canvas-mcppython3 -m venv .venv && source .venv/bin/activatepip install -e .

3) Configure ~/.canvas.env

bash
curl -fsSL https://raw.githubusercontent.com/admin978/canvas-mcp/main/.canvas.env.example -o ~/.canvas.envchmod 600 ~/.canvas.env# edit ~/.canvas.env: set CANVAS_BASE_URL (institution root, no /api/v1)# and paste the token into CANVAS_TOKEN

For token safety guidance (least privilege, file permissions, rotation/revocation, and vulnerability reporting), see SECURITY.md.

4) Register in your MCP client

Claude Code:

bash
claude mcp add canvas-local -- canvas-local-mcp

Claude Desktop:

  • macOS example path: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows example path: %APPDATA%\Claude\claude_desktop_config.json
  • Linux example path: ~/.config/Claude/claude_desktop_config.json
json
{  "mcpServers": {    "canvas-local": {      "command": "canvas-local-mcp"    }  }}

Tools exposed

  • list_courses
  • list_assignments
  • list_modules
  • list_announcements
  • get_page
  • get_file_info
  • get_grades
  • planner_items
  • upcoming_events
  • todo

Bulk dump

canvas-local-mcp-dump downloads course files and related content for offline indexing.

bash
canvas-local-mcp-dump              # all active coursescanvas-local-mcp-dump 12345 67890  # specific course IDs

Output goes to ./canvas-dump/ by default. Override with CANVAS_DUMP_DIR=/path/to/dir.

Local-first, privacy and token flow

  • The server runs locally and uses stdio transport with your MCP client.
  • Configuration is read from ~/.canvas.env (CANVAS_BASE_URL, CANVAS_TOKEN).
  • Requests go from your local server to the official Canvas API endpoints.
  • No external token broker is used in the request path.
  • Security guidance and disclosure policy: SECURITY.md.

Demo

No demo GIF is currently committed yet. You can still verify the workflow quickly:

Try these prompts

After registering the MCP server, ask Claude:

  • “List my active Canvas courses.”
  • “What assignments are due this week across all my active courses?”
  • “Show upcoming events and planner items for next week.”
  • “List my current grades by course.”

Placeholder: add a short terminal/GIF walkthrough here in a future PR.

Development

Requires Python 3.10+.

bash
pip install -e ".[dev]"ruff check canvas_local_mcp tests   # lintpytest                              # tests run against a mocked Canvas API — no token needed

CI runs lint + tests on Python 3.10–3.13 for every push and pull request.

Publishing a new release

Follow this order to publish a new version (e.g. 0.1.4) consistently across PyPI and the MCP Registry.

1. Bump the version everywhere

Update all three files to the new version string in a single PR:

FileField
pyproject.toml[project].version
canvas_local_mcp/__init__.py__version__
server.jsonroot version and packages[0].version

The CI test test_server_json_version_matches_package and the workflow validation step will fail if any of these three disagree.

2. Merge the PR into main

Wait for all CI checks to pass before merging.

3. Publish canvas-local-mcp to PyPI

The project uses Trusted Publisher (OIDC) for PyPI uploads. Trigger the PyPI publish workflow (or run python -m build && twine upload dist/* if you have credentials configured) before creating the tag, so the package is available when the MCP Registry fetches it.

4. Create and push the tag vX.Y.Z

bash
git tag v0.1.4git push origin v0.1.4

This triggers the Publish to MCP Registry workflow, which:

  1. Validates that server.json, pyproject.toml, and the tag all declare the same version.
  2. Publishes server.json to the MCP Registry via GitHub OIDC (no secrets needed).

5. Verify

  • PyPI: https://pypi.org/project/canvas-local-mcp/
  • MCP Registry: https://registry.modelcontextprotocol.io/?q=canvas-mcp
  • GitHub Actions: https://github.com/admin978/canvas-mcp/actions

Important: never reuse or move an existing tag. If you need to re-publish after a mistake, bump to the next patch version (e.g. 0.1.4) and start from step 1.

Contributing, roadmap and support

  • Issues / feature requests
  • Pull requests are welcome for bug fixes and Canvas workflow improvements
  • Roadmap direction currently lives in open issues and upcoming PRs

If this project helps you manage Canvas with Claude, please try the flow above and consider giving it a ⭐ so other students and educators can find it.

License

MIT — see LICENSE.


Built by AGENTE 404 S.L. · [email protected]

來源:README.md,提交 cead98e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分