lankatour
README.md
# lankatour
Plan the Sri Lanka leg of a trip from published listings, without handing anyone's details to a booking flow. lankatour is a small forwarding client for the hosted Lakpura MCP service: the tool list is answered from your own machine using captured definitions, and each call travels upstream, with the service's answer handed back exactly as it arrived.
Five of the service's six captured tools are exposed. Search accommodation by name or city, search tours and experiences by keyword with an optional length filter, search physical products and rentals by keyword with an optional price ceiling, open one service's full published detail including its bookable options and prices, and price a private transfer between two named places for a given party size. One captured tool is deliberately left out. `start_booking` creates a booking and originates a secure Stripe checkout URL, carrying the lead traveller's first name, surname and email; this rebuild creates no bookings, starts no checkouts and carries no traveller's personal details upstream. `quote_transfer` stays because it only computes a price from place names and party size — nothing is booked or committed by asking.
## The tools
- **`search_stays`** — Search accommodation (hotels, villas, lodges) by a `query` naming a place or property, such as "Galle", "Cinnamon" or "Ella tree house". Each match comes back with its public page URL, city, country and star rating, and an optional `limit` caps how many results return. Follow a match's slug into `get_service` for room details and price.
- **`search_products`** — Search the physical goods Lakpura sells and ships worldwide (handicrafts, wooden masks, tea, spices, homeware, gifts) and its rentals in Sri Lanka (baby travel cots, wheelchairs, scooters, motorbikes, bicycles, tuk tuks), by a required `query`; short nouns work best for rentals. An optional `max_price_usd` ceiling, plus paging, shape the results, each carrying a reference, title, USD price and public product page URL.
- **`search_tours`** — Search tours, day-trips and experiences by an optional keyword `query`; omit it to browse top-rated entries. The optional `kind` filter is `"multi_day"`, `"single_day"` or `"all"`, and paging is available. Each match carries a slug, title, rating and public page URL.
- **`get_service`** — The full published detail for one tour or experience addressed by its `slug`, the last path segment of its `/products/{slug}` page: title, description, and bookable options each with a price and an option identifier.
- **`quote_transfer`** — Price a private transfer (car or van with driver) between a `from` and a `to` place in Sri Lanka, named exactly as the traveller named them: a town, an airport or a station (for a hotel, pass its town). Optional `passengers` and `bags` size the party. An ambiguous or unknown place comes back as an unresolved status with candidates instead of a guessed route.
## Install and run
As an MCP server via npm:
```bash
npx -y @reneturcios/lankatour mcp
```
MCP client configuration:
```json
{
"mcpServers": {
"lankatour": {
"command": "npx",
"args": ["-y", "@reneturcios/lankatour", "mcp"]
}
}
}
```
As a container:
```bash
docker run -i ghcr.io/cloudcorprecords/lankatour
docker run --rm ghcr.io/cloudcorprecords/lankatour search_stays '{"query":"Galle"}'
```
## 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
lankatour search_stays '{"query":"Galle"}'
lankatour search_tours '{"query":"safari","kind":"single_day"}'
lankatour search_products '{"query":"ceylon tea"}'
lankatour get_service '{"slug":"some-tour-slug"}'
lankatour quote_transfer '{"from":"Colombo airport","to":"Kandy","passengers":2}'
lankatour --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. `start_booking` is not a subcommand and exits `2` like any other unknown name.
## Configuration
- `LAKPURA_MCP_URL` — Replaces the upstream endpoint. Defaults to the pinned hosted endpoint, `https://mcp.lakpura.com`. (This override variable is a reconstruction introduced by this rebuild.)
The Lakpura registry record lists no headers for its remote, so lankatour 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 `lankatour 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, lankatour 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, asserts the omitted `start_booking` tool is absent at the registry, MCP and CLI levels, 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