truitestay
README.md
# truitestay
Planning a stay in the Belgian Ardennes usually means clicking through a resort website date by date. truitestay puts the published availability of the La Truite resort behind five small tools instead: the tool list is answered from your own machine using captured definitions, and each call travels upstream to the resort's hosted MCP service, with the service's answer handed back exactly as it arrived.
All five captured tools are exposed. Check which accommodations are free for a period, with price, deposit and a direct booking URL; pull one accommodation type's full description, features, photo URLs and from-price; see whether the weekend restaurant is open on a given date and how many tables are free; check the Camp & Dinner pitches, where a camper spot comes with the obligatory weekend dinner; and build a direct link into the resort's own booking engine. The booking-link tool creates nothing and reserves nothing: it only assembles a link, optionally prefilled with dates, accommodation type and party size, and the guest follows it and completes the booking on the resort's own site. It takes no personal details.
The upstream descriptions are in Dutch, as captured, and the availability tools accept a `lang` argument (`nl`, `en`, `fr`, `de`) that selects the language of the text fields in the results.
## The tools
- **`getAvailability`** — Which accommodations (excluding Camp & Dinner) are free between `aankomst` (arrival) and `vertrek` (departure), with price, deposit and a direct `booking_url` per available type. Unavailable types come back with a reason code and a suggestion code. Optional: `personen` (party size, 1–6, default 2) and `lang`.
- **`getAccommodationDetails`** — The full description, features, photo URLs and from-price of one accommodation type, addressed by its `slug` (for example `lodge`, `cabane`, `chalet`, `droomsuite`, `wellness`, `vallei`). Optional: `lang`.
- **`getRestaurantAvailability`** — Whether the weekend restaurant (Friday/Saturday/Sunday) is open on `datum`, and how many tables are still free.
- **`getCamperAvailability`** — Camp & Dinner availability between `aankomst` and `vertrek`: free pitches, price, which evenings carry the obligatory dinner and which days include breakfast. Optional: `lang`.
- **`buildBookingLink`** — A direct link to the booking engine on the resort's own site for a `flow` (`verblijf` for a stay, `restaurant`, or `camper`). Prefill is optional and limited to dates, accommodation type and party size; the guest completes the booking themselves. No booking is created by this tool.
Dates are `YYYY-MM-DD` strings throughout.
## Install and run
As an MCP server via npm:
```bash
npx -y @reneturcios/truitestay mcp
```
MCP client configuration:
```json
{
"mcpServers": {
"truitestay": {
"command": "npx",
"args": ["-y", "@reneturcios/truitestay", "mcp"]
}
}
}
```
As a container:
```bash
docker run -i ghcr.io/cloudcorprecords/truitestay
docker run --rm ghcr.io/cloudcorprecords/truitestay getRestaurantAvailability '{"datum":"2026-11-07"}'
```
## CLI
A single binary covers both the command line and the MCP server. Every tool is a subcommand whose one argument is a JSON string of that tool's inputs:
```bash
truitestay getAvailability '{"aankomst":"2026-11-06","vertrek":"2026-11-08","personen":2}'
truitestay getAccommodationDetails '{"slug":"lodge"}'
truitestay getRestaurantAvailability '{"datum":"2026-11-07"}'
truitestay getCamperAvailability '{"aankomst":"2026-11-06","vertrek":"2026-11-08"}'
truitestay buildBookingLink '{"flow":"verblijf","type_slug":"lodge","aankomst":"2026-11-06","vertrek":"2026-11-08"}'
truitestay --version
```
Exit codes: `0` for a successful forwarded call, `1` when the result that comes back is an error, and `2` for usage mistakes like an unknown subcommand or a JSON argument that does not parse.
## Configuration
- `LATRUITE_MCP_URL` — Replaces the upstream endpoint. Defaults to the pinned hosted endpoint, `https://www.la-truite.com/mcp/`. (This override variable is a reconstruction introduced by this rebuild.)
The La Truite registry record lists no headers for its remote, so truitestay never attaches an authentication header — every call goes upstream keyless.
When the upstream cannot answer — it returns a JSON-RPC error, answers with a non-2xx status, sends a body that cannot be read, or the request itself fails — the caller receives an error result whose text begins with `truitestay error:`.
## How forwarding works
The first call of a process opens a session against the upstream: an `initialize` request (protocol version `2025-03-26`), a `notifications/initialized` notification, and then the `tools/call`. If the service issues an `Mcp-Session-Id` header during initialize, truitestay repeats it on subsequent requests and keeps reusing that one session until the process ends. Replies are understood in both plain JSON and server-sent-events framing. Successful results are passed through untouched, `isError` flag and any extra fields included.
## Development
```bash
npm install
npm run build # tsc -> dist/ (dist/cli.js is the bin)
npm test # tsx --test test/*.test.ts — stubbed upstream, no network
npm run dev # run the CLI from source
```
The suite compares the served tool list against the captured surface tool for tool, walks the session handshake and its reuse, proves no `Authorization` header is sent under any environment, and confirms that arguments travel upstream unchanged and results return unchanged.
## License
MIT — see `LICENSE`. Copyright (c) 2026 Rene Turcios.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues