eth-moodle-mcp
v1.3.3
Published
MCP server to download lecture PDFs from ETH Zurich Moodle
Readme
eth-moodle-mcp
MCP server that connects Claude to ETH Zurich's Moodle, letting you browse courses, find lecture PDFs, and download them — all through natural language.
Quick Start
1. Get your Moodle token
Open this URL in your browser (replace credentials):
https://moodle-app2.let.ethz.ch/login/token.php?username=YOUR_NETHZ_USERNAME&password=YOUR_AAI_PASSWORD&service=moodle_mobile_appYou'll see: {"token": "a1b2c3d4e5..."}
2. Add to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"eth-moodle": {
"command": "npx",
"args": ["-y", "eth-moodle-mcp"],
"env": {
"MOODLE_TOKEN": "paste_your_token_here"
}
}
}
}3. Add to Claude Code
Add to .mcp.json in your project root (or ~/.claude/mcp.json globally):
{
"mcpServers": {
"eth-moodle": {
"command": "npx",
"args": ["-y", "eth-moodle-mcp"],
"env": {
"MOODLE_TOKEN": "paste_your_token_here"
}
}
}
}Available Tools
| Tool | Description |
|------|-------------|
| list_courses | List all Moodle courses you're enrolled in |
| get_course_materials | Get lecture materials from a course, filtered by recency and file type |
| download_materials | Download specific files from Moodle to local disk |
Usage Examples
"What courses am I enrolled in?"
"Get this week's Analysis II lectures"
"Download all PDFs from Numerical Methods from the last 2 weeks"
"Get this week's Numerical Methods lectures and summarize them so I can learn from your summary alone."
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| MOODLE_TOKEN | Yes | — | Moodle web service token |
| MOODLE_URL | No | https://moodle-app2.let.ethz.ch | Moodle instance base URL |
| DOWNLOAD_DIR | No | ./moodle-downloads | Default download directory |
Works with Any Moodle
While built for ETH Zurich, this works with any Moodle instance. Just set the MOODLE_URL environment variable:
{
"env": {
"MOODLE_TOKEN": "your_token",
"MOODLE_URL": "https://moodle.your-university.edu"
}
}Troubleshooting
"Token expired" or authentication errors: Tokens can expire. Generate a new one using the URL above.
"No course found matching...":
Use list_courses first to see exact course names, then use a more specific search term.
No files found:
Try increasing since_days_ago — the default is 7 days. Some courses may not have recent uploads.
Alternative token method: If the direct URL doesn't work (some Shibboleth configurations block it), install the official Moodle mobile app, use a network proxy (mitmproxy/Charles), and capture the token from the app's API calls.
License
MIT
