hut-reservation-mcp
Provides reverse geocoding via a Nominatim-compatible service to refresh canton and country area data for hut searches.
Click on "Install 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., "@hut-reservation-mcpsearch for huts near Zermatt within 5 km"
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.
hut-reservation MCP
Local-first Model Context Protocol (MCP) server for searching SAC huts, checking availability, and preparing booking or cancellation handoffs on hut-reservation.org.
The server is designed for agent use over stdio. It keeps high-risk upstream writes conservative by default: booking and cancellation confirmation tools prepare browser handoffs unless experimental writes are explicitly enabled.
Capabilities
Search huts by country, canton cache, text, and distance around coordinates.
Refresh the hut catalog from
hutsListplushutInfo.Refresh canton and country area data through an explicitly configured Nominatim-compatible reverse geocoder.
Search exact-period availability using
YYYY-MM-DDat the MCP boundary and the upstream SwissDD.MM.YYYYformat internally.Report catalog, area-cache, geocoder, and draft-cache readiness through
auth_status.Create safe booking and cancellation drafts.
List reservations through the authenticated
myReservationsendpoint.
Related MCP server: Flight + Stay Search MCP
Safety model
Headless booking and confirmed-reservation cancellation are intentionally conservative. The public SPA exposes preBook, submit, myReservations, reservationSummary, delete/{id}, and partial-cancellation-fee endpoints, but the complete booking form payload is not documented.
By default, confirmation tools return a browser handoff URL instead of performing writes. Experimental writes require both:
HUT_RESERVATION_EXPERIMENTAL_WRITES=trueA caller-supplied raw payload
Treat session cookies, XSRF tokens, passwords, and raw booking payloads as bearer credentials. Keep them in ignored local files, your MCP client environment configuration, or a secret manager. Do not commit them.
Prerequisites
Node.js and pnpm.
A local checkout of this repository.
Optional: a
hut-reservation.orgaccount or SAC browser session for authenticated reservation tools.Optional: a Nominatim-compatible reverse geocoder for canton and country area-cache refreshes.
Quick start
Install dependencies:
pnpm installRun locally over stdio:
pnpm devMCP clients should spawn the server rather than connect to an already-running shell process:
pnpm --dir /absolute/path/to/hut-reservation-mcp devFor built usage, compile first and spawn the compiled entrypoint:
pnpm build
node /absolute/path/to/hut-reservation-mcp/dist/index.jsMCP client configuration
Most MCP clients accept a JSON configuration shaped like this:
{
"mcpServers": {
"hut-reservation": {
"command": "pnpm",
"args": ["--dir", "/absolute/path/to/hut-reservation-mcp", "dev"],
"env": {
"HUT_RESERVATION_CACHE_DIR": "$HOME/.cache/hut-reservation-mcp"
}
}
}
}Use the built entrypoint after running pnpm build:
{
"mcpServers": {
"hut-reservation": {
"command": "node",
"args": ["/absolute/path/to/hut-reservation-mcp/dist/index.js"]
}
}
}Codex
MCP tools are not imported into an already-running Codex turn by starting the server manually. The native workflow is:
Register the MCP server with
codex mcp add.Start a new Codex session, or reload the client.
Check
/mcpin the Codex TUI and then ask Codex to use the hut-reservation tools.
For local checkout development, register the source-backed command so MCP sessions run the current TypeScript source:
codex mcp add hut-reservation -- pnpm --dir /absolute/path/to/hut-reservation-mcp devFor this checkout:
codex mcp add hut-reservation -- pnpm --dir /Users/domwoe/Dev/projects/hut-reservation-mcp devCodex stores that server in config.toml. After the next session starts, the MCP tools are available natively to the model rather than through shell commands.
For built or packaged usage:
pnpm build
codex mcp add hut-reservation -- node /absolute/path/to/hut-reservation-mcp/dist/index.jsClaude Code
Use the Claude Code CLI to register the source-backed server:
claude mcp add hut-reservation -- pnpm --dir /absolute/path/to/hut-reservation-mcp devFor this checkout:
claude mcp add hut-reservation -- pnpm --dir /Users/domwoe/Dev/projects/hut-reservation-mcp devFor built or packaged usage:
pnpm build
claude mcp add hut-reservation -- node /absolute/path/to/hut-reservation-mcp/dist/index.jsRestart Claude Code after changing MCP configuration so the server is respawned with the updated command and environment.
Claude Desktop
Add the server to your Claude Desktop MCP configuration:
{
"mcpServers": {
"hut-reservation": {
"command": "pnpm",
"args": ["--dir", "/absolute/path/to/hut-reservation-mcp", "dev"],
"env": {
"HUT_RESERVATION_CACHE_DIR": "$HOME/.cache/hut-reservation-mcp"
}
}
}
}For this checkout:
{
"mcpServers": {
"hut-reservation": {
"command": "pnpm",
"args": ["--dir", "/Users/domwoe/Dev/projects/hut-reservation-mcp", "dev"],
"env": {
"HUT_RESERVATION_CACHE_DIR": "$HOME/.cache/hut-reservation-mcp"
}
}
}
}For built or packaged usage:
{
"mcpServers": {
"hut-reservation": {
"command": "node",
"args": ["/absolute/path/to/hut-reservation-mcp/dist/index.js"]
}
}
}Restart Claude Desktop after editing the configuration file.
Configuration
The server loads .env from the current working directory before reading environment variables.
Variable | Required | Description |
| No | Path to a specific |
| No | Set to |
| No | Authentication mode. Use |
| No | Standard |
| No | Standard |
| No | SAC |
| No | SAC |
| No | Combined cookie header, for example |
| No | Cache directory. Defaults to the server's local cache behavior. |
| No | Upstream request timeout in milliseconds. |
| No | Set to |
| No | Base URL for a Nominatim-compatible reverse geocoder. Required before |
| No | Identifying User-Agent for geocoder requests. |
| No | Contact email for geocoder requests, if required by the provider. |
| No | Minimum interval between geocoder requests. |
Standard account login
HUT_RESERVATION_AUTH_MODE=standard
HUT_RESERVATION_USERNAME=person@example.com
HUT_RESERVATION_PASSWORD=...SAC browser-session login
HUT_RESERVATION_AUTH_MODE=sac
HUT_RESERVATION_SESSION_COOKIE=...
HUT_RESERVATION_XSRF_TOKEN=...You can copy these values from DevTools after logging in through SAC:
Application -> Cookies -> https://www.hut-reservation.org -> SESSION and XSRF-TOKEN.
Alternatively, provide both cookies as one header:
HUT_RESERVATION_AUTH_MODE=sac
HUT_RESERVATION_COOKIE_HEADER="SESSION=...; XSRF-TOKEN=..."Cache and timeout
HUT_RESERVATION_CACHE_DIR="$HOME/.cache/hut-reservation-mcp"
HUT_RESERVATION_REQUEST_TIMEOUT_MS=15000Reverse geocoder
NOMINATIM_BASE_URL=https://your-nominatim.example
NOMINATIM_USER_AGENT="hut-reservation-mcp/0.1.0 you@example.com"
NOMINATIM_EMAIL=you@example.com
NOMINATIM_MIN_INTERVAL_MS=1000The server never uses public Nominatim implicitly. Configure a base URL and identifying User-Agent before calling refresh_area_cache. Follow the provider's usage policy, cache responses, and preserve OpenStreetMap attribution.
Tools
All tool-facing dates are YYYY-MM-DD.
Tool | Purpose | Notes |
| Report login, catalog, geocoder, area-cache, and draft-cache readiness. | Use this first when diagnosing setup. |
| Refresh cached hut metadata from upstream hut list and detail endpoints. | Run before searching if the local catalog is empty or stale. |
| Refresh cached canton and country area data through a configured reverse geocoder. | Requires |
| Search cached huts by text, country, canton, or distance around coordinates. | Canton filters depend on a refreshed area cache. |
| Search exact-period availability for matched cached huts. | Checks every matched cached hut by default. |
| Create a safe booking draft. | Does not confirm the booking. |
| Confirm a prepared booking or return a browser handoff URL. | Raw-payload writes require experimental writes. |
| List reservations through the authenticated | Requires authenticated upstream access. |
| Create a safe cancellation draft. | Does not confirm cancellation. |
| Confirm a prepared cancellation or return a browser handoff URL. | Raw-payload writes require experimental writes. |
search_hut_availability checks every matched cached hut by default. Set maxCandidates only when you intentionally want a faster partial search; partial responses include truncated, totalCandidates, checkedCandidates, and a warning.
Suggested workflows
Find huts with availability
Call
auth_status.If the catalog is missing or stale, call
refresh_hut_catalog.If you need canton filters, configure the reverse geocoder and call
refresh_area_cache.Call
search_huts.Call
search_hut_availabilitywith ISO dates.
Prepare a booking
Search huts and availability first.
Call
prepare_booking.Review the draft details.
Call
confirm_booking.Complete the browser handoff unless experimental writes are intentionally enabled.
Prepare a cancellation
Authenticate with standard credentials or SAC session cookies.
Call
list_bookings.Call
prepare_cancellation.Review the draft details.
Call
confirm_cancellation.Complete the browser handoff unless experimental writes are intentionally enabled.
Troubleshooting
auth_statusreports no catalog: runrefresh_hut_catalog.Canton filters return nothing: configure a Nominatim-compatible geocoder and run
refresh_area_cache.Availability searches are slow: add narrower search filters first, or set
maxCandidateswhen a partial search is acceptable.Authenticated tools fail: verify
HUT_RESERVATION_AUTH_MODEand credential variables, then restart the MCP client so it respawns the server with the new environment.Codex does not see the tools: restart the Codex session or reload the client after
codex mcp add, then check/mcp.Confirmation returns a browser URL: this is expected unless
HUT_RESERVATION_EXPERIMENTAL_WRITES=trueand a raw payload are supplied.
Verification
pnpm typecheck
pnpm test
pnpm run smoke:mcp:source
pnpm build
pnpm run smoke:mcp:distOptional read-only live smoke test:
HUT_RESERVATION_LIVE_SMOKE=true pnpm smoke:readMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/domwoe/hut-reservation-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server