phuketguide
README.md
# phuketguide
Phuket, answered from one published source instead of a dozen open tabs. phuketguide is a small forwarding client for the hosted Kvartiry-Phuket MCP service, which publishes the site's Phuket data for read-only querying: the tool list is answered on your own machine from captured definitions, and each call travels upstream, with the service's answer handed back exactly as it arrived.
All fourteen of the service's captured tools are exposed. Search the Russian-language guides on buying, renting, taxes, visas and life on the island, then open a guide in full or read a single section. Compare districts before choosing where to stay, check the dated asking-price aggregates (listing prices, not transaction prices, published CC BY 4.0) and the official Thai Treasury statutory condo assessment rates (assessment values, not market prices). Look at the weather right now, the 2015–2025 climate normals by month, and what the airport station actually recorded last time a given month came round. Search the site's aggregated FAQ, compare beaches by name, see which webcams are honestly live, find today's sea state across 25 beaches from NOAA wave models, and rank beaches by how calm they tend to be in a chosen month.
## The tools
- **`search_guides`** — Published guides matching a `query` in Russian or English, up to 10 results with title, URL, description and update date. An optional `limit` (1–10, default 5) narrows the result.
- **`get_guide`** — One guide by `slug`: its outline of H2 sections, or the Markdown of one section when `section` (1–60) is given.
- **`list_districts`** — Every Phuket district the site has an overview page for, with name, URL and whether it appears in the dated price slice. No arguments.
- **`get_district`** — One district overview by `slug`: location, infrastructure, pros and cons, who it suits, related guides and its asking-price row when published.
- **`get_asking_prices`** — The dated asking-price aggregates: medians, ranges and sample sizes by bedrooms, budgets and districts. An optional `district` filter accepts a slug or a name.
- **`get_condo_assessment`** — Official statutory assessment rates in THB per square metre by condominium, with minimum, median and maximum per residential category. Optional `query` (Thai name or condominium id) and `district` (amphoe) filters.
- **`get_weather_now`** — Current conditions from the MET Norway model: temperature, feels-like, wind, humidity, cloud cover, next-hour precipitation, sunrise and sunset, plus hourly 24-hour and daily 10-day outlooks. Optional `lat` / `lon` pick the point on the island.
- **`get_climate`** — Monthly normals for 2015–2025: rainfall, rain days, air and sea temperature, waves and cloud cover. Without `month` it returns all twelve months; with `month` (1–12) it details one.
- **`search_faq`** — The site's aggregated questions and answers, each with its source page URL and update date. An optional `limit` (1–10, default 5) narrows the result.
- **`search_beaches`** — Beach comparison by `query` name in Russian or English: island side, shore length, airport drive, walkable infrastructure and nearby live cameras. An optional `limit` (1–10, default 5) narrows the result.
- **`list_webcams`** — The Phuket webcams with their honest live or offline status, when each was last checked, coordinates and camera pages. No arguments.
- **`get_sea_today`** — Today's shore wave class and height estimate for 25 beaches from NOAA WAVEWATCH III, the server's verdict on where it is calmest, water temperature and data time. An optional `beach` narrows it to one beach. Data older than 12 hours is not served.
- **`get_calm_beaches`** — The 25 beaches ranked by share of calm days in a given `month` (1–12) over 2017–2026. An optional `limit` (1–25, default 10) sets how many ranks come back. Long-run statistics, not a forecast.
- **`get_observed_weather`** — What the airport METAR station actually recorded in the last complete occurrence of a given `month` (1–12): rain days, storms and long daytime rain, compared with the multi-year average. Past fact, not a forecast.
Guide and FAQ text is largely Russian with English summaries, served verbatim and never translated or rewritten by this client.
## Install and run
As an MCP server via npm:
```bash
npx -y @reneturcios/phuketguide mcp
```
MCP client configuration:
```json
{
"mcpServers": {
"phuketguide": {
"command": "npx",
"args": ["-y", "@reneturcios/phuketguide", "mcp"]
}
}
}
```
As a container:
```bash
docker run -i ghcr.io/cloudcorprecords/phuketguide
docker run --rm ghcr.io/cloudcorprecords/phuketguide search_guides '{"query":"freehold"}'
```
## 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
phuketguide search_guides '{"query":"freehold","limit":5}'
phuketguide get_guide '{"slug":"freehold-vs-leasehold-thailand"}'
phuketguide list_districts '{}'
phuketguide get_district '{"slug":"rawai"}'
phuketguide get_asking_prices '{"district":"Rawai"}'
phuketguide get_condo_assessment '{"district":"kathu"}'
phuketguide get_weather_now '{}'
phuketguide get_climate '{"month":10}'
phuketguide search_faq '{"query":"visa"}'
phuketguide search_beaches '{"query":"Nai Harn"}'
phuketguide list_webcams '{}'
phuketguide get_sea_today '{}'
phuketguide get_calm_beaches '{"month":8}'
phuketguide get_observed_weather '{"month":9}'
phuketguide --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
- `KVARTIRY_PHUKET_MCP_URL` — Replaces the upstream endpoint. Defaults to the pinned hosted endpoint, `https://kvartiry-phuket.com/mcp`. (This override variable is a reconstruction introduced by this rebuild.)
The Kvartiry-Phuket registry record lists no headers for its remote, so phuketguide 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 `phuketguide 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, phuketguide 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 for every one of the fourteen tools.
## License
MIT — see `LICENSE`. Copyright (c) 2026 Rene Turcios.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues