Travel MCP Cloudflare Worker
by jongan69
README.md
# Travel MCP Cloudflare Worker
A free, Cloudflare-hosted travel MCP server for flights, hotels, and Airbnb-style stays.
Live MCP endpoint:
```text
https://travel-mcp-typescript.jonathang132298.workers.dev/mcp
```
Health endpoint:
```text
https://travel-mcp-typescript.jonathang132298.workers.dev/health
```
## Use The Deployed MCP
Codex remote MCP setup:
```bash
codex mcp add travel --url https://travel-mcp-typescript.jonathang132298.workers.dev/mcp
codex mcp get travel
```
Generic MCP client config:
```json
{
"mcpServers": {
"travel": {
"url": "https://travel-mcp-typescript.jonathang132298.workers.dev/mcp"
}
}
}
```
## Tools
- `health` - reports source availability.
- `search_hotels` - searches Google Travel hotel results.
- `search_flights` - searches Google Travel flight results.
- `search_airbnbs` - searches Airbnb stays in a map bounding box.
- `get_airbnb_details` - fetches details for an Airbnb `room_id`.
- `plan_trip` - combines flight and hotel search into a basic trip estimate.
- `resolve_location` - resolves city/airport text into known coordinates and airports.
- `process_dates` - normalizes trip start dates and durations.
Airbnb IDs must stay strings. They are larger than JavaScript's safe integer range, so clients should pass `"room_id":"879073972873372346"` rather than a JSON number.
## Quick MCP Smoke Test
Initialize:
```bash
curl -sS -X POST https://travel-mcp-typescript.jonathang132298.workers.dev/mcp \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"0.1.0"}}}'
```
List tools:
```bash
curl -sS -X POST https://travel-mcp-typescript.jonathang132298.workers.dev/mcp \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
```
Search Airbnb:
```bash
curl -sS -X POST https://travel-mcp-typescript.jonathang132298.workers.dev/mcp \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_airbnbs","arguments":{"check_in":"2026-08-01","check_out":"2026-08-03","ne_lat":40.83,"ne_long":-73.93,"sw_lat":40.70,"sw_long":-74.02,"limit":1}}}'
```
## REST Endpoints
The Worker also keeps direct JSON endpoints for simple testing and integrations:
- `POST /hotels/search`
- `POST /flights/search`
- `POST /trip/plan`
- `POST /airbnbs/search`
- `POST /airbnbs/details`
- `POST /resolve/location`
- `POST /process/dates`
- `GET /health`
- `GET /health/extended`
## Data Sources
- Flights and hotels use Google Travel scrape queries.
- Airbnb search and listing details use Airbnb web payload parsing.
- No paid API keys are required.
- `/itinerary` is intentionally unsupported until there is a real free source. It does not return synthetic fallback data.
## Local Development
```bash
npm install
npm run dev
```
Local MCP endpoint:
```text
http://127.0.0.1:8787/mcp
```
Typecheck:
```bash
npm run typecheck
```
Deploy:
```bash
npm run deploy
```
The deployed Worker is configured by `wrangler.toml`:
```toml
name = "travel-mcp-typescript"
```
Changing that name will change the deployed `workers.dev` URL.
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessResponsive