lanis
Read-only MCP access to Schulportal Hessen (Lanis) data for querying school, schedule, calendar, messages, files, and portal information.
Look up schools and IDs without authentication.
Fetch substitution plans, timetables, learning groups, and calendar events.
Retrieve tasks/homework, conversations/messages, file storage contents, distributed files, and active votes.
List dashboard apps/folders and check which supported Lanis apps are available at a school.
Return most results as human-readable markdown or machine-readable JSON, with optional responsible person for calendar events.
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., "@lanis show me tomorrow's substitution plan"
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.
lanis
Inoffizielles Community-Projekt. Nicht mit dem Land Hessen oder dem Schulportal Hessen verbunden, nicht von ihnen unterstützt oder autorisiert.
Zugriff auf das Schulportal Hessen (Lanis) aus Python, aus dem Terminal und aus KI-Assistenten: Vertretungsplan, Stundenplan, Kalender, Hausaufgaben, Nachrichten, Dateien und mehr.
lanis bietet drei gleichwertige Zugänge zu denselben Daten:
Zugang | Für | Start |
eigene Programme und Automatisierungen |
| |
das Terminal und Shell-Skripte (JSON-Ausgabe) |
| |
KI-Assistenten wie Claude |
|
lanis liest nur. Es verändert keine Daten im Schulportal.
Installation
Das Paket pylanis braucht Python 3.11 oder neuer und wird auf PyPI veröffentlicht.
# Als Bibliothek in einem Projekt
pip install pylanis # oder: uv add pylanis
# Den Befehl lanis global installieren
uv tool install pylanis # oder: pipx install pylanis
# Ohne Installation ausprobieren
uvx --from pylanis lanis schoolsKommandozeile und MCP-Server gibt es auch als Docker-Image udondan/lanis (amd64 und arm64), ganz ohne Python:
docker run --rm udondan/lanis schoolsDas Image führt den Befehl lanis aus. Ohne Argument startet es den MCP-Server.
Die Images sind mit cosign signiert. So prüfst du, dass ein Image vom Release-Workflow dieses Repositorys stammt:
cosign verify udondan/lanis:latest \
--certificate-identity-regexp '^https://github\.com/udondan/(py)?lanis/\.github/workflows/publish\.yml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.comRelated MCP server: webuntis-mcp
Anmeldung
Du brauchst einen Lanis-Account und die Schul-ID deiner Schule. Die Schul-ID findest du ohne Anmeldung:
uvx --from pylanis lanis --format markdown schools | grep -i "musterstadt"Es gibt drei Arten, sich anzumelden. Das SDK nimmt die Zugangsdaten als Parameter, Kommandozeile und MCP-Server lesen sie aus Umgebungsvariablen (Lanis.from_env() im SDK ebenso).
Art | Umgebungsvariablen | SDK-Parameter |
Benutzername & Passwort (empfohlen) |
|
|
Schule nach Name & Stadt |
|
|
Session-Cookie (kein Passwort) |
|
|
Mit Benutzername und Passwort meldet sich lanis automatisch neu an, wenn die Session abläuft. Ein Session-Cookie läuft irgendwann ab und muss dann ersetzt werden.
Session speichern (optional): Mit LANIS_DATA_DIR (SDK: data_dir) wird die Session in session.json in diesem Verzeichnis gespeichert, sodass nach einem Neustart keine neue Anmeldung nötig ist. Die Datei ist nur für dich lesbar. Ohne diese Einstellung bleibt die Session nur im Speicher.
Verfügbare Daten
Alle drei Zugänge bieten dieselben Daten:
Daten | SDK ( | Kommandozeile ( | MCP-Tool |
Schulen mit ID (ohne Anmeldung) |
|
|
|
Vertretungsplan |
|
|
|
Stundenplan |
|
|
|
Lerngruppen/Kurse |
|
|
|
Kalender für einen Zeitraum |
|
|
|
Kalender des aktuellen Monats |
|
|
|
Aufgaben aus „Mein Unterricht" |
|
|
|
Nachrichten |
|
|
|
Dateispeicher |
|
|
|
Dateiverteilung |
|
|
|
Aktive Wahlen |
|
|
|
App-Kacheln und Ordner im Dashboard |
|
|
|
Unterstützte Apps der Schule |
|
|
|
Hinweise:
Mit
include_responsible=True(SDK),--responsible(Kommandozeile) bzw.include_responsible(MCP) enthalten Kalendertermine die verantwortliche Person. Dafür ist pro Termin eine zusätzliche Anfrage nötig, das kann bei vielen Terminen dauern.number=-1lädt alle Nachrichten und belastet den Lanis-Server stark. Bitte sparsam verwenden.
Python-SDK
from datetime import date
from pylanis import Lanis
lanis = Lanis(school_id="1234", username="vorname.nachname", password="dein-passwort")
# oder: Lanis.from_env() liest die LANIS_*-Umgebungsvariablen
for task in lanis.get_tasks():
print(task.subject_name, task.title, task.date)
plan = lanis.get_substitution_plan()
for sub in plan.substitutions:
print(sub.hours, sub.class_name, sub.subject, sub.substitute)
events = lanis.get_calendar(date(2026, 11, 1), date(2026, 11, 30))Die Methoden geben Dataclasses zurück (
Task,SubstitutionPlan,CalendarEvent,Timetableusw.), Datumswerte alsdate/datetime.Die Anmeldung passiert beim ersten Aufruf, der sie braucht.
Lanis.get_schools()braucht keine.Jede
Lanis-Instanz hat ihre eigene Session, mehrere Konten in einem Prozess sind möglich.
Fehler:
ConfigurationError: Die übergebenen Zugangsdaten sind unvollständig.SessionExpiredError: Die Session ist abgelaufen (nur bei Anmeldung per Session-Cookie) und wurde zurückgesetzt.
Abhängigkeiten: pylanis legt seine Abhängigkeiten auf exakte Versionen fest, damit Kommandozeile und MCP-Server nur mit getesteten Versionen laufen. Braucht dein Projekt eine andere Version, z. B. von httpx, kannst du die Vorgabe mit uv überschreiben:
# pyproject.toml deines Projekts
[tool.uv]
override-dependencies = ["httpx>=0.28"]Kommandozeile
Der Befehl lanis gibt die Daten als JSON aus, mit --format markdown als lesbaren Text.
export LANIS_SCHOOL_ID=1234
export LANIS_USERNAME=vorname.nachname
export LANIS_PASSWORD=dein-passwort
lanis substitutions
lanis --format markdown tasks
lanis calendar --start 2026-11-01 --end 2026-11-30
lanis timetable | jq '.entries[] | select(.day == "Montag")'Alle Befehle stehen in der Tabelle Verfügbare Daten. lanis --help und lanis <befehl> --help zeigen alle Optionen. Fehler werden als Error: … auf stderr ausgegeben, der Befehl endet dann mit Exit-Code 1.
Mit Docker
-e NAME ohne Wert übernimmt die Variable aus deiner Shell:
docker run --rm -e LANIS_SCHOOL_ID -e LANIS_USERNAME -e LANIS_PASSWORD udondan/lanis substitutionsDamit nicht jeder Aufruf eine neue Anmeldung braucht, speichert ein Volume die Session (siehe Anmeldung). Als Alias verhält sich das Image dann wie ein installiertes lanis:
alias lanis='docker run --rm -e LANIS_SCHOOL_ID -e LANIS_USERNAME -e LANIS_PASSWORD -e LANIS_DATA_DIR=/data -v lanis-data:/data udondan/lanis'
lanis --format markdown tasksMCP-Server
lanis mcp startet einen MCP-Server über stdio. Damit kann ein KI-Assistent die Daten abfragen, und du fragst einfach:
„Was steht heute im Vertretungsplan?"
„Welche Hausaufgaben habe ich diese Woche?"
„Zeig mir alle Termine im April."
„Habe ich ungelesene Nachrichten?"
Der Server ist in der MCP Registry als io.github.udondan/lanis eingetragen. Clients, die die Registry nutzen, starten ihn mit uvx pylanis mcp.
Claude Desktop
Öffne die Konfigurationsdatei von Claude Desktop:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Füge einen Eintrag unter mcpServers hinzu. Die Umgebungsvariablen entsprechen der Tabelle unter Anmeldung:
{
"mcpServers": {
"lanis": {
"command": "uvx",
"args": ["--from", "pylanis", "lanis", "mcp"],
"env": {
"LANIS_SCHOOL_ID": "1234",
"LANIS_USERNAME": "vorname.nachname",
"LANIS_PASSWORD": "dein-passwort"
}
}
}
}Nach dem Speichern Claude Desktop neu starten.
Mit Docker statt uvx sieht der Eintrag so aus. -e NAME ohne Wert reicht die Variable aus env an den Container weiter:
{
"mcpServers": {
"lanis": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"LANIS_SCHOOL_ID",
"-e",
"LANIS_USERNAME",
"-e",
"LANIS_PASSWORD",
"udondan/lanis"
],
"env": {
"LANIS_SCHOOL_ID": "1234",
"LANIS_USERNAME": "vorname.nachname",
"LANIS_PASSWORD": "dein-passwort"
}
}
}
}Docker MCP Toolkit
Mit dem Docker MCP Toolkit von Docker Desktop läuft der Server als Container hinter dem MCP Gateway. Der Gateway startet den Container bei Bedarf und reicht die Tools an die verbundenen Clients weiter. Die Zugangsdaten liegen dabei als Secrets in Docker Desktop statt im Klartext in der Client-Konfiguration.
Voraussetzung: Docker Desktop mit aktiviertem MCP Toolkit.
Die Server-Definition
docker-mcp.ymlherunterladen und zu einem Toolkit-Profil hinzufügen. Das Toolkit liest solche Dateien nur aus seinem Katalog-Verzeichnis:mkdir -p ~/.docker/mcp/catalogs curl -fsSL https://raw.githubusercontent.com/udondan/lanis/main/docker-mcp.yml -o ~/.docker/mcp/catalogs/lanis.yml # neues Profil "lanis" ... docker mcp profile create --name lanis --id lanis --server "file://$HOME/.docker/mcp/catalogs/lanis.yml" # ... oder zu einem bestehenden Profil hinzufügen docker mcp profile server add default --server "file://$HOME/.docker/mcp/catalogs/lanis.yml"Das Profil hält das Image auf dem Stand, den es beim Hinzufügen hatte. Für ein Update
profile server adderneut ausführen.Zugangsdaten als Secrets hinterlegen (siehe Anmeldung):
docker mcp secret set lanis.school_id=1234 docker mcp secret set lanis.username=vorname.nachname docker mcp secret set lanis.password=dein-passwortEinen Client mit dem Profil verbinden:
docker mcp client connect claude-desktop --profile lanisWeitere Clients wie
claude-code,cursorodervscodezeigtdocker mcp client connect --help. Alternativ geht das in Docker Desktop unter MCP Toolkit.
docker mcp gateway run --profile lanis --dry-run --verbose prüft die Einrichtung, ohne einen Client zu starten. Am Ende sollte lanis: (15 tools) stehen.
Ausgabe
Die meisten Tools haben einen Parameter response_format: markdown (Standard, für Menschen lesbar) oder json (maschinenlesbar). Du kannst das Format einfach in deiner Frage angeben, z. B. „Zeig mir den Vertretungsplan als JSON."
Antworten sind auf 25.000 Zeichen begrenzt. Längere Ergebnisse werden gekürzt und mit einem Hinweis versehen. Grenze die Abfrage dann ein, z. B. mit einem kürzeren Zeitraum im Kalender.
Fehlerbehebung
Session abgelaufen
Betrifft nur die Anmeldung per Session-Cookie, mit Benutzername und Passwort meldet sich lanis selbst neu an. Einen neuen Session-Cookie eintragen oder auf Benutzername und Passwort wechseln.
App an der Schule nicht verfügbar
Nicht alle Schulen haben alle Lanis-Module aktiviert. lanis available-apps (bzw. get_available_apps) zeigt, welche der unterstützten Apps freigeschaltet sind.
Kein Vertretungsplan
Den Vertretungsplan gibt es nur an Schultagen, nicht an Wochenenden und Feiertagen. Manche Schulen zeigen die App „Vertretungsplan" an, nutzen sie aber nicht. Dann meldet lanis, dass keine Vertretungsdaten vorliegen.
Keine Termine gefunden
Prüfe den Zeitraum. start und end müssen im Format JJJJ-MM-TT angegeben werden.
Verbindungsfehler
Prüfe die Zugangsdaten (beim MCP-Server die Umgebungsvariablen in der Client-Konfiguration bzw. die Secrets im Docker MCP Toolkit) und ob du Zugang zum Schulportal Hessen hast (ggf. VPN oder Schulnetzwerk erforderlich).
Lizenz
lanis steht unter der MIT-Lizenz.
Der Ordner src/pylanis/lanisapi/ basiert auf LanisAPI 0.4.1 von Dacjan Gapinski. Das Projekt wird nicht mehr weiterentwickelt; der Code wurde überarbeitet und wird hier gepflegt. LanisAPI steht ebenfalls unter der MIT-Lizenz, siehe src/pylanis/lanisapi/LICENSE.
Disclaimer
Dieses Projekt ist ein inoffizielles, unabhängiges Open-Source-Projekt und steht in keiner Verbindung zum Land Hessen oder zum Hessischen Ministerium für Kultus, Bildung und Chancen. Schulportal Hessen und LANIS sind Angebote des Landes Hessen. Die Namen werden ausschließlich zur Beschreibung der Kompatibilität verwendet. Die Nutzung erfolgt auf eigenes Risiko und unter Beachtung der Nutzungsbedingungen des Schulportals Hessen.
Available Tools
15 toolscheck_app_availabilityARead-onlyIdempotent
Check whether one of the apps these tools read is enabled at the user's school.
Use it before a calendar, task, conversation or substitution plan tool fails, or to tell the user why. For all four at once use get_available_apps.
Returns a sentence saying whether the app is available, or "Error: Unknown app..." with the valid names.
Inputs: app_name (required). Returns: result
get_appsARead-onlyIdempotent
Return every app tile of the user's Lanis dashboard with its link.
Use it to find the link to a school app, including those this server can't read. Whether one of the apps these tools read is enabled is answered by get_available_apps (all four) or check_app_availability (one). Each tile has its name, link, colour, icon and the dashboard folders it is in (see get_folders).
Returns "No apps found." if the dashboard is empty.
Inputs: response_format. Returns: result
get_available_appsARead-onlyIdempotent
Return which of the apps these tools read are enabled at the user's school.
Of Kalender, Mein Unterricht, Nachrichten - Beta-Version and Vertretungsplan, lists those the school offers, so you know which of the calendar, task, conversation and substitution plan tools can work. For a single app use check_app_availability, for all dashboard tiles get_apps.
Returns a plain text list, or a message if the school offers none.
Inputs: no named parameters. Returns: result
get_calendarARead-onlyIdempotent
Return the school calendar events (Kalender) between two dates.
Use it for dates beyond the current month, such as holidays, parent evenings or exams. For the current month, get_calendar_of_month needs no dates. Each event has a title, description, place, start and end and whether it lasts the whole day.
Returns "Error: Invalid date format..." for a date that doesn't exist and "No events found between..." if the range has none.
Inputs: end (required), start (required), response_format, include_responsible. Returns: result
get_calendar_of_monthARead-onlyIdempotent
Return the school calendar events (Kalender) of the current month.
The shortcut for questions about this month. For any other range use get_calendar with start and end. The events have the same fields as those of get_calendar.
Returns "No events this month." if the month has none.
Inputs: response_format, include_responsible. Returns: result
get_conversationsARead-onlyIdempotent
Return the newest message threads from 'Nachrichten'.
Use it for messages from teachers or the school. Each conversation has its ID, title, teacher, the dates of the first and newest message, whether it is unread, the receivers and the content.
Returns "No conversations found." if there are none.
Inputs: number, response_format. Returns: result
get_file_distributionARead-onlyIdempotent
Return the files the school sent to the user (Dateiverteilung), such as letters to parents.
Use it for announcements and documents shared with the user's groups. The general file storage is get_file_storage. Each file has a name, description, download link and date.
Returns "No distributed files available." if there are none.
Inputs: response_format. Returns: result
get_file_storageARead-onlyIdempotent
Return one folder of the school's file storage (Dateispeicher).
Browse it one level per call: start without folder_id, then pass the ID of a sub-folder. Files that were sent to the user are in get_file_distribution instead. The result has the folder's ID and name, its sub-folders (ID, name, description) and its files (ID, name, description, download link).
Returns "No items found in folder..." if the folder is empty.
Inputs: folder_id, response_format. Returns: result
get_foldersARead-onlyIdempotent
Return the folders that group the app tiles on the Lanis dashboard.
Only needed to show the dashboard's structure: get_apps already names the folders of each app. Each folder has a name, an icon and a colour, which may be empty.
Returns "No folders found." if there are none.
Inputs: response_format. Returns: result
get_learning_groupsARead-onlyIdempotent
Return the courses (Lerngruppen) the user is enrolled in, with their teachers.
Use it to list the subjects, or to turn a teacher abbreviation from the timetable or the substitution plan into a full name. Each group has its ID, semester, course name and code and the teacher's name with the abbreviation.
Returns "No learning groups found." if there are none.
Inputs: response_format. Returns: result
get_schoolsARead-onlyIdempotent
List every school in Schulportal Hessen (Lanis) with its ID, name and city.
The only tool that works without credentials: use it to find the school ID that LANIS_SCHOOL_ID needs. It returns the whole list, which is long, so search the result for the name or city.
Returns "Error: ..." if Lanis can't be reached.
Inputs: response_format. Returns: result
get_substitution_planARead-onlyIdempotent
Return today's substitution plan (Vertretungsplan): cancelled and changed lessons.
Use it for what changes today. For the regular weekly lessons use get_timetable. Each entry has the substitute and the original teacher (abbreviations, get_learning_groups resolves them), the affected hours and class, subject, room and a notice. The JSON also has the date and the general info box of the plan.
Returns "No substitutions today (...)" if nothing changes, "No substitution plan published yet." before the school publishes one, and "Error: Session expired..." if the login expired (retry once).
Inputs: response_format. Returns: result
get_tasksARead-onlyIdempotent
Return the homework and tasks of 'Mein Unterricht'.
Use it for questions about homework or what a teacher assigned. Each task has a title, date, subject, teacher, description, details, the names of its attachments and a download link for all of them as a zip file.
Returns "No tasks found." if there are none.
Inputs: response_format. Returns: result
get_timetableARead-onlyIdempotent
Return the regular weekly timetable (Stundenplan) of the user's class.
Use it for which lessons take place on which day. It doesn't show today's cancellations or substitutions: get_substitution_plan does. Each lesson has the day, the school hour and its time, subject, room, teacher abbreviation and how many hours it lasts. The JSON also has the class and the date the timetable is valid from.
Returns "No timetable entries found." if the school publishes none.
Inputs: response_format. Returns: result
get_votesARead-onlyIdempotent
Return the votes and elections (Wahlen) that are open at the school.
Use it for questions about student council elections and other school votes. It only lists them; voting happens in Lanis itself. Each vote has its ID, title, description and status.
Returns "No active votes." if there are none.
Inputs: response_format. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools target distinct resources (timetable vs substitution plan vs calendar vs tasks vs files), and descriptions explicitly cross-reference to steer away from confusion. The only fuzzy cluster is get_apps / get_available_apps / check_app_availability, plus get_calendar vs get_calendar_of_month, where overlap exists but the descriptions clarify the boundaries.
Nearly all tools follow a consistent get_<noun> snake_case pattern, with clear suffixes distinguishing variants (e.g. _of_month, get_file_storage vs get_file_distribution). The single check_app_availability deviates from the get_ prefix, a minor inconsistency in an otherwise predictable set.
15 tools sits at the top of the well-scoped range for a school-portal reader, and each one maps to a distinct Lanis feature area. Nothing appears padded or redundant.
The read surface covers substitution plans, calendars, tasks, messages, files, timetable, learning groups and votes, which is broad. Gaps are minor and possibly by design: substitution plan is today-only (no future days), and there is no write path such as replying to messages or casting votes.
Maintenance
Related MCP Connectors
Read your plat.plus courses, tasks, course pages, sessions, files and messages. Read-only.
Search university course materials, your flashcards, quizzes, streak and quota. All tools read-only.
Read-only access to Epivo's live course catalogue for AI agents.
Read your events, sales, orders and attendees from your AI assistant. OAuth sign-in, read only.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI clients to access and query WebUntis school data, including timetables, homework, exams, absences, and more via MCP tools.-
- AlicenseAqualityCmaintenanceEnables AI assistants to access a child's WebUntis school data read-only, including timetables, homework, exams, absences, and schedule changes, with credentials kept locally.11MIT
- AlicenseAqualityCmaintenanceEnables AI agents to access a student's EPFL Moodle data—deadlines, course files, assignments, forums, and grades—through read-only tools.12MIT
- AlicenseAqualityBmaintenanceLets AI assistants read a student's grades, assignments, attendance, and schedule from the district portal through a headless browser, with read-only access.3MIT