classin-mcp-server
# ClassIn MCP Server
MCP (Model Context Protocol) 服务器,用于集成 ClassIn(翼鸥教育)API。让 AI 助手能够管理 ClassIn 平台上的用户、课程、课节、云盘、直播和学习管理系统。
## 功能特性
### 用户管理 (8个工具)
- `classin_register_user` - 注册用户
- `classin_modify_password` - 修改用户密码
- `classin_add_teacher` - 添加机构老师
- `classin_edit_teacher` - 编辑机构老师
- `classin_stop_using_teacher` - 停用机构老师
- `classin_restart_using_teacher` - 启用机构老师
- `classin_add_school_student` - 添加机构学生
- `classin_edit_school_student` - 编辑机构学生
### 课程管理 (7个工具)
- `classin_add_course` - 创建课程
- `classin_edit_course` - 编辑课程
- `classin_end_course` - 结束课程
- `classin_add_course_student` - 课程添加学生
- `classin_delete_course_student` - 课程移除学生
- `classin_add_course_teacher` - 课程添加老师
- `classin_remove_course_teacher` - 课程移除老师
### 课节管理 (5个工具)
- `classin_add_course_class` - 创建课节
- `classin_edit_course_class` - 修改课节
- `classin_delete_course_class` - 删除课节
- `classin_add_class_students` - 课节批量添加学生
- `classin_delete_class_students` - 课节批量移除学生
### 云盘管理 (8个工具)
- `classin_add_cloud_folder` - 创建云盘目录
- `classin_update_cloud_folder` - 修改云盘目录
- `classin_delete_cloud_folder` - 删除云盘目录
- `classin_upload_cloud_file` - 上传云盘文件
- `classin_copy_cloud_file` - 复制云盘文件
- `classin_move_cloud_file` - 移动云盘文件
- `classin_delete_cloud_file` - 删除云盘文件
- `classin_share_cloud_file` - 分享云盘文件
### 直播与录课 (4个工具)
- `classin_set_class_video` - 设置课节录课/直播/回放
- `classin_delete_class_video` - 删除课节视频
- `classin_update_video_lock_status` - 修改视频锁定状态
- `classin_get_webcast_url` - 获取直播/回放地址
### LMS学习管理 (11个工具)
- `classin_create_unit` - 创建LMS单元
- `classin_update_unit` - 编辑LMS单元
- `classin_delete_unit` - 删除LMS单元
- `classin_create_activity_noclass` - 创建LMS非课堂活动
- `classin_create_classroom_activity` - 创建LMS课堂活动
- `classin_update_classroom_activity` - 编辑LMS课堂活动
- `classin_release_activity` - 发布LMS活动
- `classin_delete_activity` - 删除LMS活动
- `classin_move_activity` - 移动LMS活动
- `classin_add_activity_student` - 添加活动成员
- `classin_delete_activity_student` - 移除活动成员
### 机构管理 (4个工具)
- `classin_add_school_label` - 创建机构标签
- `classin_update_school_label` - 修改机构标签
- `classin_delete_school_label` - 删除机构标签
- `classin_edit_school_settings` - 修改学校设置
### 班级群管理 (1个工具)
- `classin_modify_group_nickname` - 修改群成员班级昵称(批量将课程班级群中学生的昵称改为机构后台设置的学生姓名)
### Resources(2项)
- `classin://lms/activity-types` - LMS 活动类型枚举
- `classin://lms/endpoints` - LMS v2 活动相关接口速查
**总计: 48个工具**
## 安装
### 方式一:通过 npm 全局安装(推荐)
```bash
npm install -g classin-mcp-server
```
### 方式二:直接用 npx 运行(无需安装)
```bash
npx classin-mcp-server
```
### 方式三:从源码构建
```bash
git clone https://github.com/yuanlang12/classin-mcp-server.git
cd classin-mcp-server
npm install
npm run build
```
## 配置
需要设置以下环境变量:
| 环境变量 | 说明 | 获取方式 |
|---------|------|---------|
| `CLASSIN_SID` | 机构认证ID | 登录 eeo.cn 后台 → 学校设置 → API设置 |
| `CLASSIN_SECRET` | 机构认证密钥 | 登录 eeo.cn 后台 → 学校设置 → API设置 |
## 使用方法
### 在 Cursor 中使用
编辑 `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"classin": {
"command": "npx",
"args": ["-y", "classin-mcp-server"],
"env": {
"CLASSIN_SID": "your-sid",
"CLASSIN_SECRET": "your-secret"
}
}
}
}
```
### 在 Claude Desktop 中使用
编辑 Claude Desktop 配置文件:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"classin": {
"command": "npx",
"args": ["-y", "classin-mcp-server"],
"env": {
"CLASSIN_SID": "your-sid",
"CLASSIN_SECRET": "your-secret"
}
}
}
}
```
### 在 Claude Code 中使用
```bash
claude mcp add classin -- npx -y classin-mcp-server \
--env CLASSIN_SID=your-sid \
--env CLASSIN_SECRET=your-secret
```
## 响应格式
所有工具都支持 `response_format` 参数,可选值:
- `json` - 返回原始JSON数据
- `markdown` - 返回格式化的Markdown文本(默认)
## 开发
```bash
# 开发模式(自动重载)
npm run dev
# 构建
npm run build
# 运行
npm start
```
## 项目结构
```
classin-mcp-server/
├── src/
│ ├── index.ts # 服务器入口
│ ├── constants.ts # 常量定义
│ ├── schemas/
│ │ └── common.ts # 通用Schema定义
│ ├── services/
│ │ └── api-client.ts # API客户端
│ └── tools/
│ ├── user.ts # 用户管理工具
│ ├── classroom.ts # 课程课节管理工具
│ ├── cloud.ts # 云盘管理工具
│ ├── broadcast.ts # 直播录课工具
│ ├── lms.ts # LMS学习管理工具
│ ├── school.ts # 机构管理工具
│ └── group.ts # 班级群管理工具
├── dist/ # 编译输出
├── package.json
└── tsconfig.json
```
## API 文档
完整的 ClassIn API 文档请参考:https://docs.eeo.cn/api/zh-hans/
## 许可证
MIT
TDQS
Scored across 48 tools
Most tools target distinct resources, but there is overlap between legacy course classes (add_course_class) and newer classroom activities (create_classroom_activity), which are conceptually similar. The 'noclass' suffix in create_activity_noclass is also ambiguous. Descriptions help but the boundaries are not always crystal clear.
All tools follow the classin_verb_noun pattern with consistent naming. Minor inconsistencies include plural/singular mismatches (add_class_students vs add_course_student) and the awkward noclass suffix, but overall the pattern is predictable.
With 48 tools, the server is quite heavy, exceeding the 25-tool threshold. While the broad scope of the ClassIn platform justifies many operations, the sheer number makes it unwieldy for an agent to navigate.
The tool surface is heavily write-focused with very few read operations. There are no listing or retrieval tools for courses, classes, activities, students, or teachers, which means agents cannot query the current state. Lifecycle coverage also has gaps, such as no delete for school students or courses.