Skip to main content
Glama

lexueMCP

lexueMCP 把北理工新乐学教师端的信息和操作提供为本地 MCP 工具。它使用专用 Google Chrome 配置,由教师在学校页面登录。当前为面向 macOS 上 Codex 的公开开发版,能力和真实验收进度见 能力目录。

在本机接入 Codex

需要 macOS、Node.js 22 或更高版本、Google Chrome、Codex 桌面端和可登录的新乐学教师账号。

在 lexueMCP 项目目录执行:

npm ci
codex mcp add lexuemcp -- "$(command -v node)" "$PWD/src/main.js"

在 Codex 桌面端新建对话或重启桌面应用以加载配置。也可以从设置里的 MCP 服务器添加 STDIO 服务,以 Node 的绝对路径为命令,src/main.js 的绝对路径为参数。若系统默认工具超时不足,可为这一个服务器将 tool_timeout_sec 调到 120。

若终端里的 codex 提示现有配置不兼容,可用桌面 MCP 设置,或把命令里的 codex 换成桌面安装包内的 CLI。ChatGPT 默认安装路径下为 /Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex。

在对话里让 Codex 调用 lexue_open_login。如果专用 Chrome 显示北理工登录页,请在页面完成登录。之后可以调用 lexue_list_courses、lexue_get_course 等。专用 Chrome 窗口可以保持打开。

可以先让 Codex 查找课程并列出学期与课程编号,再读取指定学期的作业。lexue_capabilities 可随时查询工具的验收状态。

浏览器登录配置默认在 ~/Library/Application Support/lexueMCP/chrome。可用 LEXUE_PROFILE_DIR 指定独立位置。Chrome 配置不能放在源码目录内,也不共用日常 Chrome 的数据目录。一个配置目录同一时间由一个服务进程使用。若提示 PROFILE_IN_USE,结束上一个使用该配置的 Codex 会话后重试。

本地文件上传工具接收用户指定的绝对路径。新建作业和课件默认以保存为目的,把 publish 设为 true 才选择发布。课程公告的保存可能直接发布。删除工具需要确定课程、模块、精确标题和用户确认。若收到 WRITE_OUTCOME_UNKNOWN,先查看页面结果,再决定是否重试。

Related MCP server: google-classroom-mcp

验证

npm test

测试覆盖真实 MCP STDIO 握手和用模拟页面运行浏览器适配。模拟测试不连接学校账号、不访问真实学生数据。真实平台结果以 能力目录 为准。

许可证

源码以 MIT 许可证 公开。

技术参考

Available Tools

19 tools
lexue_capabilities查看 lexueMCP 能力目录A
Read-onlyIdempotent

读取能力来源、支持状态和待验收项,无需登录新乐学。

Inputs: no named parameters.

lexue_create_assignment新建作业A

新建作业并保存。可上传用户指定的本地附件,只有 publish=true 时才发布。

Inputs: title (required), courseId (required), dueAt, files, +3 more.

lexue_create_course新建课程A

按用户给出的名称新建课程。平台预设为一般课程。返回新课程编号。

Inputs: name (required).

lexue_delete_activity删除课程条目A
Destructive

按课程、模块和精确标题删除作业、课件或公告。需先由用户确认目标和删除影响。

Inputs: title (required), section (required), courseId (required), confirmed (required).

lexue_download_attachment下载课程附件B

把指定条目的附件下载到已存在的本地目录。保留同名的本地文件。

Inputs: title (required), section (required), courseId (required), fileName (required), +1 more.

lexue_get_activity读取课程条目A
Read-onlyIdempotent

按精确标题查看作业、课件或公告。发现同名条目时返回歧义,便于核对。

Inputs: title (required), section (required), courseId (required).

lexue_get_course读取课程基本设置B
Read-onlyIdempotent

读取指定课程的基本设置及课程类型。

Inputs: courseId (required).

lexue_list_announcements列出课程公告C
Read-onlyIdempotent

读取指定课程公告列表。

Inputs: courseId (required).

lexue_list_assignments列出作业A
Read-onlyIdempotent

读取指定课程的作业列表及其显示的提交、待批改状态。

Inputs: courseId (required).

lexue_list_courses列出我的课程A
Read-onlyIdempotent

读取课程列表的一页,返回课程编号、学期和代码。可在这一页筛选名称、代码和学期。

Inputs: name, term, courseCode, pageNumber, +1 more.

lexue_list_courseware列出课件B
Read-onlyIdempotent

读取指定课程课件列表及页面显示的状态。

Inputs: courseId (required).

lexue_list_members读取班级成员C
Read-onlyIdempotent

读取指定课程的教师、学生人数及成员页可见业务信息。

Inputs: courseId (required).

lexue_list_submissions读取作业提交B
Read-onlyIdempotent

进入指定作业的提交或批改页面,返回平台显示的学生提交业务信息。

Inputs: title (required), courseId (required).

