lanis
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?"
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 a specific Lanis app is available at the user's school.
Checks one of the four LanisAPI-supported apps to see if it is enabled at the authenticated user's school.
Args: app_name: The app to check. Must be one of: - "Kalender" - "Mein Unterricht" - "Nachrichten - Beta-Version" - "Vertretungsplan"
Returns: A plain-text message indicating whether the app is available.
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "Error: Unknown app ..." for invalid app names
Inputs: app_name (required). Returns: result
get_appsARead-onlyIdempotent
Return all web applets (Apps) available in the user's Lanis portal.
Lists every app tile visible on the Lanis dashboard including name, link, colour, icon symbol, and which folder/category it belongs to.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of apps. JSON schema: { "count": int, "apps": [ { "name": str, "link": str, "colour": str, "symbol": str, "folders": [str] # category/folder names } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No apps found." if none are available
Inputs: response_format. Returns: result
get_available_appsARead-onlyIdempotent
Return the list of LanisAPI-supported apps that are available at this school.
The LanisAPI library supports a specific subset of Lanis applets: Kalender, Mein Unterricht, Nachrichten - Beta-Version, Vertretungsplan. This tool checks which of those are enabled for the authenticated user's school.
Returns: Plain text list of supported app names available at this school, or a message indicating none are supported.
Error Handling: - Returns "Error: ..." on API or auth failure
Inputs: no named parameters. Returns: result
get_calendarARead-onlyIdempotent
Return calendar events from Lanis for a given date range.
Fetches school calendar events (Kalender) between the specified start and end dates.
Args: params (CalendarInput): Validated input parameters: - start (str): Start date as YYYY-MM-DD - end (str): End date as YYYY-MM-DD - response_format (str): 'markdown' (default) or 'json' - include_responsible (bool): If True, fetch the responsible person for each event. Warning: makes one extra API call per event.
Returns: Calendar events for the date range. JSON schema: { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD", "count": int, "events": [ { "title": str, "description": str, "place": str, "start": "YYYY-MM-DD HH:MM", "end": "YYYY-MM-DD HH:MM", "whole_day": bool, "responsible": str # only present when include_responsible=True } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No events found ..." if calendar is empty
Inputs: params (required). Returns: result
get_calendar_of_monthARead-onlyIdempotent
Return all calendar events for the current month from Lanis.
Convenience shortcut for lanis_get_calendar that automatically uses the current month's date range.
Args: response_format: Output format - 'markdown' (default) or 'json'. include_responsible: If True, fetch the responsible person for each event. Warning: makes one extra API call per event and may be slow.
Returns: Same structure as lanis_get_calendar for the current month. When include_responsible=True, each event also includes a 'responsible' field with the responsible person's name.
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No events this month." if calendar is empty
Inputs: response_format, include_responsible. Returns: result
get_conversationsBRead-onlyIdempotent
Return conversations from the 'Nachrichten' section of Lanis.
Fetches message threads including sender, receivers, subject, and content.
Args: params (ConversationsInput): Validated input parameters: - number (int): How many conversations to fetch (default: 10, -1 = all) - response_format (str): 'markdown' (default) or 'json'
Returns: List of conversations. JSON schema: { "count": int, "conversations": [ { "id": str, "title": str, "teacher": str, "creation_date": str, "newest_date": str, "unread": bool, "receivers": [str], "special_receivers": [str], "content": str } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No conversations found." if there are none
Inputs: params (required). Returns: result
get_file_distributionARead-onlyIdempotent
Return distributed files and announcements (Dateiverteilung / GRB Infos).
Fetches files that have been distributed to the user via the Lanis file distribution system (Dateiverteilung). These are typically school-wide announcements or documents shared with specific groups.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of distributed files. JSON schema: { "count": int, "files": [ { "name": str, "description": str, "download_url": str, "date": str } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No distributed files available." if there are none
Inputs: response_format. Returns: result
get_file_storageARead-onlyIdempotent
Return the contents of the school file storage (Dateispeicher).
Lists folders and files in the Lanis file storage system. By default returns the root level. Use folder_id to navigate into sub-folders.
Args: folder_id: Optional folder ID to navigate into. Omit for root level. response_format: Output format - 'markdown' (default) or 'json'.
Returns: Folder contents. JSON schema: { "folder_id": str, "folder_name": str, "folders": [ { "id": str, "name": str, "description": str } ], "files": [ { "id": str, "name": str, "description": str, "download_url": str } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No items found." if the folder is empty
Inputs: folder_id, response_format. Returns: result
get_foldersARead-onlyIdempotent
Return all folder/category groupings from the Lanis dashboard.
Fetches the organizational folders that group apps on the Lanis portal. Each folder has a name, a symbol (Font Awesome / Glyphicons icon), and an optional colour.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of folders. JSON schema: { "count": int, "folders": [ { "name": str, "symbol": str, "colour": str # may be empty if no colour is set } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No folders found." if none are available
Inputs: response_format. Returns: result
get_learning_groupsARead-onlyIdempotent
Return the learning groups (Lerngruppen) the user belongs to.
Fetches all learning groups/courses the authenticated user is enrolled in, including subject name, course code, semester, and teacher information.
Use this tool to:
List all courses/subjects the user is enrolled in
Look up which teacher is responsible for a given subject or course
Resolve teacher abbreviations to full names (the teacher field contains both the full name and the abbreviation used in substitution plans)
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of learning groups. JSON schema: { "count": int, "groups": [ { "id": str, "semester": str, "course_name": str, "course_code": str, "teacher": str # full name and/or abbreviation } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No learning groups found." if there are none
Inputs: response_format. Returns: result
get_schoolsARead-onlyIdempotent
Return all schools registered in Schulportal Hessen (Lanis).
Fetches the complete list of schools with their ID, name, and city. This tool does NOT require authentication and can be used to look up the school ID needed for configuring Lanis credentials.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of schools. JSON schema: { "count": int, "schools": [ { "id": str, "name": str, "city": str } ] }
Error Handling: - Returns "Error: ..." on API failure - Returns "No schools found." if the list is empty
Inputs: response_format. Returns: result
get_substitution_planARead-onlyIdempotent
Return today's substitution plan (Vertretungsplan) from Lanis.
Fetches all substitutions for the current school day including class, subject, room, teacher/substitute, and any notices.
Args: response_format: Output format - 'markdown' (default, human-readable) or 'json' (machine-readable).
Returns: Substitution plan data with the following structure per substitution: - substitute: Abbreviation of the substitute teacher - teacher: Abbreviation of the original teacher - hours: Which school hours are affected (e.g. "3-4") - class_name: Affected class(es) - subject: Subject name (may be empty) - room: Room number/name - notice: Additional information
JSON schema:
{
"date": "YYYY-MM-DD",
"info": str, # General info box ("Allgemein"), may be empty
"substitutions": [
{
"substitute": str,
"teacher": str,
"hours": str,
"class_name": str,
"subject": str,
"room": str,
"notice": str
}
]
}Error Handling: - Returns "Error: Session expired..." if session needs renewal - Returns "No substitutions today." if there are none - Returns "No substitution plan published yet." before Lanis publishes one
Inputs: response_format. Returns: result
get_tasksARead-onlyIdempotent
Return all tasks and homework from the 'Mein Unterricht' section of Lanis.
Fetches tasks assigned to the user including subject, teacher, description, and download links for attachments.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of tasks. JSON schema: { "count": int, "tasks": [ { "title": str, "date": "YYYY-MM-DD", "subject_name": str, "teacher": str, "description": str, # may be empty "details": str, # may be empty "attachments": [str], # list of attachment filenames "attachment_url": str # zip download URL, may be empty } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No tasks found." if there are none
Inputs: response_format. Returns: result
get_timetableBRead-onlyIdempotent
Return the weekly timetable (Stundenplan) from Lanis.
Fetches the current class timetable showing which subjects are taught on which day and hour, including room and teacher information.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: Timetable data. JSON schema: { "class_name": str, "valid_from": "YYYY-MM-DD", "entries": [ { "hour": str, # e.g. "erste Stunde" "time": str, # e.g. "08:00 - 08:45" "day": str, # e.g. "Montag" "subject": str, # subject code "room": str, # room number/name "teacher": str, # teacher abbreviation "info": str, # full info from title attribute "duration": int # number of school hours this lesson spans } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - Returns "No timetable entries found." if the timetable is empty
Inputs: response_format. Returns: result
get_votesARead-onlyIdempotent
Return active votes and elections (Wahlen / GRB Wahlen) from Lanis.
Fetches currently active school votes and elections, such as student council elections or other school-wide voting events.
Args: response_format: Output format - 'markdown' (default) or 'json'.
Returns: List of active votes. JSON schema: { "count": int, "votes": [ { "id": str, "title": str, "description": str, "status": str } ] }
Error Handling: - Returns "Error: ..." on API or auth failure - 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…
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