前言¶
在 DeepSeek Harness(DSH)里做带联网能力的智能体时,课程、作业截止日和名册往往还在 Google Classroom 网页或单独脚本里查。模型若不能直接调用结构化接口,就只能靠用户口述或复制粘贴,既慢也容易漏掉跨课程汇总(例如「这周有什么要交」)。
下面介绍社区插件 dsh-plugin-google-classroom(npm 包名 dsh-google-classroom):它把 google-classroom-mcp 以 MCP 工具形式挂进 DSH,模型可通过 mcp__google-classroom__* 只读查询课程、作业、公告、名册与提交状态。插件本身不含 Host/Client 代码,仅通过 cordis.patch.yml 插入一条 @deepseek-ai/dsh-mcp-client 配置。
这是什么¶
- 维护者:praisethefacts
- 分类:联网工具(社区目录 SkillHub 插件页)
- 源码:github.com/praisethefacts/dsh-plugin-google-classroom
- 许可证:MIT(
package.json版本 0.1.0,要求 Node >=20)
DSH 的生态思路是「一切皆插件」;SkillHub 等目录由社区维护,与 DeepSeek / 幻方无官方从属关系。本插件是 configuration-only bundle:package.json 声明 dsh.bundle.patch,由补丁向 Cordis 写入 MCP 客户端行,运行时通过 uvx 按需拉取并启动 google-classroom-mcp 服务。
核心功能¶
所有暴露给模型的工具均为 只读,命名空间为 mcp__google-classroom__*:
| 工具 | 返回内容 |
|---|---|
list_courses |
你任教或就读的课程 |
get_course |
单门课程详情(含描述、加入码) |
list_coursework |
作业、测验、问题与材料(含截止日期) |
list_due_soon |
所有活跃课程中即将到期的作业 |
list_announcements |
课程内近期公告 |
list_teachers / list_students |
名册(姓名、邮箱) |
list_submissions |
某次作业的提交状态与成绩 |
前置条件¶
启用插件前需完成 Google OAuth 与一次性登录(步骤以 google-classroom-mcp — Setup 第 1–3 步为准):
- 在 Google Cloud 创建面向 Classroom API 的 OAuth 桌面客户端,保存为
~/.google-classroom-mcp/client_secret.json。 - 安装 uv(提供
uvx),可从 astral.sh/uv 安装,或pip install uv。bundle 用uvx按需运行服务端,无需单独pip installMCP 包。 - 执行一次性登录:
uvx --from git+https://github.com/praisethefacts/google-classroom-mcp@v0.1.0 google-classroom-mcp-auth
凭证与 token 落在 ~/.google-classroom-mcp/。DSH 启动 stdio 子进程时会 scrub 名称像凭证的环境变量(KEY、PASSWORD、SECRET、TOKEN),因此本 bundle 依赖上述 token 文件,不依赖环境变量注入密钥。
安装与启用¶
在 DSH 侧边栏打开 Plugins,填入下列 spec 之一并 Enable now:
github:praisethefacts/dsh-plugin-google-classroom- 或本仓库目录的绝对路径(若本地已有副本)
或在终端执行(将 <profile> 换成你的 profile 名,例如 web 或 desktop):
dsh plugin --profile <profile> add github:praisethefacts/dsh-plugin-google-classroom
默认补丁会通过 uvx 运行:
uvx --from git+https://github.com/praisethefacts/google-classroom-mcp@v0.1.0 google-classroom-mcp
若已本地安装或克隆 MCP 服务,可在 安装前 编辑 cordis.patch.yml,改 command / args,例如:
- insert:
- id: mcp-google-classroom
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: google-classroom
transport: stdio
command: google-classroom-mcp
典型用法与验证¶
安装并完成 Prerequisites 后,可直接问模型:What do I have due this week?,或让模型调用 mcp__google-classroom__list_courses。
首次工具调用可能较慢(uvx 需下载服务端与依赖),之后通常会快很多。
若每次调用都返回 No valid Google credentials found...,说明尚未完成一次性 sign-in,请回到前置条件。若 Google API 报错与 scope 相关,说明 OAuth 同意屏幕未授权 Classroom 只读 scope:删除 ~/.google-classroom-mcp/token.json 后重新 sign in。
适用场景与注意¶
适合:已在 Google Classroom 管理或学习、希望在 DSH 对话里汇总截止作业、查公告或名册的开发者或师生;需要模型在 Harness 内结构化读 Classroom 而非手动导出 CSV 的场景。
注意:
- 插件以 当前 DSH 进程的用户权限 运行,MCP 子进程同样在该环境下读
~/.google-classroom-mcp/。安装前应阅读 仓库源码与 LICENSE,确认只读范围与数据出境策略符合你的组织要求。 - 能力边界为 README 所列只读工具;写操作不在本 bundle 范围内。
- OAuth 与 Classroom API 配额、同意屏幕配置由你在 Google Cloud 侧负责。
结尾¶
dsh-plugin-google-classroom 把 Google Classroom 只读查询收成 DSH 里的 MCP 工具集,配置轻、依赖 uvx 按需拉服务。完成 OAuth 与 google-classroom-mcp-auth 后,即可在对话里查课程、截止日与提交状态。