lexue_open_login登录新乐学A

打开专用 Chrome 的新乐学登录或课程列表。需要验证时由用户在北理工登录页完成。

Inputs: no named parameters.

lexue_read_course_section读取课程其他模块B
Read-onlyIdempotent

读取课程章节、测试、讨论、问卷、题库、点名、分组、成绩或学习分析的可见文字。

Inputs: section (required), courseId (required).

lexue_save_announcement发布或编辑课程公告A
Destructive

保存课程公告的标题、正文及可选本地附件。平台可能立即发布。编辑时给出现有标题。

Inputs: body (required), title (required), courseId (required), files, +1 more.

lexue_update_assignment编辑或发布作业A
Destructive

按精确标题定位作业,编辑字段或附件。发布需要明确提供 publish=true。

Inputs: title (required), changes (required), courseId (required).

lexue_update_course修改课程基本设置C
Destructive

修改指定课程的基本设置,重新打开设置页核对。

Inputs: changes (required), courseId (required).

lexue_upload_courseware上传参考资料课件A

把用户指定的本地文件添加到指定课程的参考资料。只有 publish=true 时才发布。

Inputs: files (required), title (required), courseId (required), publish, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools map clearly to a distinct resource and action, such as list_courses, create_assignment, or download_attachment. Some overlap exists because get_activity and delete_activity apply generically to assignments, courseware, and announcements, while other tools are resource-specific, but the descriptions mostly clarify the boundaries.

    Naming Consistency4/5

    The tool set consistently uses the lexue_ prefix and snake_case, mostly following a verb_noun pattern. Minor deviations like lexue_capabilities (noun-only) and mixed verbs such as save/create/update/upload keep it from being perfectly uniform.

    Tool Count4/5

    At 19 tools, the set is somewhat large but still reasonable for an LMS automation server covering courses, members, assignments, courseware, announcements, attachments, login, and section reading. Most tools have a clear role, though a few generic activity tools add some surface area.

    Completeness3/5

    The server covers broad read access and core write operations for courses, assignments, announcements, and courseware. However, notable lifecycle gaps remain: no course deletion, no member enrollment management, no submission grading, no courseware update, and no write operations for many readable sections such as discussions, tests, or grades.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Teachable MCP server for ChatGPT, Claude and any AI agent: update lecture, create coupon, send email, reply to comment and list enrollments in your own Teachable account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Teachable yourself; Cotlet does not store your password and you need no Teachable API key. About the official Teachable API: Teachable has a public API, but only on the Growth plan and up, and it reads courses and lecture content and manages users, enrollments, pricing plans and transactions (checked 11 Oct 2026). Lesson editing, coupons, emails to students and comments are not in it. Setup and FAQ: https://cotlet.dev/integrations/teachable-api-mcp-server

    • Teachers Pay Teachers MCP server for ChatGPT, Claude and any AI agent: list products, create product listing, update price, get sales report and answer buyer question in your own Teachers Pay Teachers account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Teachers Pay Teachers yourself; Cotlet does not store your password and you need no Teachers Pay Teachers API key. About the official Teachers Pay Teachers API: Teachers Pay Teachers has no public API for sellers (checked 11 Oct 2026). Listings, prices, sales, Q&A and promotions are managed only in the seller pages of the website. Setup and FAQ: https://cotlet.dev/integrations/teachers-pay-teachers-api-mcp-server

    • Udemy MCP server for ChatGPT, Claude and any AI agent: create coupon, update course, send announcement and get revenue report in your own Udemy account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Udemy yourself; Cotlet does not store your password and you need no Udemy API key. About the official Udemy API: Udemy has an Instructor API that lists your courses, reads reviews, and reads and answers Q&A questions and direct messages (checked 12 Oct 2026). It has no coupons, announcements, review responses, course edits or revenue. Setup and FAQ: https://cotlet.dev/integrations/udemy-api-mcp-server

      https://cotlet.dev/mcp/v1/udemy
    • LearnWorlds MCP server for ChatGPT, Claude and any AI agent: list users, list course learners, enroll users, unenroll users, update tags, send message, suspend user and grade assessment in your own LearnWorlds account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to LearnWorlds yourself; Cotlet does not store your password and you need no LearnWorlds API key. About the official LearnWorlds API: LearnWorlds has a REST API (v2) for courses, users, bundles, subscriptions, promotions, payments and certifications, but it comes with the Learning Center plan and higher, and you need your own code to use it (checked 5 Nov 2026). LearnWorlds has no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/learnworlds-api-mcp-server

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A local MCP server that enables Codex to inspect and interact with Chrome tabs through the Chrome DevTools Protocol, primarily for collecting authorized Brightspace course materials into local folders.
      16
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to query course catalogs, assignments, exams, activities, and learning progress through a local Chrome CDP session, refresh and inspect saved snapshots, and open task entries while leaving login, verification, and submission actions manual.
      MIT