
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 分