dtu-learn
Syncs downloaded course material into a note vault such as Obsidian: copies new or changed files from each mapped course into its folder (never deleting, and skipping files whose content already exists elsewhere in the vault), and for vault-style destinations writes an announcements.md with all course announcements (newest first) plus upcoming deadlines under a '## Next' heading in a backlog.md note.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dtu-learnWhat's due this week, and have I handed it in?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dtu-learn: DTU Learn MCP server and API client for AI assistants
Use your DTU Learn courses with Claude and other AI assistants. dtu-learn is an MCP server and a command-line DTU Learn API client: it downloads your own DTU Learn (Brightspace / D2L) courses to your computer (slides, files, announcements, assignments, deadlines, grades and Panopto lecture transcripts), so your AI can answer "what is due this week?" or "which slide explains attention?".
Unofficial. A student project, not made or supported by DTU or D2L. Use it only with your own account and follow DTU's rules. Everything stays on your computer: there is no server and no shared login.
Install
You need a DTU account and Google Chrome (or Edge).
Claude Code (recommended)
/plugin marketplace add CarlSvejstrup/dtu-learn-mcp
/plugin install dtu-learn@dtu-learnRestart Claude Code and ask: "Set up DTU Learn for me." It installs the tool and opens the DTU login. You type your password and MFA in the browser yourself.
Claude Desktop, Cursor, Codex and other MCP clients
curl -LsSf https://astral.sh/uv/install.sh | sh # uv, if you do not have it (Windows: see uv docs)
uv tool install git+https://github.com/CarlSvejstrup/dtu-learn-mcp
dtu-learn setup # login, first download, connects your AI appsRestart your AI app. To add the skills too: npx skills add CarlSvejstrup/dtu-learn-mcp.
Related MCP server: Moodle MCP Server
Use it
Ask your AI:
"What is due this week, and have I handed it in?"
"What is new on DTU Learn since yesterday?"
"Which lecture in 02132 covers pipelining? Give me the slide page."
"Search the deep learning lecture transcripts for 'batch norm'."
"Give me my DTU week." / "Quiz me on the NLP slides."
Fresh data is one question away: say "refresh DTU Learn" and the MCP refresh tool downloads what changed.
If the DTU login has expired, the AI calls login and a browser window opens for you. Without an AI:
dtu-learn scrape --current.
Optional extras
All off by default. Use the ones you want.
dtu-learn schedule install # launchd (macOS), crontab (Linux) or Task Scheduler (Windows)
dtu-learn schedule status
dtu-learn schedule removeIt checks at 07:30 (or when the computer wakes) and refreshes at most once per 12 hours. After every check it
writes ~/.dtu-learn/STATUS.md: result, whether you must log in, next refresh and what was new. Ask your AI
"what is the dtu-learn status?" to read it. When the login has expired you get a notification; run
dtu-learn login.
Copy sync.example.json to ~/.dtu-learn/sync.json and map each course id (dtu-learn courses --current)
to a folder. dtu-learn sync copies new or changed files, never deletes, and skips a file whose content you
already keep elsewhere in that folder's parent. The MCP refresh tool and the schedule sync automatically
once sync.json exists.
If a destination is <course>/material/learn, sync also writes <course>/announcements.md (all announcements,
newest first) and adds upcoming deadlines under ## Next in <course>/backlog.md. --no-vault turns that off.
Make an executable file ~/.dtu-learn/hooks/after-refresh. When it exists, every refresh groups new lecture
slides per lecture in out/new_lectures.json, and the scheduled run calls the hook (at most 2 lectures per
run). Guards: more than 4 new lecture folders at once counts as a re-download, not new teaching; old lectures
never re-trigger.
Reference
Tool | What it does |
| Session check, DTU login in a browser, download what changed |
| This semester's courses; what the last refresh found |
| Announcements, newest first |
| Deadlines in Copenhagen time, with your submission status |
| Course files; PDF text per page |
| Panopto lecture transcripts |
| Announcements, assignments, transcripts and file text |
course can be the org unit id, the course number (02132) or part of the name (nlp).
Command | What it does |
| Guided first run. |
| Log in again / check state / diagnose with fixes |
| List courses with org unit ids |
| Download (only changed files are fetched) |
| Panopto transcripts only |
| Copy into your notes (needs |
| Optional daily refresh |
| Connect the MCP server to an app |
| Run the MCP server over stdio (apps start it for you) |
Update: uv tool upgrade dtu-learn. Remove: dtu-learn schedule remove, uv tool uninstall dtu-learn, then
delete ~/.dtu-learn/.
Everything lives in ~/.dtu-learn/ (or DTU_LEARN_HOME). Per course in out/<code> <name>/: content/ (all
files plus links.md), announcements/, assignments/ (instructions, attachments, your submissions),
grades.json, linked/ (PDFs linked from course pages), videos.md and recordings/ (Panopto caption text
with timestamps, never the video). Each refresh writes out/CHANGES.md. Not covered: quizzes, discussions,
calendar, Locker.
You log in once in a real Chrome window (DTU SSO + MFA). The session cookies stay in
~/.dtu-learn/state.json.Downloads use Brightspace's own REST API (
/d2l/api/lp,/d2l/api/le), 3 requests at a time, and only fetch files whose modified date changed. One refresh runs at a time.Panopto transcripts use the same endpoints the Panopto player calls, one request at a time.
DTU rules
From DTU's own pages (checked 2026-10-03). Not legal advice.
Your own login and copy only. Never share
state.json, the browser profile or downloaded files. Each person downloads with their own account.Teachers' material into AI tools needs permission. DTU counts uploading material to AI chatbots as sharing, and allows only your own work, public domain and CC-0. Ask the teacher first.
No other people's personal data into AI tools (names in announcements, lists or recordings).
Keep the load low. Do not raise the parallel requests or refresh more than needed.
Sources: DTU IT security policy · Generative AI and copyright · Copyright for students
Troubleshooting
Problem | Fix |
|
|
"Login expired" | Ask your AI "log me in to DTU Learn", or run |
DTU tools missing in the app | Restart the app, then run |
Anything else |
|
Development
git clone https://github.com/CarlSvejstrup/dtu-learn-mcp && cd dtu-learn-mcp
uv tool install --editable .
uv run --group dev pytest -q # offline tests: no network, browser or scheduler
claude plugin validate . --strictMIT licence. Not affiliated with DTU, D2L or Panopto.
This server cannot be deployed
Maintenance
Related MCP Connectors
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Personal knowledge MCP: capture bookmarks, notes & todos by chat; archive pages; search memory.
MCP-native notes and memory for ChatGPT, Claude, and other AI tools.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseAqualityDmaintenanceTurns Canvas LMS into a scriptable pipeline and exposes it to AI assistants via MCP for querying courses, grades, assignments, and syncing files using natural language.143MIT
- AlicenseNot gradedqualityDmaintenanceA powerful Model Context Protocol (MCP) server that seamlessly integrates AI assistants with Moodle Learning Management System. Enable your AI assistant to access courses, retrieve educational content, download resources, and search through your learning materials.20 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to download courses from any Moodle site for offline study, supporting authentication, course listing, and syncing via CLI or MCP.13MIT
- AlicenseNot gradedqualityBmaintenanceEnables browsing your Coursera courses, viewing library maps and course outlines, and downloading transcripts and readings as text via MCP tools.20 npmMIT