Student open-sources a read-only Moodle MCP server with hard-won token and WAF lessons
Ok_Wolverine325 · reddit · 2026-12-02
A York University CS student open-sourced eclass-mcp (TypeScript, MIT), a read-only MCP server letting Claude answer "what's due in 14 days", fetch grades, and search course PDFs from any Moodle LMS—try it via npx -y github:keerthan9453/eclass-mcp --demo.
Key lessons for MCP builders:
- No admin API key needed: reuse the per-user token Moodle's official mobile app obtains via /admin/tool/mobile/launch.php (redirects to moodlemobile://token=<base64>).
- HTTP client matters more than code: Node's fetch got empty HTML with HTTP 202 from a firewall challenge while curl returned JSON; the server now shells out to system curl.
- Token capture without DevTools: a small macOS helper catches the custom-scheme redirect and writes the token into Claude Desktop config; gotchas include Safari not following redirects to custom URL schemes and stale helpers after interrupted runs.
- PDF context economy: searchcoursefile and outlinecoursefile plus a 6,000-char read cap slash token usage; tool descriptions steer Claude to search → outline → read.
- Security fixes: API calls never follow 307/308 redirects (which would resend your token's POST body to a new host), and the setup helper verifies a per-run signature to reject attacker-supplied tokens.
Limits: one-command setup is macOS-only, no OCR, no .pptx/.docx, unofficial—54 end-to-end tests included.
More from coding & agent
- OpenAI's Salil Sethi breaks down the dozens of design choices behind a simple agent task — DeepLearningAI · 2026-12-02
- LangChain at re:Invent: model-specific harnesses lead agent accuracy at 10x lower cost — LangChain · 2026-12-02
- Zapier launches Next Gen Zaps: agents build and maintain automations, growing 4x faster — kvlly · 2026-12-02
- SwarmOS for Cybersecurity launches: agent swarms investigate threats in real time — bingxu_ · 2026-12-02
- Generalist Gaming Agent Competition Tops 800 Teams With $50K Prize Pool — steph_milani · 2026-12-02
- 100,000 Googlers use Antigravity and Gemini 4 daily — Google's proving ground for coding agents — rseroter · 2026-12-02