For developers
API and data
Everything here is read-only, free and needs no key. It serves only what is published on this site: each fact with its sources, each record with its page on thecabinclass.com. Please link to that page when you use the data, and give a fare’s date with the fare.
MCP server: POST https://thecabinclass.com/mcp
Model Context Protocol over streamable HTTP. Stateless: each POST carries one JSON-RPC 2.0
message and gets one application/json reply (notifications get 202 with no
body). No sessions, no server-sent events, no auth. Protocol versions: 2025-06-18, 2025-03-26, 2024-11-05.
Rate-limited per IP (429 when exceeded). Setup for assistants: /mcp/.
Methods: initialize, ping, tools/list, tools/call. Tools:
search_cabins: Search the scored cabins on premium trains, river ships and expedition ships. Filters combine. Ship fares are per person per night; rail fares are per person per journey, so the two fare filters never mix. Returns score, fare as quoted with its date, and the cabin's URL.get_cabin: One cabin in full: overall score and the five-part breakdown with notes, the fare as quoted with its date and sources, facts with sources, reader notes, and the link to its page.get_train_or_ship: One train or ship: operator, regions, summary, sourced facts and its scored cabins, with links.list_entries: Every train and ship in the directory, with operator, regions, cabin count, best score and URL.
curl -s https://thecabinclass.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "search_cabins", "arguments": { "mode": "river", "max_fare_per_night": 600, "currency": "USD" } } }'
Errors: malformed JSON is -32700; a message that is not JSON-RPC 2.0, or a batch, is
-32600; an unknown method is -32601; an unknown tool or bad
params is -32602. A tool that cannot answer (an unknown id, a bad filter)
returns a result with isError: true and a plain explanation.
Open data: GET https://thecabinclass.com/directory.json
Every published cabin and its train or ship in one JSON file (version 1), rebuilt
with every publish. Per cabin: score (overall out of 10 and the five-part breakdown with
notes and sources), fare (as quoted: amount, currency, basis, asOf, sources),
lastChecked, facts with sources, and url. Fares are never converted
in the file; fx holds the European Central Bank reference rates we use for approximate
conversions.
Plain text: /llms.txt and /llms-full.txt
/llms.txt maps the site for language models; /llms-full.txt has every published cabin as text, with scores, fares as quoted, dates checked and sources.
Form endpoints
POST /api/subscribe (newsletter) and POST /api/suggest (suggest a train or
ship) back the forms on this site. A suggestion is stored for review and never published as sent;
see the form and Privacy.