# swiss-holidays-mcp [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/malkreide/swiss-holidays-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/swiss-holidays-mcp

## Description
Swiss school & public holidays, 26 cantons, by Schulart (OpenHolidays + Nager.Date)

## Tools
Capabilities this server exposes over MCP:

- **list_cantons** — List the 26 Swiss cantons with their ISO subdivision codes.

    <use_case>Resolve a canton name to the CH-XX code every other tool needs; call this first when
    the user gives a canton by name.</use_case>

    Use this first to resolve a canton name to the `CH-XX` code that every other
    tool expects.
    
- **list_school_types** — List the Schularten (school types) that publish separate holiday tables.

    <use_case>Discover whether a canton differentiates school holidays by Schulart before querying,
    so VS/MS/BS/EO filters are used only where they exist.</use_case>

    Only a minority of cantons differentiate. For Zurich the codes are
    `CH-ZH-VS` (Volksschulen), `CH-ZH-MS` (Mittelschulen) and `CH-ZH-BS`
    (Berufsfachschulen). Cantons absent from this list publish one table for
    all school types.
    
- **get_school_holidays** — Return school holiday periods for one canton in a date range.

    <use_case>Look up a canton's school holidays for planning within an explicit from/to window
    (term breaks, parent events, campaigns).</use_case>
    <important_notes>Apparent duplicates are the same period per Schulart; set school_type to
    collapse them. Cantons that do not differentiate return one table.</important_notes>

    Args:
        canton: ISO subdivision code, e.g. `CH-ZH`.
        valid_from: Inclusive start date, `YYYY-MM-DD`.
        valid_to: Inclusive end date, `YYYY-MM-DD`.
        school_type: Optional Schulart suffix -- `VS`, `MS`, `BS` or `EO`.
            Use `VS` for compulsory schooling (Volksschule).
        language: `DE`, `FR`, `IT` or `EN`.

    Records that look duplicated are usually the same period published for a
    different Schulart. Set `school_type` to collapse them.
    
- **get_public_holidays** — Return public holidays for one canton and calendar year.

    <use_case>Get a canton's official public holidays for a whole year — cantonal holidays
    (Berchtoldstag, Fronleichnam) differ, so always pass the canton.</use_case>

    Cantonal holidays such as Berchtoldstag differ substantially across
    Switzerland, so always pass the canton rather than assuming the federal set.
    
