npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@udondan/dsbmobile

v1.2.0

Published

SDK, CLI, and MCP server for DSBmobile — access German school substitution plans (Vertretungspläne)

Readme

@udondan/dsbmobile

Node.js-Paket für den Zugriff auf DSBmobile – die digitale Schulkommunikationsplattform für Vertretungspläne, Neuigkeiten und Dokumente. Es kapselt die DSBmobile-API und bietet drei Schnittstellen über einen gemeinsamen Kern:

  • SDK – importierbare DsbmobileClient-Klasse für Node.js-Projekte
  • CLIdsbmobile-Befehl für das Terminal
  • MCP-Serverdsbmobile mcp stellt alle Funktionen als Tools für KI-Assistenten bereit

Inhalt

Installation

# Globale Installation (empfohlen für CLI-Nutzung)
npm install -g @udondan/dsbmobile

# Ohne Installation direkt nutzen
DSB_USERNAME=benutzername DSB_PASSWORD=passwort npx @udondan/dsbmobile mcp

Konfiguration

Die Zugangsdaten werden über Umgebungsvariablen übergeben:

| Variable | Pflicht | Beschreibung | | -------------- | ------- | --------------------------------------------------------------------------------------------------- | | DSB_USERNAME | ✅ | DSBmobile-Benutzername bzw. -ID | | DSB_PASSWORD | ✅ | DSBmobile-Passwort | | DSB_CLASS | ❌ | Standard-Klassenfilter für get_substitutions (z. B. 07b). Kann pro Aufruf überschrieben werden. |

SDK

npm install @udondan/dsbmobile
import { DsbmobileClient } from '@udondan/dsbmobile';

const client = new DsbmobileClient({
  username: process.env.DSB_USERNAME!,
  password: process.env.DSB_PASSWORD!,
});

// Vertretungsplan abrufen
const plans = await client.getSubstitutions();

// Timetable-Einträge (Plan-URLs) abrufen
const timetables = await client.getTimetables();

// Neuigkeiten abrufen
const news = await client.getNews();

// Dokumente abrufen
const documents = await client.getDocuments();

Exportierte Typen

import type {
  DsbmobileConfig,
  SubstitutionPlan,
  SubstitutionEntry,
  TimetableEntry,
  NewsEntry,
  DocumentEntry,
  DsbItem,
} from '@udondan/dsbmobile';

CLI

# Vertretungspläne als JSON ausgeben
dsbmobile substitutions

# Nur eine bestimmte Klasse (überschreibt DSB_CLASS)
dsbmobile substitutions --class 07b

# Timetable-Einträge (Plan-URLs) als JSON ausgeben
dsbmobile timetables

# Neuigkeiten als JSON ausgeben
dsbmobile news

# Dokumente als JSON ausgeben
dsbmobile documents

# MCP-Server über stdio starten
dsbmobile mcp

MCP-Server

Einrichtung in Claude Code

claude mcp add dsbmobile -- npx @udondan/dsbmobile mcp

Anschließend die Zugangsdaten in der MCP-Konfiguration hinterlegen (~/.claude.json oder .claude/settings.json):

{
  "mcpServers": {
    "dsbmobile": {
      "command": "npx",
      "args": ["@udondan/dsbmobile", "mcp"],
      "env": {
        "DSB_USERNAME": "benutzername",
        "DSB_PASSWORD": "passwort",
        "DSB_CLASS": "07b"
      }
    }
  }
}

Einrichtung in Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "dsbmobile": {
      "command": "npx",
      "args": ["@udondan/dsbmobile", "mcp"],
      "env": {
        "DSB_USERNAME": "benutzername",
        "DSB_PASSWORD": "passwort",
        "DSB_CLASS": "07b"
      }
    }
  }
}

Einrichtung in anderen MCP-Clients

{
  "command": "npx",
  "args": ["@udondan/dsbmobile", "mcp"],
  "env": {
    "DSB_USERNAME": "benutzername",
    "DSB_PASSWORD": "passwort",
    "DSB_CLASS": "07b"
  }
}

Verfügbare MCP-Tools

get_timetables

Gibt alle verfügbaren Vertretungsplan-Einträge zurück.

Rückgabe: Liste von Plan-Einträgen, jeweils mit:

  • id: Eindeutige ID
  • title: Planname (z. B. „V-Homepage heute - subst_001 (Seite 1)")
  • date: Zeitstempel der letzten Aktualisierung im Format TT.MM.JJJJ HH:MM
  • url: Link zur HTML-Planseite mit der Vertretungstabelle
  • previewUrl: Link zu einem Vorschaubild (optional)

get_substitutions

Lädt und parst alle Vertretungsplan-Seiten und gibt strukturierte Einträge zurück.

Parameter:

  • className (optional): Klassenfilter, z. B. 07b oder Q2_Kra. Groß-/Kleinschreibung wird ignoriert. Standardmäßig wird DSB_CLASS verwendet, falls gesetzt.

Rückgabe: Liste von Plänen (ein Objekt pro Tag), jeweils mit:

  • date: Datum im ISO-Format (z. B. 2026-03-20)
  • lastUpdated: Zeitstempel der letzten Aktualisierung
  • entries: Liste der Vertretungseinträge, jeweils mit:
    • className: Klasse (z. B. 07b, Q2_Kra)
    • type: Art der Vertretung (z. B. Vertretung, Statt-Vertretung, Entfall)
    • period: Stunde(n) (z. B. 3 oder 5 - 6)
    • originalTeacher: Kürzel der vertretenen Lehrkraft
    • substituteTeacher: Kürzel der vertretenden Lehrkraft
    • subject: Fachkürzel (z. B. SPO, ETHI, E)
    • originalRoom: Ursprünglicher Raum
    • substituteRoom: Ausweichraum
    • text: Zusätzliche Hinweise

get_news

Ruft alle Neuigkeiten und Ankündigungen von DSBmobile ab.

Rückgabe: Liste von Nachrichten, jeweils mit id, title, detail, date, tags.

get_documents

Listet alle verfügbaren Dokumente und Dateien auf.

Rückgabe: Liste von Dokumenten, jeweils mit id, title, url, date.

Sicherheit

  • CLI und MCP-Server: Zugangsdaten werden ausschließlich über Umgebungsvariablen übergeben und nie im Code hinterlegt
  • SDK: Zugangsdaten werden explizit als DsbmobileConfig-Objekt im Konstruktor übergeben – nie hartcodiert oder aus Umgebungsvariablen gelesen
  • Zugangsdaten erscheinen weder in Logs noch in Fehlermeldungen
  • Es werden keine sensiblen Daten auf der Festplatte gespeichert
  • Der Server ist schreibgeschützt – er kann keine Daten auf DSBmobile verändern

Entwicklung

# Repository klonen
git clone https://github.com/udondan/dsbmobile.git
cd dsbmobile

# Abhängigkeiten installieren
bun install

# TypeScript kompilieren
bun run build

# Im Watch-Modus kompilieren
bun run dev

# MCP-Server starten
DSB_USERNAME=benutzername DSB_PASSWORD=passwort node dist/cli.js mcp

# Tests ausführen
bun run test

# Lint
bun run lint

Lizenz

MIT