返回 MCP 目录
public公开dns本地运行

Canvas LMS

Canvas MCP 是一套工具集,使AI代理能够与Canvas LMS和Gradescope交互,提供课程资源查询、作业管理等功能。

article

README

🚀 Canvas MCP 教师版

Canvas MCP 是一套强大的工具,能让您的 AI 代理与 Canvas LMS 和 Gradescope 实现交互,为教学管理工作带来极大便利。

smithery badge

gradescope

example

✨ 主要特性

  • 查找相关资源:使用自然语言查询时,能够精准找到相关资源。
  • 查询即将来临的作业:不仅可以获取即将到来的作业,还能为给定课程提供其详细分解信息。
  • 从 Gradescope 获取课程和作业:使用自然语言查询 Gradescope 课程和作业,获取提交状态等信息,了解更多详情。
  • 丰富的数据获取功能:可获取课程、模块、模块项目、文件链接、日历事件、作业等信息。

📦 安装指南

事先记录下以下内容:

  1. Canvas > 账户 > 设置 > 已批准的集成 > 新访问令牌 处获取 Canvas API 密钥。
  2. Gemini API 密钥 https://aistudio.google.com/app/apikey
  3. Gradescope 邮箱和密码 https://www.gradescope.com/

通过 Smithery 安装(推荐)

要通过 Smithery 自动安装 Canvas MCP 以便在 Claude Desktop 上使用:

npx -y @smithery/cli install @aryankeluskar/canvas-mcp --client claude

或者,用于 Cursor IDE 与其他模型一起使用的 canvas-mcp:

npx -y @smithery/cli install @aryankeluskar/canvas-mcp --client cursor

或者,用于 Windsurf:

npx -y @smithery/cli install @aryankeluskar/canvas-mcp --client windsurf

手动安装(仅限本地实例)

下载该仓库并运行以下命令:

git clone https://github.com/aryankeluskar/canvas-mcp.git
cd canvas-mcp

# 使用 uv 安装依赖项(推荐)
pip install uv
uv venv
source .venv/bin/activate  # Windows 系统下:.venv\Scripts\activate
uv pip install -r requirements.txt

# 或使用 pip 安装
pip install -r requirements.txt

手动配置

在根目录中创建一个 .env 文件,包含以下环境变量:

CANVAS_API_KEY=your_canvas_api_key
GEMINI_API_KEY=your_gemini_api_key

将以下内容添加到您的 mcp.jsonclaude_desktop_config.json 文件中:

{
  "mcpServers": {
      "canvas": {
          "command": "uv",
          "args": [
              "--directory",
              "/Users/aryank/Developer/canvas-mcp",
              "run",
              "canvas.py"
          ]
      }
  }
}

Aryan Keluskar 开发!

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端