enauczanie-mcp
By default this server gives Claude Code read-only access to a student's eNauczanie PG/Moodle account; opt-in write mode adds confirmed Moodle actions.
Browse enrolled courses and course contents, including sections, modules, dates, completion, restrictions, module text, and files.
Download course files to a local downloads directory.
Track assignments and deadlines, including submission status, grades, and teacher feedback.
View final course grades or detailed grade items.
Read forums, announcements, discussions, and posts.
Review finished quiz attempts and read H5P exercise text.
Check notifications and recent changes across courses.
In write mode: save/submit/remove assignments, manage groups, vote, submit surveys, answer/submit quizzes, mark attendance, mark activities done, and mark notifications read, with confirmation for consequential actions.
Provides read-only access to a student's account on a Moodle instance (eNauczanie PG, Gdańsk University of Technology). Tools cover courses (listing courses, browsing the course contents tree with dates, completion and access restrictions, fetching module descriptions, downloading files), homework (deadlines across all courses, assignments and their submission/grade/feedback status), final grades and per-course grade items, forum discussions and posts (including announcements), quiz reviews of finished attempts and H5P exercise text, plus recent changes and notifications.
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., "@enauczanie-mcp what do I have due in the next two weeks?"
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.
enauczanie-mcp
Local MCP server that lets Claude Code use a student's account on eNauczanie PG (the Moodle platform of Gdańsk University of Technology) with the student's own web service token. By default it only reads. It never submits, posts, starts quiz attempts or marks anything as read. An opt-in write mode adds tools that work like the student's own buttons in Moodle.
Tools:
Courses:
list_courses,get_course_contents(tree with dates, completion and access restrictions),get_module_text(full description, page body or assignment instructions),download_file.Homework:
list_deadlines(all courses),list_assignments,get_assignment_status(submission, grade, teacher feedback).Grades:
get_grades(final grades, or the grade items of one course).Forums:
get_forum_discussions(announcements are forums of typenews),get_discussion_posts.Exercises:
get_quiz_review(finished attempts with chosen and correct answers),get_h5p_content(text of H5P exercises).What is new:
get_recent_changes,get_notifications.Write mode only:
save_assignment_submission,submit_assignment,remove_submission,list_group_choices,join_group,leave_group,list_vote_options,submit_vote,get_survey,submit_survey,get_quiz_survey,next_quiz_page,submit_quiz_survey,mark_attendance,set_activity_done,mark_notification_read.
Requirements
Python 3.10 or newer, Linux with
xdg-mimefor the automatic token capture (other systems work with the manual step below).Claude Code with MCP support.
An eNauczanie account. Login is CAS-only (Moja PG), so the token comes from Moodle's mobile-app launch flow instead of a password.
Related MCP server: Moodle Student MCP
Install
git clone https://github.com/Zambrzyckii/enauczanie-mcp.git
cd enauczanie-mcp
python3 -m venv .venv && .venv/bin/pip install -e .On Windows the venv keeps its programs in .venv\Scripts instead of .venv/bin, so use
.venv\Scripts\pip here. When registering the server, replace "$(pwd)/.venv/bin/python"
with the full path to .venv\Scripts\python.exe.
Token
One-time: register the handler for moodlemobile:// links (it writes a .desktop entry
pointing at this checkout).
python3 get_token.py --install-handlerThen, whenever the token expires or the academic year changes:
python3 get_token.pyOpen the printed URL in your browser, log in, accept the prompt to open the link with
"Moodle Token Handler". The token lands in .env (MOODLE_URL, MOODLE_TOKEN, file
mode 600) and a summary in token_result.txt.
Without xdg (macOS, Windows, WSL): open the printed URL, log in, copy the
moodlemobile://token=... address the browser tries to open and run
python3 get_token.py 'moodlemobile://token=...'.
The instance is per academic year. For a new year set MOODLE_URL (for example
https://enauczanie.pg.edu.pl/2026) in the environment before running get_token.py.
Register in Claude Code
claude mcp add enauczanie -s user -- "$(pwd)/.venv/bin/python" -m enauczanie_mcpStart a new Claude Code session and ask, for example, what is due in the next two weeks, for the grades of a course, for the latest announcements or for a review of a finished quiz.
Write mode
Write mode lets Claude act on the account the way the student does with Moodle's buttons.
It is off unless ENAUCZANIE_ALLOW_WRITE=1 (or true) is set in .env or in the server's
environment.
get_token.py keeps that line when it stores a new token. Start a new Claude Code session
after turning it on or off.
echo "ENAUCZANIE_ALLOW_WRITE=1" >> .envMoodle button | Tools |
Add submission, Save changes |
|
Submit assignment |
|
Remove submission |
|
Group sign-up ( |
|
Poll ( |
|
Survey ( |
|
Quiz ( |
|
Submit attendance ( |
|
Mark as done |
|
Notification read |
|
save_assignment_submission,submit_assignment,remove_submission,join_group,leave_group,submit_vote,submit_survey,submit_quiz_surveyandmark_attendancechange nothing withoutconfirm=true, and neither doesget_quiz_surveywhen it would start a new attempt. The first call only describes what would happen, so Claude can show it to you before anything reaches Moodle.set_activity_doneandmark_notification_readact at once.next_quiz_pagehas noconfirm, because your own answers to the page Claude shows you are the approval.join_groupkeeps the groups you are already in where the sign-up allows several. Where it allows one, joining moves you out of your current group.mark_attendancerecords your attendance at the session that is open for self-marking now, so use it only when you are at that class. It does not open the attendance activity beforeconfirm=true, because where the teacher set an automatic status without a password, opening the list of sessions already records it. Moodle still checks the password the teacher gives in class and may take marks only from the campus network. Where it offers several statuses, you choose one.get_quiz_surveyandsubmit_quiz_surveyanswer quizzes that Moodle lets you attempt now, including quizzes that give marks. Quizzes that ask for a password are not supported, because the tools send no password to Moodle.get_quiz_surveycontinues an attempt already in progress.submit_quiz_surveyfirst saves the answers and checks that the attempt shows each one, and only then finishes the attempt. They handle questions with one answer (true/false too), with several answers, with a short text and essays. Other question types are answered in the browser. A quiz is not anonymous, so the teacher sees your name with the answers.A quiz with sequential navigation shows one page at a time and never goes back. There
get_quiz_surveyshows only the current page, with its number, the time left and a warning about questions the tools cannot fill.next_quiz_pagesaves your answers to that page, checks them and moves on. Moving on cannot be undone, so a page with a question the tools cannot fill is answered in the browser unless you say to skip it. On the last pagesubmit_quiz_surveysends the quiz. Sent from an earlier page, it leaves the later pages empty.Many assignments have no draft stage. There, saving already hands the work in and the teacher sees it. The description before saving says which case applies.
New files replace every file already in the submission. On a team assignment the change applies to the shared submission of the whole group.
Online text is plain text. A blank line starts a new paragraph, other formatting such as bold or lists is not kept.
H5P attempts are not available. Consent forms are not available, because the Moodle mobile app does not support them.
When the server runs in Docker,
file_pathsare paths inside the container, so mount the folder that holds the files.
Prebuilt image
Each release publishes an image to GHCR and attaches a wheel and an sdist. Both hold only the
server, so the token still comes from get_token.py in a clone. Mount the download folder at
the same path as on the host, so the paths that download_file returns open outside the
container. The token then also sits in the container's environment, where docker inspect
shows it.
mkdir -p ~/enauczanie-downloads
claude mcp add enauczanie -s user -- docker run -i --rm --env-file "$(pwd)/.env" \
--user "$(id -u):$(id -g)" \
-e ENAUCZANIE_DOWNLOAD_DIR="$HOME/enauczanie-downloads" \
-v "$HOME/enauczanie-downloads:$HOME/enauczanie-downloads" \
ghcr.io/zambrzyckii/enauczanie-mcp:0.1.0How it works
Claude Code starts the server as a child process and talks to it over stdio. Each tool makes
one or more calls to Moodle's REST web service (/webservice/rest/server.php), turns HTML into
plain text and cuts long texts and lists, so a course tree or a forum thread fits the model's
context. Write tools first upload files through /webservice/upload.php into the user's
private draft area, then call the same functions the Moodle mobile app uses for each button.
Attendance is a plugin whose pages the app gets as ready HTML through tool_mobile_get_content,
so mark_attendance reads the sessions and statuses from that HTML. Quizzes are
answered the way the attempt page's form sends them, so submit_quiz_survey reads the
question fields from the HTML of each question and sends them back with the answers. Under
sequential navigation Moodle shows the questions of the current page only, so
next_quiz_page saves that page and moves the attempt to the next one with
mod_quiz_view_attempt.
Path | Role |
| read tools and the instructions sent to the model |
| write tools, registered only in write mode |
| REST calls, concurrent calls, draft uploads and checked file downloads |
| reads |
| HTML to text, plain text to HTML, the course tree and size limits |
| shape Moodle's answers for each group of tools |
| reads the text out of a downloaded H5P package |
| gets the token through the mobile-app login flow |
| an in-memory Moodle web service for the quiz write tools and the tests that use it |
| question HTML recorded from a quiz attempt on the Moodle 5.3 sandbox and the parser tests that read it |
The tests cover only the quiz write tools. tests/test_sequential_quiz.py runs
get_quiz_survey, next_quiz_page and submit_quiz_survey against a fake Moodle that keeps
Moodle's rules for sequential navigation, so it checks how the tools call Moodle, not Moodle
itself. tests/test_question_form.py reads the answer fields out of HTML that a real Moodle
sent. Run them with:
.venv/bin/python -m unittestSecurity
The token is stored only in
.env, which is gitignored together withtoken_result.txt,functions.jsonanddownloads/. Never commit or share it. It gives the same access as the Moodle mobile app, including handing in work, whatever mode the server runs in.The server sends the token only to the configured
MOODLE_URLand never puts it in a tool result or error message. File downloads accept onlypluginfile.phpURLs of that instance.Downloaded files land in
downloads/<course-slug>/<contextid>/..., mirroring Moodle's pluginfile path. Delete a file to re-download it.ENAUCZANIE_DOWNLOAD_DIRoverrides the location.Text returned by the tools was written by teachers and students. The server tells the model to treat it as content, not as instructions, and to use write tools only for what the user asked for.
License
MIT, see LICENSE.
Available Tools
14 toolsdownload_fileA
Download a course file (fileurl from get_course_contents) into the local downloads directory and return its path.
Inputs: fileurl (required), course_id (required).
get_assignment_statusA
Return the user's submission state, submitted files, grade and teacher feedback for one assignment (assignment_id from list_assignments, not the module id).
Inputs: assignment_id (required).
get_course_contentsA
Return the sections, modules and files of one course as a compact tree with module dates, completion and availability. Descriptions are cut at 200 chars; get_module_text gives the full text. Use fileurl with download_file.
Inputs: course_id (required). Returns: result
get_discussion_postsA
Return all posts of one forum discussion (discussion_id from get_forum_discussions), oldest first, full text.
Inputs: discussion_id (required).
get_forum_discussionsA
List the latest discussions of a course's forums (type news = teacher announcements), newest first, each with its first post. forum_module_id (from get_course_contents) narrows to one forum; get_discussion_posts gives replies.
Inputs: course_id (required), limit, forum_module_id.
get_gradesA
Return the user's grades: without course_id the final grade of every course, with a course_id (from list_courses) every grade item of that course with weight, range, feedback and grading time.
Inputs: course_id.
get_h5p_contentA
Return the text of an H5P exercise (module of type h5pactivity, id from get_course_contents): questions, answers, flashcards.
Inputs: course_id (required), module_id (required).
get_module_textA
Return the full text of one module (module_id from get_course_contents): the whole description, the body of a page or the instructions of an assignment, with link targets and the module's files.
Inputs: course_id (required), module_id (required).
get_notificationsB
Return the user's latest Moodle notifications (new forum posts, submission confirmations, grades) with the unread count, newest first.
Inputs: limit.
get_quiz_reviewA
Review a finished quiz attempt (module_id from get_course_contents): every question with the chosen answer marked [x], its mark and the correct answer, when the teacher allows review. Default is the latest attempt.
Inputs: course_id (required), module_id (required), attempt_id.
get_recent_changesA
List what changed in the user's current courses in the last days (new announcements and posts, new or changed files, assignment submissions and grades), per module, newest first.
Inputs: days.
list_assignmentsA
List the assignments of one course (id from list_courses) with instructions, deadlines and attachments. The assignment_id values feed get_assignment_status.
Inputs: course_id (required).
list_coursesC
List the user's enrolled courses on eNauczanie. Returns id, shortname, fullname and end_date.
Inputs: include_hidden. Returns: result
list_deadlinesA
List assignment due dates and quiz closing times across all courses, from days_back days ago to days_ahead days ahead, soonest first.
Inputs: days_back, days_ahead.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have clearly distinct purposes, especially around courses, modules, files, forums, assignments, and quizzes. A few boundaries are somewhat close, such as get_course_contents vs get_module_text and list_assignments vs list_deadlines, but the descriptions make the intended use fairly clear.
All tool names use a consistent snake_case verb_noun pattern: get_, list_, or download_. The convention is predictable throughout the set.
With 14 tools, the server is well-scoped for a Moodle/eNauczanie student-facing read surface. Each tool appears to earn its place by covering a distinct resource or workflow.
The surface covers the main read-only student workflows: courses, contents, files, assignments, deadlines, grades, forums, quizzes, notifications, and recent changes. Minor gaps remain, such as broader search or calendar-style access, but the core lifecycle is well represented.
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Your Telegram, WhatsApp, Instagram, mail and calendar in Claude or ChatGPT. Never sends messages.
Read-only access to your own crypto portfolio across 11+ exchanges and 20+ chains: holdings, full history, FIFO cost basis and P&L, fees and income. Ask Claude or ChatGPT about your portfolio; the connector can never trade, move funds or act as a login.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides Claude with full access to Moodle learning management systems, enabling interaction with courses, files, assignments, grades, and calendar events. It also supports building Obsidian study vaults from course materials through automated knowledge graph creation.30 npm18MIT
- AlicenseAqualityCmaintenanceEnables read-only querying of Moodle as a student, including courses, assignments, grades, forums, and files, using a personal web services token.1137 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to interact with Moodle via the official REST API for read-only tasks like listing courses, materials, assignments, submissions, and grades. Uses token-based authentication and emphasizes safe, no-write operations.2MIT
- AlicenseBqualityCmaintenanceEnables Claude to read courses, assignments, grades, announcements, files, and modules from Quercus (Canvas LMS) at the University of Toronto or any Canvas-based institution, using read-only access via a personal token.11MIT