Monstarx Thailand MCP
by Thinaakar
README.md
# Monstarx Thailand MCP (Free Sources First)
MCP server for Thailand public data that requires **no account and no API key**. This is a **new** project. It does not modify the Singapore MCP.
The HTTP shell, tool registration pattern, and deploy flow match Singapore. Only adapters and `th_*` tools differ.
## Endpoints
| Environment | MCP URL | Health URL |
|---|---|---|
| Production | `https://th-mcp.monstarxapp.com/mcp` | `https://th-mcp.monstarxapp.com/health` |
| Staging | `https://th-mcp-staging.monstarxapp.com/mcp` | `https://th-mcp-staging.monstarxapp.com/health` |
| Local | `http://localhost:8787/mcp` | `http://localhost:8787/health` |
```json
{
"mcpServers": {
"monstarx-thailand": {
"url": "https://th-mcp.monstarxapp.com/mcp"
}
}
}
```
## Free sources included
| Source | Auth | Tools |
|---|---|---|
| [data.go.th CKAN](https://data.go.th/api/3/action/) | None (optional key unused by default) | Dataset search, metadata, datastore query, disease datasets |
| [Open-Meteo](https://open-meteo.com/) | None | Weather, UV, rainfall, temperature, humidity, air quality, elevation, marine, flood, archive, geocoding |
| [Nominatim](https://nominatim.openstreetmap.org/) | None | Address search, geocode, reverse geocode |
| [Air4Thai PCD](https://air4thai.pcd.go.th/services/getNewAQI_JSON.php) | None | Station PM2.5 / PM10 / AQI |
| [USGS FDSN](https://earthquake.usgs.gov/fdsnws/event/1/) | None | Earthquakes and tsunami-flagged events in the Thailand bounding box |
| [Google Calendar ICS](https://calendar.google.com/calendar/ical/en.th%23holiday%40group.v.calendar.google.com/public/basic.ics) | None | Public holidays, next holidays, long weekends (Nager.Date does not publish TH) |
| [open.er-api.com](https://open.er-api.com/v6/latest/THB) | None | Spot FX involving THB (not BOT) |
| [Zippopotam.us](https://api.zippopotam.us/th/10110) | None | 5-digit postcode lookup |
| [AviationWeather METAR](https://aviationweather.gov/) | None | Airport METAR |
| [Bitkub ticker](https://api.bitkub.com/api/market/ticker) | None | THB crypto spots |
| [OSM Overpass](https://overpass-api.de/) | None | Provinces, airports, tourism, hospitals, fuel, police, schools, pharmacies, fire, ferry, bus, shelters, temples, banks, metro, ATMs, hotels, convenience stores |
| [World Bank](https://api.worldbank.org/v2/) | None | THA indicators (population, GDP, CPI) |
| [Aladhan](https://aladhan.com/prayer-times-api) | None | Prayer times by city |
| [NASA EONET](https://eonet.gsfc.nasa.gov/docs/v3) | None | Natural events in the Thailand box |
| [gold-api.com](https://api.gold-api.com/price/XAU) | None | Spot gold XAU/USD |
| [sunrise-sunset.org](https://sunrise-sunset.org/api) | None | Sunrise / sunset |
| [GBIF](https://api.gbif.org/v1/) | None | Species search and Thailand occurrences |
| [Hipolabs universities](http://universities.hipolabs.com/search?country=Thailand) | None | University search |
See [THAILAND_FREE_APIS.md](./THAILAND_FREE_APIS.md) for accepted vs rejected sources.
## Not included
Do **not** wrap these as MCP tools — they are portals, scrapers, keyed APIs, or invented `/api/` paths:
- TMD `api.tmd.go.th` / DGA `api.dga.or.th` (registration / keys)
- OpenAQ (API key)
- EGAT / NSO / Traffy landing pages
- BTS / MRT / SRT / BMTA “open feeds” (no public no-key JSON)
- SET quotes, government lottery GitHub mirrors, rss2json
- Fuel / crime / court / politics claimed APIs
- `forWeb/getAQI_JSON.php` (404; Air4Thai uses `getNewAQI_JSON.php`)
Weather uses Open-Meteo with timezone `Asia/Bangkok`. Earthquake tools use USGS inside ~5.5–20.5°N, 97–106°E and are **not** official TMD bulletins. FX is a community feed, not Bank of Thailand.
## Tools
### Dataset catalogue
| Tool | Purpose |
|---|---|
| `th_datasets_search` | Search data.go.th datasets by keyword |
| `th_dataset_metadata` | Get metadata for a data.go.th dataset |
| `th_dataset_query` | Query rows from a tabular data.go.th resource |
### Weather and environment
| Tool | Purpose |
|---|---|
| `th_weather_2h` | Next 2-hour forecast for a Thai city |
| `th_weather_24h` | 24-hour forecast |
| `th_weather_4day` | 4-day forecast |
| `th_uv_index` | UV index |
| `th_rainfall` | Precipitation / rainfall |
| `th_air_temperature` | Air temperature |
| `th_relative_humidity` | Relative humidity |
| `th_air_quality` | Open-Meteo PM2.5 / PM10 / AQI |
| `th_air4thai` | PCD Air4Thai station readings |
| `th_elevation` | Ground elevation (metres) |
| `th_marine` | Gulf / Andaman wave forecast |
| `th_weather_overview` | Current conditions + today's high/low |
| `th_weather_week` | 7-day daily forecast |
| `th_weather_warnings` | Heavy rain / thunderstorm slots (not TMD) |
| `th_historical_weather` | Open-Meteo archive daily history |
| `th_flood` | GloFAS river-discharge forecast |
| `th_sunrise` | Sunrise / sunset (UTC) |
### Maps, places, and admin
| Tool | Purpose |
|---|---|
| `th_address_search` | Search Thai addresses |
| `th_geocode` | Convert address/place to coordinates |
| `th_reverse_geocode` | Find addresses near coordinates |
| `th_provinces` | Live OSM changwat list (admin_level=4) |
| `th_postal_code` | 5-digit postcode lookup |
| `th_tourism_spots` | Nearby OSM tourism POIs |
| `th_place_search` | Open-Meteo geocoding for Thai place names |
| `th_hospitals` | Nearby hospitals/clinics (OSM, not MOPH) |
| `th_fuel_stations` | Nearby fuel stations (OSM locations, not pump prices) |
| `th_police_stations` | Nearby police stations (OSM) |
| `th_schools` | Nearby schools (OSM, not MOE) |
| `th_pharmacies` | Nearby pharmacies (OSM) |
| `th_fire_stations` | Nearby fire stations (OSM) |
| `th_ferry_terminals` | Nearby ferry terminals (OSM) |
| `th_bus_stops` | Nearby bus stops (OSM, not BMTA arrivals) |
| `th_evacuation_shelters` | Nearby shelters / assembly points (OSM) |
| `th_temples` | Nearby Buddhist temples (OSM) |
| `th_universities` | Hipolabs live university search (not MHESI) |
| `th_metro_stations` | Nearby OSM railway/subway stations (not live GTFS) |
| `th_banks` | Nearby OSM bank branches (not BOT) |
| `th_atms` | Nearby OSM ATMs |
| `th_hotels` | Nearby OSM hotels |
| `th_convenience_stores` | Nearby OSM convenience stores |
### Hazards, finance, aviation
| Tool | Purpose |
|---|---|
| `th_earthquake_list` | USGS events in the Thailand box |
| `th_tsunami_list` | USGS tsunami-flagged events in the Thailand box |
| `th_public_holidays` | Public holidays (Google Calendar ICS) |
| `th_next_holidays` | Upcoming holidays from today |
| `th_long_weekend` | Long-weekend windows for a year |
| `th_fx_rate` | Spot FX involving THB |
| `th_gold_price` | Spot gold XAU/USD |
| `th_airports` | Nearby OSM aerodromes |
| `th_metar` | Live METAR for a Thai airport |
| `th_crypto_thb` | Bitkub THB ticker |
| `th_worldbank` | World Bank THA indicators |
| `th_disease_reports` | data.go.th health/dengue dataset search |
| `th_prayer_schedule` | Prayer times by city (Aladhan) |
| `th_natural_events` | NASA EONET events in the Thailand box |
| `th_species` | GBIF species search |
| `th_occurrences` | GBIF occurrence records (`country=TH`) |
All **59** tools call a live no-key public feed. Local parsers (Thai ID, BE/AD, PromptPay, mobile prefix) are not exposed as tools.
## Local development
```bash
npm install
npm run dev
```
No `.dev.vars` or API keys are required. `DATA_GOV_TH_API_KEY` is optional and is only sent to `data.go.th`.
Default city is Bangkok (`13.7563, 100.5018`).
## Checks
```bash
npm run lint
npm run typecheck
npm test
npm run check
```
With `npm run dev` running:
```bash
npm run smoke:local
```
## Required secrets (deploy)
| Secret | Purpose |
|---|---|
| `CLOUDFLARE_API_TOKEN` | Deploy Worker |
| `DATA_GOV_TH_API_KEY` | Optional data.go.th API key |
| `BUILD_SHA` | Synced automatically from GitHub Actions |
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues