Server data from the Official MCP Registry
Swiss school & public holidays, 26 cantons, by Schulart (OpenHolidays + Nager.Date)
Swiss school & public holidays, 26 cantons, by Schulart (OpenHolidays + Nager.Date)
Valid MCP server (1 strong, 3 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (34/35 approved).
3 files analyzed Β· 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-malkreide-swiss-holidays-mcp": {
"args": [
"swiss-holidays-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
π¨π Part of the Swiss Public Data MCP Portfolio
This is a private project. It is independent of any employer or institutional affiliation and represents no official position of any authority.
A Swiss holiday calendar for AI agents β public holidays, school holidays and long weekends for all 26 cantons, with cross-cantonal comparison. School holidays are differentiated by Schulart (school type), which matters more than it first appears. No API key required.
swiss-holidays-mcp is a Swiss holiday calendar for AI assistants like Claude β public holidays, school holidays and long weekends for all 26 cantons, no API keys required. Public holidays are cantonal (Berchtoldstag, Fronleichnam & co. differ by canton, not just the federal minimum). School holidays are set cantonally, sometimes at district level, and β in six cantons β separately per school type. A single federal calendar does not exist; anyone planning across cantonal borders is otherwise reduced to opening 26 PDF pages.
The server covers two thematic clusters: public holidays / long weekends and school holidays (with Schulart differentiation). Each cluster maps to a group of purpose-built tools that translate raw agency data into clean, provenance-tagged JSON responses. All data comes from the OpenHolidays API (CC BY 4.0) and Nager.Date (MIT).
Mnemonic: A duplicate in Swiss school data is usually a school type in disguise. The underlying API publishes the same holiday period several times when a canton differentiates by school type. That looks like duplicated data and invites naive de-duplication β which would destroy exactly the distinction a school authority needs.
Anchor demo query: "In which weeks of 2026 are the compulsory schools of Zurich, Zug and Aargau simultaneously on holiday β and how many overlapping days does each pair share?"
β This exercises find_common_free_window, compare_school_holidays and list_school_types in a single conversation, and answers a question that recurs every planning cycle in inter-cantonal coordination.
β More use cases by audience β
VS / MS / BS / EO)scope marker so they are never mistaken for canton-wide.ics calendarholidays://<canton>/<year> MCP resource with a Markdown summarylive_api | cached | degraded, never a silent empty list| Source | Data | Licence |
|---|---|---|
| OpenHolidays API | Cantons, Schularten, school holidays, public holidays | CC BY 4.0 |
| Nager.Date | Long weekends and required bridge days | MIT |
Both sources are publicly accessible, no authentication required. Attribution required: OpenHolidays (CC BY 4.0) and Nager.Date must be cited as the source when using their data.
| Tool | Purpose | Data Source |
|---|---|---|
list_cantons | The 26 cantons with ISO codes and official languages | OpenHolidays |
list_school_types | Schulart groups per canton (CH-ZH-VS etc.) | OpenHolidays |
get_school_holidays | School holidays for one canton and date range | OpenHolidays |
get_public_holidays | Public holidays for one canton and year | OpenHolidays |
get_local_holidays | Public holidays for one municipality or district, incl. local specifics | OpenHolidays |
check_date | Is a given date a school or public holiday? | OpenHolidays |
compare_school_holidays | Pairwise overlap matrix across cantons | OpenHolidays |
find_common_free_window | Windows where all listed cantons are on holiday | OpenHolidays |
next_school_holidays | The next upcoming holiday periods | OpenHolidays |
get_long_weekends | Long weekends and required bridge days | Nager.Date |
export_holidays_ics | A canton's holidays for a year as an iCalendar (.ics) document | OpenHolidays |
is_holiday_today | Is today a school or public holiday in a canton? | OpenHolidays |
source_status | Reachability and latency of both upstreams | Built-in |
| Resource URI | Content |
|---|---|
holidays://{canton}/{year} | Markdown summary of all public + school holidays, e.g. holidays://CH-ZH/2026 |
All tools carry the full annotation set β readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true (they reach an external API). No tool writes anywhere. Inputs are schema-validated (canton codes against the 26 known cantons, dates as YYYY-MM-DD, year bounded, language/school_type whitelisted).
| Query | Tool |
|---|---|
| "Which cantons are there, and what are their codes?" | list_cantons |
| "Show Zurich's compulsory-school holidays for spring 2026" | get_school_holidays |
| "Is 3 April 2026 a public holiday in Ticino?" | check_date |
| "Do Zurich and Zug school holidays overlap this year?" | compare_school_holidays |
| "When can all of ZH, ZG, AG plan a joint week off school?" | find_common_free_window |
| "What are the next holidays for Basel-Stadt schools?" | next_school_holidays |
| "Which long weekends does 2026 have, and which bridge days do they need?" | get_long_weekends |
| "Which local holidays does the city of Zurich keep that the rest of the canton doesn't?" | get_local_holidays |
| "Export Zurich's 2026 holidays as an .ics calendar I can import" | export_holidays_ics |
| "Is today a holiday in Aargau?" | is_holiday_today |
| Aspect | Details |
|---|---|
| Access | Read-only (readOnlyHint: true) β the server cannot modify or delete any data |
| Personal data | No personal data β all sources are aggregated, public holiday calendars |
| Caching | 12-hour in-memory TTL (holiday tables change a handful of times per year) |
| Retry | Exponential backoff 2s / 4s / 8s; 4xx except 429 are not retried |
| Timeout | 20 seconds per API call (8 seconds for health probes) |
| Authentication | No API keys required β both upstreams are publicly accessible |
| Degradation | Upstream failure yields a degraded envelope with an explanatory note, never a silent empty list |
| Terms of Service | Subject to the ToS of the respective data sources: OpenHolidays, Nager.Date |
This server uses Architecture A (live API only, with in-memory cache).
ββββββββββββββββββββββββββββ
Claude / any ββββΆβ swiss-holidays-mcp β
MCP host β (FastMCP Β· 13 tools) β
ββββββββββ¬ββββββββββββββββββ
β retry 2s/4s/8s Β· 12h cache
ββββββββββ΄ββββββββββ
βΌ βΌ
OpenHolidays API Nager.Date
(CC BY 4.0) (MIT)
cantons Β· Schularten long weekends
school + public bridge days
Rationale (verified live on 2026-07-19):
/Subdivisions?countryIsoCode=CH returns exactly 26 cantons, matching the official count.openpotato/openholidays.data raw access returned 404), so Architecture B was not available.Consequences:
provenance (live_api | cached | degraded).degraded envelope with an explanatory note, never a silent empty list.source_status always returns an evaluable health report.| Endpoint | HTTP | Status | Records | Note |
|---|---|---|---|---|
/Countries | 200 | β works | 36 | |
/Subdivisions?countryIsoCode=CH | 200 | β works | 26 | matches official canton count |
/Groups?countryIsoCode=CH | 200 | β works | 11 | Schulart groups, only 6 cantons |
/PublicHolidays (CH, 2026) | 200 | β works | 39 | cantonal scope included |
/SchoolHolidays (CH, 2026) | 200 | β works | 193 | 183 distinct after school-type split |
/SchoolHolidaysByDate | 200 | β works | β | |
/SchoolHolidays?countryIsoCode=XX | 200 | β οΈ silently empty | 0 | invalid country β error |
/Subdivisions?languageIsoCode=ZZ | 200 | β οΈ silent EN fallback | 26 | invalid language β error |
/SchoolHolidays without date range | 400 | β correct error | β | RFC 9110 problem+json |
Nager /PublicHolidays/2026/CH | 200 | β works | 33 | 29 rows carry counties |
Nager /LongWeekend/2026/CH | 200 | β works | 3 | |
Nager /PublicHolidays/2026/XX | 404 | β correct error | β | stricter than OpenHolidays |
CH-ZH-VS (Volksschulen, tagged Recommended) and once for CH-ZH-BS + CH-ZH-MS (Berufsfach- and Mittelschulen). Use the school_type parameter (VS / MS / BS / EO) rather than de-duplicating.groups is absent and one table covers everything. The filter therefore treats an absent groups field as "applies to all".CH-AI-AP or CH-BE-TH-BL. Always match on the CH-XX prefix, never on string equality.[]. This server sets an explanatory note so that "no holidays" and "bad filter" stay distinguishable.Run via uv's uvx β no clone or manual install needed:
uvx swiss-holidays-mcp
git clone https://github.com/malkreide/swiss-holidays-mcp
cd swiss-holidays-mcp
pip install -e ".[dev]"
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"swiss-holidays": {
"command": "uvx",
"args": ["swiss-holidays-mcp"]
}
}
}
Restart Claude Desktop β the server starts automatically on first use.
For use via claude.ai in the browser (e.g. on managed workstations without local software):
MCP_TRANSPORT=sse PORT=8000 python -m swiss_holidays_mcp
FastMCP exposes SSE at /sse, not /mcp.
| Variable | Default | Description |
|---|---|---|
MCP_TRANSPORT | stdio | Transport: stdio, sse, streamable-http (aka http) |
PORT / MCP_PORT | 8000 | Port for HTTP transports |
MCP_HOST | 127.0.0.1 | Bind address for HTTP transports. Loopback by default; 0.0.0.0 is opt-in and logs a warning β run behind an authenticating reverse proxy. |
π‘ "stdio for the developer laptop, SSE for the browser."
swiss-holidays-mcp/
βββ src/
β βββ swiss_holidays_mcp/
β βββ __init__.py # Package init
β βββ __main__.py # Entry point: stdio / SSE / Streamable HTTP
β βββ server.py # FastMCP server: lifespan, 13 tools, 1 resource, op_* logic
β βββ client.py # Shared HTTP client: retry, 12h cache, egress guard
β βββ guard.py # Egress / SSRF guard (HTTPS + allow-list + IP blocklist)
β βββ ical.py # RFC 5545 iCalendar (.ics) writer
β βββ settings.py # Pydantic-Settings config (loopback default)
β βββ logging_setup.py # Structured logging to stderr
β βββ constants.py # Canton codes, Schulart suffixes, API bases, allow-list
β βββ models.py # Pydantic v2 response envelopes
βββ tests/
β βββ conftest.py # respx fixtures
β βββ test_tools.py # Tool unit tests (mocked, no network)
β βββ test_resilience.py # Degradation / retry / cache behaviour
β βββ test_live.py # Live smoke tests (marker: live)
βββ docs/ # roadmap.md, security.md, network-egress.md
βββ audits/ # mcp-audit run artifacts
βββ Dockerfile # Non-root multi-stage container
βββ .github/
β βββ dependabot.yml # Weekly dependency / action update PRs
β βββ workflows/ # ci.yml, live-tests.yml, publish.yml
βββ pyproject.toml
βββ CHANGELOG.md
βββ CONTRIBUTING.md # Contributing guide (English)
βββ CONTRIBUTING.de.md # Contributing guide (German)
βββ SECURITY.md # Security policy (English)
βββ SECURITY.de.md # Security policy (German)
βββ EXAMPLES.md # Use cases by audience
βββ server.json # MCP registry manifest
βββ LICENSE
βββ README.md # This file (English)
βββ README.de.md # German version
This server is in Phase 1 (read-only) β all tools read-only, no auth, no side
effects. The 13-tool budget (of the 15β20 recommended maximum) still leaves
headroom. Local and municipal specifics β including Zurich's SechselΓ€uten and
Knabenschiessen β are covered directly from OpenHolidays via get_local_holidays
(a live probe showed they are published upstream at Gemeinde level), so no
separate city data source is required for them.
GETs. A Resource exposes a stable URI feed
(holidays://<canton>/<year>) so clients can read a canton's calendar as
cacheable context without a tool call. There are no recurring templated
workflows, so Prompts are not used (revisited if that changes).2025-06-18 (pinned as MCP_PROTOCOL_VERSION and surfaced by source_status).
The wire version is negotiated by the pinned mcp SDK (mcp>=1.2.0,<2).CHANGELOG.md with a version bump.All data is Γffentlich / Public Open Data β aggregated holiday calendars,
no personal data (DSG/DSGVO). This is the highest classification the server
handles; the full model is in docs/security.md.
CH-ZH-ZH-ZH), exposed through get_local_holidays. Completeness at Gemeinde level is only as good as the upstream data, which varies by canton. Municipal school holidays are not separately modelled.# Unit tests (no network required β respx-mocked)
PYTHONPATH=src pytest tests/ -m "not live"
# Live smoke tests (hits the real upstream APIs)
PYTHONPATH=src pytest tests/ -m "live"
# Linting
ruff check src/ tests/
Contributions are welcome! Please read CONTRIBUTING.md (English) Β· CONTRIBUTING.de.md (German) for guidelines on reporting bugs, setting up the development environment, code style and test requirements.
This project follows the conventions of the Swiss Public Data MCP Portfolio.
To report a vulnerability, please follow the responsible disclosure process in SECURITY.md (English) Β· SECURITY.de.md (German). The server is read-only and requires no API key; see the Safety & Limits section above for the security model.
See CHANGELOG.md
If you self-host this server for a Swiss school authority or municipal use case:
MIT License β see LICENSE
Source data is subject to the terms of OpenHolidays (CC BY 4.0) and Nager.Date (MIT); attribution to these sources is required when using their data.
Hayal Oezkan Β· github.com/malkreide
mcp-data-source-probe methodology: live probe before design, dump fallback before API dependency, retry before defeatism.| Server | Description |
|---|---|
zh-education-mcp | Canton of Zurich education data |
zurich-opendata-mcp | City of Zurich Open Data |
swiss-statistics-mcp | BFS STAT-TAB β Swiss federal statistics |
swisstopo-mcp | Swiss federal geodata (swisstopo) |
MIT licensed. Public money, public code.
Be the first to review this server!
by Modelcontextprotocol Β· Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno Β· Developer Tools
Toleno Network MCP Server β Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace Β· Developer Tools
Create, build, and publish Python MCP servers to PyPI β conversationally.