
Moodle MCP
io.github.fabioov由 GitHub 账号 fabioov 发布v0.1.1更新于 Nov 6, 2026
Read-only Moodle server: assignments, deadlines, grades, courses, forums, notifications.
概览
只读的 Moodle MCP 服务器,让助手回答关于课程、作业、截止日期、成绩、论坛和通知的问题。
- 可以做什么
- 校验令牌并查看站点信息与当前用户,列出当前或往期课程
- 查看课程的小节与活动,并按截止日期列出作业
- 查询某份作业的提交与评分状态、成绩和反馈评语
- 获取未来一段时间的截止日期与日历事件,并标注作业已提交或待提交
- 读取论坛最近的讨论和最近的 Moodle 通知
- 适用场景
- 适合学生用自然语言询问本周有什么要交、哪些已提交、某门课成绩如何、有没有新公告,而不必打开浏览器进入 Moodle。
- 运行要求
- 本地需 Node.js 20+ 运行环境(npx 包)或 Docker;README 另提供 Cloudflare Workers 部署方式。需要一个已启用 Web 服务/移动应用访问的 Moodle 站点,在 MOODLE_URL 中填写站点根地址,在 MOODLE_TOKEN 中填写个人 Web 服务令牌。本地客户端使用 MCP_TRANSPORT=stdio;MCP_AUTH_SECRET 仅在托管 HTTP 模式需要。
安装
在 SourceWeft 中
- 打开 控制台中的 Moodle MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Moodle MCP
An open source, read-only MCP server for Moodle. Connect it to Claude and ask about your assignments, deadlines, grades, courses, forums and notifications in plain language.
Not affiliated with or endorsed by Moodle Pty Ltd. "Moodle" is a trademark of its owner.
What you can ask
- "Which assignments do I still have to hand in this month?"
- "What's due this week, and what have I already submitted?"
- "What are my grades in Machine Learning?"
- "Any new announcements in my courses?"
- "Show me the sections and activities of my Computer Graphics course."
Tools
All tools are read-only and return concise, readable output.
Requirements
- A Moodle site with Web Services / mobile app access enabled (Moodle 4.x; developed against 4.5).
- Your own web service token (below). Functions your institution disables simply return an error for that tool.
- Node 20+ for the server (Node 22+ to deploy with Wrangler), or Docker, or a free Cloudflare account.
Setup
1. Get your Moodle URL and token
- URL: the root of your Moodle, without a page or
/webservice, e.g.https://moodle.example.edu(if Moodle lives in a subfolder, include it:https://example.edu/moodle). - Token: in Moodle, Preferences → Security keys shows a key for Moodle mobile web service. Some sites
only show a label there; Reset generates a new key (and signs out your Moodle mobile app). Alternatively, if
you log in with a Moodle username and password (not SSO), request one:
curl -s "$MOODLE_URL/login/token.php" -d username=... --data-urlencode password=... -d service=moodle_mobile_app(type the password interactively so it doesn't end up in your shell history).
2. Configure
Copy .env.example to .env and fill in MOODLE_URL, MOODLE_TOKEN and MCP_AUTH_SECRET
(generate the latter with openssl rand -hex 24). .env is git-ignored.
3. Run it, pick one
Cloudflare Workers (free, always on, no domain needed): recommended
Check Cloudflare's current free-tier limits. Try it locally first by copying your .env values to a
git-ignored .dev.vars and running npm run dev:worker.
Docker / Node (self-hosted)
Then expose it over HTTPS (for example with a Cloudflare Tunnel or Tailscale Funnel).
Local only (Claude Desktop / Claude Code, stdio): no install needed:
MCP_AUTH_SECRET is not needed in this mode.
4. Add it to Claude
- Claude.ai: Settings → Connectors → Add custom connector. URL
https://<your-host>/mcp, choose No sign-in, then Add headerAuthorization=Bearer <MCP_AUTH_SECRET>. - Claude Code:
claude mcp add --transport http moodle https://<your-host>/mcp --header "Authorization: Bearer <MCP_AUTH_SECRET>" - If a client can only be given a URL, use
https://<your-host>/mcp/<MCP_AUTH_SECRET>. Treat that URL as a password; the header is preferred because URLs end up in logs.
Security and privacy
- Your token acts as you: anyone who can call your endpoint can read what your token can read. Keep
MOODLE_TOKENandMCP_AUTH_SECRETin environment variables or Cloudflare secrets, never in the repo. - The server is read-only by design and has no write tools.
- Whatever the tools return (grades, messages, names) is sent to Claude as part of your conversation. Check your institution's rules on sharing academic data with third-party services before using this, especially if you have access to other people's data (for example as a teacher).
- See SECURITY.md to report a vulnerability.
Known limitations
- Tested mainly against Moodle 4.5 with a student account. Teacher/admin roles and other versions or plugins are untested; reports and fixtures are welcome.
- Sites can disable individual web service functions, so some tools may not work everywhere.
- Large result sets are trimmed (for example, 25 assignments by default) to save context.
Development
See CONTRIBUTING.md. Changes are listed in CHANGELOG.md.
License
来源:README.md,提交 7cf8f4c
工具
0版本历史
1- v0.1.1最新Nov 6, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分