- **get_local_holidays** — Public holidays for a single municipality or district, incl. local specifics.

    <use_case>Answer the locality question the canton-level tools flatten away: which holidays are
    observed only in this town (e.g. Zurich's Sechselaeuten)?</use_case>
    <important_notes>scope is 'local' (specific here), 'regional' (canton/district) or 'national'
    (inherited). Accepts a name or a full subdivision code.</important_notes>

    Answers the local question the canton-level tools flatten away: which holidays
    are observed *only* here? The city of Zurich, for example, keeps Sechseläuten
    and Knabenschiessen (both half-day), which the rest of the canton does not.

    `municipality` accepts a name (e.g. "Zürich", "Morschach") or a full
    subdivision code (e.g. "CH-ZH-ZH-ZH"). The result lists every holiday that
    applies in that locality; each carries a `scope` of `local` (specific to this
    place), `regional` (inherited from the canton/district) or `national`.
    
- **check_date** — Check whether a given date falls into school holidays or a public holiday.

    <use_case>The everyday scheduling question: can we hold the parents' evening on that Thursday?
    Checks one date against both school and public holidays.</use_case>

    The everyday question behind this tool: "Can we schedule the parents'
    evening on that Thursday?"
    
- **compare_school_holidays** — Compare school holiday overlap between cantons for a calendar year.

    <use_case>Quantify inter-cantonal school-holiday overlap (pairwise day counts) for coordinating
    events or campaigns across cantonal borders.</use_case>

    Returns a pairwise matrix of overlapping holiday days. Defaults to `VS`
    (Volksschule) because that is the level most inter-cantonal coordination
    concerns.
    
- **find_common_free_window** — Find date ranges in which all listed cantons are simultaneously on holiday.

    <use_case>Find a common free window across several cantons — joint events, maintenance or
    campaigns when every listed canton is on holiday.</use_case>

    Useful for planning campaigns, joint events or maintenance windows across
    cantonal borders.
    
- **next_school_holidays** — Return the next upcoming school holiday periods for a canton.

    <use_case>Forward-looking planning: the next N school-holiday periods for a canton from today,
    without computing a date range by hand.</use_case>
    
- **get_long_weekends** — Return Swiss long weekends and the bridge days needed to create them.

    <use_case>Plan bridge days: which long weekends exist this year and which working days must be
    taken off to extend them.</use_case>
    <important_notes>Computed from federal public holidays (Nager.Date); cantonal-only holidays are
    not considered.</important_notes>

    Sourced from Nager.Date, which computes these from federal public holidays;
    cantonal-only holidays are not considered.
    
- **source_status** — Report reachability and latency of both upstream sources.

    <use_case>Health check before a batch of queries, or to distinguish 'no data' from 'source
    down' — always returns an evaluable status.</use_case>

    Always returns an evaluable status rather than an empty result set, so that
    "no data" can be distinguished from "source down".
    
- **export_holidays_ics** — Export a canton's holidays for a year as an iCalendar (.ics) document.

    <use_case>Produce a ready-to-import .ics calendar of a canton's holidays for a year, filtered
    by public/school and Schulart.</use_case>

    Returns a ready-to-save `text/calendar` document with one all-day event per
    holiday. `include` selects `all` (default), `public` or `school`; combine
    with `school_type` (`VS`/`MS`/`BS`/`EO`) to narrow school holidays.
    
- **is_holiday_today** — Is today a school or public holiday in the given canton?

    <use_case>One-call convenience for the everyday 'are we off today?' question in a given
    canton.</use_case>

    Convenience wrapper over `check_date` for the everyday question
    "are we off today?".
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "swiss-holidays-mcp": {
    "command": "uvx",
    "args": ["swiss-holidays-mcp"]
  }
}
```

## Documentation

## What swiss-holidays-mcp MCP server does

The swiss-holidays-mcp MCP server exposes Swiss holiday information for AI assistants and other MCP clients. Its coverage spans all 26 cantons, including canton codes and official languages, school-type groups, school holidays, public holidays, and local holidays for municipalities or districts.

School-holiday results can preserve distinctions by *Schulart*, such as compulsory schools or other school groups represented by the upstream data. This matters when two records share dates but apply to different school types. Public-holiday data includes canton-specific holidays rather than only a federal baseline. Local results can identify holidays that apply to a municipality or district instead of an entire canton.

## How it works

The swiss-holidays-mcp MCP server retrieves holiday data from the OpenHolidays API and uses Nager.Date for long weekends and required bridge days. Responses are returned as structured data with provenance indicating whether the result came from a live API response, cache, or degraded mode.

The server keeps an in-memory cache with a 12-hour time-to-live. Failed upstream requests use exponential backoff at 2, 4, and 8 seconds, while each API call has a 20-second timeout. Health probes use an 8-second timeout. A source-status tool reports reachability and latency for both upstream services.

All tools are read-only and idempotent. Inputs are schema-validated, including known canton codes, ISO-formatted dates, bounded years, and allowed language or school-type values. The server also provides a resource URI in the form `holidays://{canton}/{year}` containing a Markdown summary of public and school holidays.

## Setup and configuration

No API key or other authentication credential is required because both upstream data sources are publicly accessible. The project targets Python 3.10 or newer. It can run over stdio for local MCP hosts such as Claude Desktop, or through Streamable HTTP/SSE when deployed for cloud access.

Use of the upstream data remains subject to the OpenHolidays and Nager.Date terms. Applications using OpenHolidays data must provide attribution under CC BY 4.0; Nager.Date data is released under MIT.

## Tools and capabilities

The swiss-holidays-mcp MCP server includes these read-only tools:

- `list_cantons` returns the 26 cantons, ISO codes, and official languages.
- `list_school_types` shows school-type groups available for each canton.
- `get_school_holidays` retrieves school holidays for a canton and date range.
- `get_public_holidays` retrieves a canton’s public holidays for a year.
- `get_local_holidays` finds municipality- or district-level public holidays.
- `check_date` tests whether a date is a school or public holiday.
- `compare_school_holidays` produces pairwise overlap results across cantons.
- `find_common_free_window` finds periods when all selected cantons are on holiday.
- `next_school_holidays` returns upcoming school-holiday periods.
- `get_long_weekends` calculates long weekends and bridge days.
- `export_holidays_ics` generates a canton’s yearly holidays as an iCalendar document.
- `is_holiday_today` checks the current day for a canton.
- `source_status` reports upstream reachability and latency.

## Limitations and notes

The service depends on external public APIs, so availability and returned data can vary. When an upstream request fails, the server returns a degraded response with an explanatory note rather than silently returning an empty list. The 12-hour cache may mean that recently changed source data is not reflected immediately.

The project is a private, independent implementation and does not represent an official position of a Swiss authority. Holiday applicability can differ by canton, district, municipality, and school type, so consumers should use the relevant scope and school-type fields when planning. No tool writes to external systems or modifies source data.

_Full upstream README: https://allmcps.com/mcp/swiss-holidays-mcp/readme_

