TUL Menza MCP
TUL Menza MCP lets you read canteen data and manage meal orders/watches for menza.tul.cz under confirmation and hard limits.
List menus and published minutky by canteen/day, including sold-out dishes, soup variants, prices and burza deadlines.
View current meal orders and own burza offers, account credit/subsidy vouchers and purchase-limit usage.
Read consumed-meal history and statistics such as spending, favourites, canteens and weekdays.
Get read-only lunch/dinner suggestions for up to 14 days, ranked from past orders and dish-name overlap.
Buy exactly one selected meal within an explicit max_price after confirmation.
Cancel an order only within the full-refund window.
Offer an owned meal on burza after the refund cutoff, or withdraw an unsold offer.
Create, list and cancel durable burza watches for an exact dish/section/canteen/date/price with expiry; a worker polls about every 20 seconds.
Mutation tools require confirmed=true and the server enforces per-meal, per-slot, rolling-budget and watch-count limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TUL Menza MCP what's for lunch at Harcov today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TUL Menza MCP
Unofficial MCP server for https://menza.tul.cz/. Built for Hermes Agent, usable with other stdio MCP hosts. Python 3.10+; Linux is required for the process lock and isolated deployment.
Features
Menu, published minutky, current orders, account credit and consumed-meal history. The order list includes today's
dnessection and dated future sections;dnesuses the request date in Europe/Prague.Buy one selected meal within an explicit price cap; cancel within the refund window.
Offer your own meal on burza after the refund cutoff, or withdraw an unsold offer.
Historical spending and favourite dishes.
Suggestions for lunch and dinner for up to 14 days: dinner at one fixed canteen, lunch canteen inferred from weekday history among the allowed lunch canteens, dishes ranked by exact past orders then overlapping dish-name words. The canteens default to the author's habits (dinner Harcov, lunch Harcov/Husova); to change them, add
MENZA_DINNER_CANTEENandMENZA_LUNCH_CANTEENS(comma-separatedharcov,husova,voronezska,komenskeho) to theenv -iline of the root-owned launcherdeploy/menza-mcp. Counts and reasons are returned, not claims about dietary preferences. Suggestions never buy anything. Lunch includes soup by default; selectlunch_no_soupexplicitly for the other variant. Missing menus remain unavailable.Persistent burza watches with exact dish/section/canteen/date matching, a maximum price and expiry. A separate worker polls about every 20 seconds. Network delays and competing buyers mean neither instant purchase nor success is guaranteed. Inspect
list_watchesfor outcomes.
This uses the same website as a person, not an official API. University/site changes can break it. Minutky are direct-sale only: listing the published menu does not guarantee stock or reserve them.
Related MCP server: Yandex Eats MCP
Development
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
cp .env.example .env
chmod 600 .env
.venv/bin/pytest
.venv/bin/menza-hermes serveFill in MENZA_USERNAME and MENZA_PASSWORD locally; never commit .env. For compatibility with the initial local setup, username_email and password are accepted in the operator file. MENZA_ENV_FILE chooses that file; MENZA_STATE_DIR chooses a private state directory. Neither is an MCP tool argument.
The Microsoft/Shibboleth flow only supports password sign-in. MFA, captcha, consent or unexpected authentication pages require human action; the worker stops rather than repeatedly submitting credentials. It does not bypass those checks. TLS stays verified. Passwords go only to the approved Microsoft HTTPS host; SAML responses go only to the expected university service endpoints.
Tools
Tool | Purpose |
| Read a canteen/day menu |
| Current own orders/burza offers and credit |
| Consumed meals and account transactions |
| Read-only lunch/dinner plan with evidence |
| Confirmed single meal purchase with |
| Refund-window cancellation only |
| Offer an owned order; refund is not guaranteed |
| Restore your unsold offer |
| Authorize, inspect or stop a bounded watch |
Mutation tools require confirmed=true after the host obtains the user's approval. This is an intent safeguard, not authentication: a compromised or prompt-injected host can pass it itself. To bound the damage, the server enforces hard limits in its own state directory, covering both buy_meal and watcher purchases: at most one lunch and one dinner per served date (active orders made on the web, in the app or by an older server count too), at most 150 Kč per meal, at most 3000 Kč in any rolling 14 days (only purchases made through this server), plus at most 10 active watches. This still allows a confirmed 14-day plan. A purchase is counted before it is sent, so an uncertain outcome keeps using budget; it is released only when the site refuses the order outright or when cancel_meal confirms the refund in the balance. Change the limits only through the operator environment (MENZA_MAX_PER_SLOT, MENZA_MAX_MEAL_CZK, MENZA_MAX_CZK_14D in the root-owned launcher/service), never via tool arguments. balance reports current usage. The separate account protects the university password; these limits protect your credit.
Normal cancellation and burza sale use the same site endpoint. The tool checks the current deadline and refuses to silently turn a requested refund into a burza offer. A sale before the burza window is refused rather than cancelling the meal. A purchase POST is never blindly retried after a timeout. Watch state is committed before purchasing; if the worker crashes or cannot confirm the result, the watch becomes needs_review and does not purchase again automatically.
Isolated deployment (recommended)
A university password also grants access outside the canteen. Do not put it in Hermes's .env when Hermes can execute shell commands.
Use three accounts:
menza: locked system account, owns credentials and runtime state.Hermes's existing account: can invoke only the fixed MCP launcher as
menza; cannot read credentials or modify the installed Python/code.A separate administrator: credentials/private SSH key unavailable to Hermes.
Remove blanket sudo/root-equivalent access from Hermes first, but only after independently verifying the administrator login. Merely adding a second user while retaining Hermes's unrestricted sudo provides no isolation. Check privileged groups, polkit permissions and existing elevated processes too. Do not forward your SSH agent to the agent host.
Suggested layout:
/opt/menza-hermes/ root-owned code + non-editable venv
/etc/menza-hermes/credentials.env menza-owned, 0600; parent directory 0700
/var/lib/menza-hermes/state/ menza-owned, 0700; cookies/watch DB 0600
/usr/local/libexec/menza-mcp root-owned, 0755 (deploy/menza-mcp)Install the package with /opt/menza-hermes/.venv/bin/pip install /opt/menza-hermes (not editable). Install deploy/menza-watcher.service as a system service and enable it. It survives gateway restarts; authentication failures stop it for operator intervention. After upgrading, restart the watcher and the MCP host (e.g. the Hermes gateway): a stdio MCP server keeps running the code it started with until its host respawns it.
The sudoers entry must permit no arguments (the final "" matters):
tomja ALL=(menza) NOPASSWD: /usr/local/libexec/menza-mcp ""The launcher resets the environment, fixes its working directory and uses Python isolated mode. Do not allow arbitrary Python, shell, environment variables, extra arguments, writable code paths or command interpolation through sudo.
Hermes config (no password passed to Hermes):
mcp_servers:
menza:
command: /usr/bin/sudo
args: ["-n", "-u", "menza", "/usr/local/libexec/menza-mcp"]
connect_timeout: 60Verify from Hermes's account: credential and cookie reads fail; arbitrary sudo/root commands fail; extra launcher arguments fail; the MCP handshake and read tools still work. Verify systemctl is-active menza-watcher from the separate administrator.
Credentials and cookies are stored in plaintext protected by Unix permissions; root/physical access can read them. They are not encrypted at rest by this project. Never put tokens, session snapshots, real menus tied to user activity, or personal history into public fixtures. Tests use synthetic data and make no live purchases.
References
UtrataMenza and JagerMenzer provided background on the site. This implementation uses its own parsers, authenticated transaction verification and bounded watcher.
MIT license.
Available Tools
14 toolsbalanceC
Account credit in CZK, subsidy vouchers, and the server-enforced 24h purchase limit usage.
Inputs: no named parameters.
buy_mealB
Spend credit to buy exactly one menu item. User must confirm; fresh price cannot exceed max_price.
Inputs: day (required), canteen (required), menu_id (required), max_price (required), +1 more.
cancel_mealB
Cancel only within the full-refund window; refuses to silently sell on burza.
Inputs: order_id (required), confirmed.
cancel_watchB
Stop waiting for a meal; does not cancel an order already bought by the watcher.
Inputs: watch_id (required).
list_watchesB
Durable watch status/outcomes; needs_review never retries automatically after uncertain purchases.
Inputs: no named parameters. Returns: result
meal_historyB
Consumed meals/transactions from account history (default last year); pending orders are separate.
Inputs: since, until. Returns: result
meal_statisticsC
Spending, favourites, canteens and weekdays from actual historical transactions.
Inputs: since, until.
minutkasC
Published minutky menu. These are direct-sale only, not guaranteed stock or online reservations.
Inputs: day, canteen. Returns: result
ordersA
List current meal orders and own burza offers, with cancellation effects/deadlines.
Inputs: no named parameters. Returns: result
sell_on_burzaB
Offer your own meal on burza AFTER refund cutoff. Credit returns only if someone buys it.
Inputs: order_id (required), confirmed.
suggest_mealsA
Suggest lunch + dinner for each day, never buy. Dinner Harcov; lunch Harcov/Husova inferred from history. Rank dishes by previous orders. No timeslots. lunch includes soup by default; choose lunch_no_soup explicitly. Missing/closed menus remain unavailable, not invented.
Inputs: days, start, lunch_section.
watch_mealA
Explicitly authorize ONE future automatic burza purchase of this exact sold-out dish. Copy section/number/name from menu. Expiry must contain timezone and be within 14 days. Polls about every 20 seconds, not instant; never substitutes another dish or exceeds max_price.
Inputs: day (required), name (required), number (required), canteen (required), +4 more.
withdraw_from_burzaC
Withdraw your still-unsold offer from burza and restore it as your meal order.
Inputs: exchange_id (required), confirmed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools map cleanly to a distinct resource+action: menu vs. minutkas, buy_meal vs. watch_meal, cancel_meal vs. cancel_watch, sell_on_burza vs. withdraw_from_burza are all explicitly contrasted in the descriptions. The closest pairs are menu/minutkas and orders/meal_history/meal_statistics, which require reading descriptions carefully but are still distinguishable.
The majority follow a snake_case verb_noun or verb_target pattern (watch_meal, list_watches, cancel_watch, buy_meal, cancel_meal, suggest_meals, sell_on_burza). However several are bare nouns (menu, minutkas, orders, balance) with no list_/get_ prefix, and domain jargon (burza, minutkas) breaks the pattern further. Still readable, but the convention is mixed.
14 tools for a canteen system with menus, ordering, burza resale, and automated watches is well-scoped and each tool covers a distinct operation. Nothing feels padded or missing at the count level.
The lifecycle is well covered: browse menus, buy, cancel, sell/withdraw on burza, watch sold-out dishes, list/cancel watches, check orders, balance, history, and statistics. The main gap is that burza can only be bought from automatically via watch_meal — there is no tool to browse or manually purchase another user's burza offer.
Maintenance
Related MCP Connectors
Recipes, meal plan, shopping list and pantry from the Stemma iOS app, with per-area OAuth scopes.
Restaurant management API for meni.ge owners: manage menus, locations, orders, and settings.
Plan weekly meals from your pantry, search allergy-safe recipes, and build grocery lists. Reads and updates your Cooking with Robots pantry, generates a 7-day plan that respects your allergies and preferences, and returns recipes with macros and a grocery gap list. Sign in with OAuth.
The brain for restaurant costs, pricing, and true profit (read/edit menu, recipes, costs).
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides tools to interact with the strava.cz meal ordering system, enabling users to view menus, check and place orders, and manage their canteen account.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables searching restaurants and menu items, viewing availability and full menus, and managing restaurant carts via the private Yandex.Eats web API, secured with single-user OAuth, without exposing sensitive account or location data.-
- FlicenseNot gradedqualityBmaintenanceEnables agents to log and edit meals, query a food journal, and retrieve calorie/macro/quality KPIs with server-side nutritional grading, plus manage staples and targets.1-
- AlicenseNot gradedqualityBmaintenanceEnables authenticated subscribers to inspect weekly menus, recipe ingredients, deliveries, order history, and plan quota, and to preview or replace and save weekly main-meal selections with read-back verification. It also preserves add-ons and surfaces deadlines, permissions, and revision conflicts.MIT