mcp4lms
Connect Claude (or any MCP client) to your university's Moodle LMS: read-only access to courses, deadlines, assignments, grades and course files.
Install / Use
claude mcp add threos -- npx -y github:threos/mcp4lmsIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Our assessment of mcp4lms
mcp4lms scores 79/100 on our quality scale, 785th of 963 AI & Machine Learning skills we index.
Its MCP Server is 8.1 KB long, well organised into 9 sections with 2 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated today, so mcp4lms is actively maintained.
- It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
mcp4lms compared with similar skills
All 4 of these similar skills score higher than mcp4lms; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mcp4lms (this skill)by threos | 79 | 3 | today | MCP Server |
| claude-memby thedotmack | 100 | 100.1k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 96.5k | 4d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 86.1k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.1k | today | CLAUDE.md |
Frequently asked questions
- How do I install mcp4lms?
- Run
claude mcp add threos -- npx -y github:threos/mcp4lms. The install tabs above show the steps for each supported agent. - Which AI agents does mcp4lms work with?
- It is written for Claude Code, Claude Desktop, Cursor and Gemini CLI, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mcp4lms safe to use?
- It is AGPL-3.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mcp4lms still maintained?
- The repository was last updated today, so mcp4lms is actively maintained.
Skill content
View source on GitHubStudents connect once with a bookmark, get a personal key, and add one URL to Claude. Claude then gets read-only access to their courses, deadlines, assignments, grades, announcements and the text of course files.
<p align="center"> <img src="docs/demo.gif" alt="Asking Claude about attendance and assignments through Mcp4Lms" width="720"> </p>[!NOTE] Mcp4Lms is an experimental, non-profit, volunteer-run open-source project. It is not affiliated with or endorsed by any university, Moodle HQ, Anthropic, OpenAI, Google or Anysphere.
📑 Contents
- 🔐 How it works
- 🏫 For universities and LMS admins
- 🏢 Hosted MCP for institutions
- 🛡️ Security
- 🧑💻 Development
- 🚀 Deploying your own instance
- ⚠️ Limits and known gaps
- 📄 License
🔐 How it works
sequenceDiagram
participant B as Student's browser
participant L as LMS
participant W as Mcp4Lms Worker
participant C as Claude
B->>L: Bookmarklet opens the mobile launch URL
L-->>B: moodlemobile://token=…
Note over B: Encrypts {siteId, token, nonce, ts}<br/>with the server's RSA-OAEP key
B->>W: POST /api/connect (ciphertext)
Note over W: Checks age and nonce, verifies the token,<br/>encrypts it under the user key (AES-256-GCM)
W-->>B: User key m4l_<id>_<secret> (shown once)
C->>W: OAuth 2.1 (DCR + PKCE), student enters key
Note over W: Token decrypted, stored in the grant's<br/>props (encrypted by the OAuth library)
C->>W: /mcp with bearer token
W->>L: Read-only call from a fixed allowlist
W-->>C: Course data, never the token
What is stored
| Where | What |
|---|---|
| D1 accounts | Account id, LMS URL and user id, an HKDF key verifier, the LMS token encrypted with AES-256-GCM under a key derived from the user key, and the chosen expiry |
| KV OAUTH_KV | OAuth clients, grants and token hashes. Grant props are encrypted with token-derived keys |
| D1 download_links | Per link: the file URL and LMS token, encrypted under a secret only the link holds. Deleted on use, after 5 minutes, or on reconnect, revoke or deletion |
| Nowhere | The user key, the LMS password, plaintext tokens, names, emails, course data |
- Expiry. Students choose 24 hours, 7, 30 or 90 days (default 90). After that the account is refused, and an hourly cron revokes its grants and deletes the row.
- Lost key. Connecting again issues a new key, invalidates the old one and revokes all grants.
- No access logs. Workers invocation logs are off and the code writes no request logs.
🏫 For universities and LMS admins
Mcp4Lms uses the same app token as the official Moodle mobile app, only for read-only calls on the student's own data. Today it works without the institution's involvement, which is not ideal for anyone. We would much rather build an official, consent-gated path with you: a registered client on your LMS, a standard OAuth flow instead of a bookmarklet, and scopes you define. That gives your institution control over data and permissions, gives students an easier and safer sign-in, and lets maintainers replace workarounds with proper verification and client registration.
We would prefer to work with your IT and legal teams. Write to maintainers@mcp4lms.com. The guideline for institutions (Türkçe) lists the steps for collaborations, self-hosting and opt-outs.
Requesting an opt-out
- Write from an official institutional address and include your concerns and any policy or legal basis. A request does not by itself guarantee removal; every request is reviewed and answered.
- Please send requests as non-confidential. Approved takedowns affect many students, so they are shared publicly as proof to the community. Requests about a proven privacy issue, security flaw or incident, or a newly discovered security or design flaw are not published.
- Opted-out institutions are removed from the hosted version and added to a blocklist in this repository, so self-hosted copies do not work with them out of the box.
🏢 Hosted MCP for institutions
We encourage institutions to run their own MCP service, tailored to their policies and systems. Fork this repository and deploy your own instance under the license; volunteers may help bring it in as an official, institution-governed resource. Self-hosting gives you control over consent, access logging, AI policies, permissions, entity controls and RBAC. Collaboration depends on volunteer availability and is not guaranteed. Mcp4Lms never asks for payment.
🛡️ Security
Report vulnerabilities privately to security@mcp4lms.com, not in a
public issue. Each instance also serves /.well-known/security.txt.
Security reviews are the most valuable contribution. Start with src/crypto.ts,
src/app.ts and src/web/bookmarklet.ts. Bug reports,
new universities in src/universities.ts and testing with other Moodle™
sites and MCP clients are also welcome.
🧑💻 Development
npm install
npm run keys # writes CONNECT_PRIVATE_KEY to .dev.vars
npm run db:migrate:local
npm run dev # http://localhost:8787
npm run typecheck # the only automated check
npm run diagrams # re-render diagrams/*.mmd to public/diagrams/*.svg
To try the real flow, open http://localhost:8787/connect, drag the ☠ Connect Mcp4Lms
bookmark to your bookmarks bar and click it on the LMS. Then add http://localhost:8787/mcp to
an MCP client such as npx @modelcontextprotocol/inspector.
Where things live
src/app.tsis the web app,src/mcp.tsthe MCP server,src/moodle.tsthe read-only Moodle client.src/web/pages.tsrenders the pages andsrc/web/layout.tsholds the design system and security headers.src/web/i18n.tsholds all copy.endefines the shape andtrmust provide every key. Language comes from?lang=, then a cookie, thenAccept-Language.diagrams/*.mmdare the Privacy page diagrams, rendered to SVG because the CSP allows no inline Mermaid.
🚀 Deploying your own instance
- Set
PUBLIC_URL,LMS_URLandREPO_URLundervarsinwrangler.jsonc. - Create storage and put the ids in
wrangler.jsonc. Theratelimitsnamespace ids only need to be unique within your Cloudflare account.npx wrangler kv namespace create OAUTH_KV npx wrangler d1 create mcp4lms npm run db:migrate:remote - Set the connect key. Rotating it invalidates bookmarks people already saved.
npm run -s keys -- --print | npx wrangler secret put CONNECT_PRIVATE_KEY - Run
npm run deploy.
The LMS needs the Moodle mobile web service enabled, which it is whenever the official Moodle app works.
⚠️ Limits and known gaps
- Connecting needs a computer. After that, Claude works anywhere.
- Rate limits are per IP and approximate, kept generous for campus NATs.
/mcpis not IP-limited. read_fileconverts PDF, Word, PowerPoint, text and HTML to text (30 MB). Other files are attached as-is (10 MB, images 5 MB). Links outside the LMS are fetched anonymously, only after the user confirms.- Download links work once, within 5 minutes. A
HEADrequest does not use them up. - The server handles the token in memory while serving a request, so users must trust that the deployment runs this code.
- Expiry and deletion do not revoke the token on the LMS itself. Students can end it by logging out of all devices there.
📄 License
Free software under the GNU AGPL-3.0-or-later. If you run a modified version as a network service, you must offer its source to your users. Provided as is, without warranty. See the Privacy page of a running instance for the full disclaimer.
Related Skills
claude-mem
100.1kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
96.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
86.1kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
75.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
