# Paņem brīvdienu

> Latvian public holidays, days off and annual leave for 2026 and 2027, computed from Latvian law. An MCP server and a JSON API over the same code. Read-only; nothing is stored.

The calendar assumes a Monday-to-Friday workweek. Leave planning counts **working days**; the annual leave estimate is in **calendar days excluding statutory holidays**, a different unit. The [2026 workday transfers](https://likumi.lv/ta/id/361161-par-darba-dienu-parcelsanu-2026-gada) bind only specified state-funded institutions, so they are opt-in: `apply_transfers=true`.

## MCP

Remote streamable-HTTP endpoint: `https://panembrivdienu.lv/mcp` (stateless, no account needed).

- Claude Code: `claude mcp add --transport http panembrivdienu https://panembrivdienu.lv/mcp`
- Cursor / Cline: `{"mcpServers": {"panembrivdienu": {"url": "https://panembrivdienu.lv/mcp"}}}`
- VS Code (`.vscode/mcp.json`): `{"servers": {"panembrivdienu": {"type": "http", "url": "https://panembrivdienu.lv/mcp"}}}`
- stdio-only clients: `{"mcpServers": {"panembrivdienu": {"command": "npx", "args": ["-y", "mcp-remote", "https://panembrivdienu.lv/mcp"]}}}`

Tools:

- `latvia_holidays(year, apply_transfers?)`: holiday dates with Latvian and English names.
- `latvia_calendar_statistics(year, apply_transfers?)`: working days, weekend days, holidays and days off.
- `latvia_plan_time_off(year, pto_days, apply_transfers?, employment_start_date?, extra_days_off?)`: up to ten breaks, best first, where leave days bridge weekends and holidays. Each uses at most `pto_days` leave days on its own. Leave is never before today in Latvia or before `employment_start_date`.
- `latvia_leave_entitlement(employment_start_date, year, fte_percentage, annual_base, birth_date?)`: annual leave estimate. The legal minimum `annual_base` is 28; `fte_percentage` is 1 for full time. For a first-year employee the result is an accrual estimate.

Results come back as JSON (also as `structuredContent`). An invalid argument returns a tool error that says what to fix.

## JSON API

- `GET https://panembrivdienu.lv/api/v1/calendar/{year}/holidays`
- `GET https://panembrivdienu.lv/api/v1/calendar/{year}/statistics`
- `POST https://panembrivdienu.lv/api/v1/optimize` with `{"year":2027,"pto_days":10}`
- `POST https://panembrivdienu.lv/api/v1/entitlement` with `{"employment_start_date":"2026-01-01","year":2027,"fte_percentage":1,"annual_base":28}`
- [OpenAPI description](https://panembrivdienu.lv/api/v1/openapi.json) · [API documentation](https://panembrivdienu.lv/api-docs)

## Limits and access

Anonymous clients get 10 requests per second with a burst of 20, per IP address. An API key raises that to 100 per second; send it as `Authorization: Bearer pbd_...` to `/api/v1/` or `/mcp`. See [auth.md](https://panembrivdienu.lv/auth.md).

## Sources

- [Law on Holidays, Commemorative Days and Celebrations](https://likumi.lv/ta/id/72608-par-svetku-atceres-un-atzimejamam-dienam)
- [Labour Law](https://likumi.lv/ta/id/26019-darba-likums)
- [Privacy policy](https://panembrivdienu.lv/privacy-policy)
