Skip to content
jsem-nerad edited this page Nov 23, 2026 · 8 revisions

strava-cz-python

A Python client for Strava.cz, the ordering system used by Czech school canteens. It talks directly to the web app's internal JSON API — no browser, no HTML scraping. It is a library, a command (strava-cz) and an MCP server for AI agents (strava-cz mcp).

pip install strava-cz                  # the library and the command
pip install "strava-cz[cli]"           # ...plus secure password storage for the command
pip install "strava-cz[cli,mcp]"       # ...plus the MCP server
strava-cz profile add skola --username your.username --canteen 3753
strava-cz menu --week
strava-cz order 2026-09-21:O1
strava-cz --profile skola mcp --read-only    # an MCP server for an AI agent
from strava_cz import StravaCZ

with StravaCZ("your.username", "YourPassword123", "3753") as strava:
    strava.menu.fetch()
    strava.menu.print()
    strava.menu.order_meals(5, 9)

Documentation

Getting started

Core concepts

Using it

  • Command Line — the strava-cz command, its filters, JSON output and exit codes
  • MCP Server — strava-cz mcp: the same, for an AI agent
  • Ordering Meals — ordering, cancelling, and reading the result
  • Error Handling — the exception hierarchy and how to recover

Development

What it does

  • Login and logout, with session handling
  • Fetching and filtering the menu by meal type, date and orderability
  • Ordering and cancelling meals as one transaction, with the result verified
  • Telling you why a meal cannot be ordered — deadline passed, no school, and so on
  • Marking the days the canteen does not order for you, which are still orderable by hand
  • Account balance tracking
  • A strava-cz command with readable output for people and JSON for scripts
  • A strava-cz mcp server, so an AI agent can read the menu and order, or only read
  • Profiles, so credentials are typed once and the password lives in the OS keyring — or encrypted in the profile file, on a server that has no keyring
  • Full type annotations, shipped with py.typed

Links

Licence

GPL-3.0-or-later

Responsible use

Please do not use this library for anything shady. Use it in good faith.

AI usage

Parts of this documentation were written with the help of an LLM, and reviewed before publishing.

Clone this wiki locally