Google 课堂 MCP 服务器
MCP(模型上下文协议)服务器,通过 Claude 和其他支持 MCP 协议的 AI 助手提供对 Google Classroom 数据的访问。
设置
先决条件
Node.js(v16 或更高版本)
启用了 Google Classroom API 的 Google Cloud Platform 项目
Google Classroom API 的 OAuth 2.0 客户端凭据
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Google Classroom MCP 服务器:
手动安装
克隆此存储库
安装依赖项:
将您的 Google OAuth 客户端凭据放在项目根目录中名为
credentials.json
的文件中:
使用 Google 进行身份验证:
这将启动一个浏览器窗口来完成 OAuth 流程并将您的凭据保存到tokens.json
。
通过更新
claude_desktop_config.json
(通常在%APPDATA%\Claude\
中) 配置 Claude 使用此服务器:
用法
可用工具
该服务器提供了几种与 Google Classroom 交互的工具:
1. courses
- 列出你所有的 Google 课堂课程
2.course course-details
- 获取特定课程的详细信息
参数:
courseId
:课程的ID(可以从courses
工具中获取)
3. assignments
- 获取特定课程的作业
参数:
courseId
:课程的ID(可以从courses
工具中获取)
克劳德的示例提示
显示我所有的 Google 课堂课程
获取我的数学课程 ID 为 123456789 的详细信息
显示 ID 为 987654321 的历史课程的所有作业
权限
服务器请求以下 Google Classroom API 权限:
classroom.courses.readonly
- 访问课程信息classroom.announcements.readonly
- 访问课程公告classroom.coursework.me.readonly
- 访问你的课程作业和作业classroom.rosters.readonly
- 访问班级名册
故障排除
如果遇到权限错误,请尝试:
再次运行 auth 命令来刷新权限:
如果您的应用处于测试模式,请确保您的 Google 帐户已在 Google Cloud Console 中添加为测试用户
检查
authenticateAndSaveCredentials
函数中的OAuth范围以确保它们符合您的需求
笔记
该服务器设计用于与 Claude AI 或其他 MCP 兼容助手一起使用
所有 API 请求均使用您已验证的 Google 帐户发出
令牌刷新由服务器自动处理
敏感凭证本地存储在
tokens.json
文件中
Related MCP Servers
- -securityFlicense-qualityMCP server that enables AI assistants to perform SEO automation tasks including keyword research, SERP analysis, and competitor analysis through Google Ads API integration.Last updated -1
- -securityFlicense-qualityAn MCP server that provides access to Google's API Discovery Service, allowing agents to discover and interact with Google APIs through natural language commands.Last updated -
- -securityFlicense-qualityThis MCP Server provides a natural language interface to interact with Google's Policy Analyzer API, allowing users to analyze policies and evaluate compliance through conversations.Last updated -
- -securityFlicense-qualityAn MCP server that enables users to query documents from Google Drive using AI assistance, providing tools for searching vector databases and generating answers based on document content.Last updated -