TravelChecker

TravelChecker

Enables multi-modal travel planning for India, aggregating flights, trains, buses, cabs, and personal vehicles across 117 cities with multi-leg routing and weighted scoring.

Category
访问服务器

README

TravelChecker

Multi-modal travel comparison engine for India - aggregates flights, trains, buses, cabs, and personal vehicles across 117 cities, with multi-leg journey routing and weighted scoring.

Built as a Model Context Protocol (MCP) server so it can be plugged into Claude Desktop, Cursor, or any MCP-compatible AI agent as a tool. Also ships with a REST API and a web dashboard.

Stack Node MCP License


Why this exists

Most travel apps only show direct routes. Search "Khammam to Delhi" and you'll see slow trains - but never the fact that the fastest option is actually a cab to Vijayawada airport + a flight from there.

TravelChecker fixes this. It finds the nearest transport hub (airport / railway station) for any city and constructs complete multi-leg journeys, then ranks them all by your priorities.


Features

  • 5 travel modes: Flight, Train, Bus, Cab (Ola/Uber/Auto/Rapido), Personal Vehicle (Petrol/Diesel/Bike)
  • 117 Indian cities across all 28 states + UTs
  • Multi-leg routing - auto-finds nearest airport/station for non-hub cities
  • Live API data:
    • Google Maps Distance Matrix (real road distances)
    • Travelpayouts/Aviasales (live flight prices + booking links)
    • IRCTC RapidAPI (live train schedules + fares)
    • AbhiBus HTTP scrape (bus options)
  • Weighted scoring: tune price/time/comfort sliders to match your trip style
  • Smart insights: surge warnings, fuel-vs-cab savings, train-vs-flight tradeoffs - on every option
  • Graceful fallbacks: every provider has a modeled backup so the app never breaks when an API quota runs out
  • Production-ready:
    • SQLite cache for Google Maps responses (saves API quota)
    • Per-IP rate limiting (30 req/min)
    • OpenAPI/Swagger docs at /docs
    • Per-session quota (5 searches per browser tab) to protect free-tier APIs

Quick Start

1. Clone & install

git clone https://github.com/YOUR-USERNAME/travelchecker.git
cd travelchecker
npm install

2. Add API keys

cp .env.example .env

Then edit .env:

GOOGLE_MAPS_API_KEY=your_key       # console.cloud.google.com -> Distance Matrix API
TRAVELPAYOUTS_TOKEN=your_token     # travelpayouts.com -> Affiliate dashboard
TRAVELPAYOUTS_MARKER=your_marker
RAPIDAPI_KEY=your_key              # rapidapi.com -> IRCTC19 API (free tier)

All four APIs have free tiers. The app works with just GOOGLE_MAPS_API_KEY - the others gracefully fall back to realistic modeled data.

3. Run

npm run start:http        # Web dashboard at http://localhost:3001
npm run start             # Stdio MCP server (for Claude Desktop)

Open http://localhost:3001 for the dashboard, or http://localhost:3001/docs for Swagger.


Use it from Claude Desktop

Add this to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "travelchecker": {
      "command": "npx",
      "args": [
        "tsx",
        "/absolute/path/to/travelchecker/src/index.ts"
      ],
      "env": {
        "GOOGLE_MAPS_API_KEY": "your_key",
        "TRAVELPAYOUTS_TOKEN": "your_token",
        "TRAVELPAYOUTS_MARKER": "your_marker",
        "RAPIDAPI_KEY": "your_key"
      }
    }
  }
}

Restart Claude Desktop. Now you can ask:

"What's the cheapest way to get from Khammam to Delhi tomorrow if I care most about price?"

Claude will call get_routes, then compare_options with your weights, then recommend - and reply with the top pick + alternatives.


Use it from Cursor

In Cursor settings, add to your MCP config:

{
  "mcpServers": {
    "travelchecker": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/travelchecker/src/index.ts"]
    }
  }
}

Architecture

        ┌──────────────────────────────────┐
        │   Client (Web / Claude / Cursor) │
        └──────────────┬───────────────────┘
                       │
       ┌───────────────┼─────────────────┐
       │               │                 │
   REST API        MCP stdio         MCP SSE
       │               │                 │
       └───────────────┼─────────────────┘
                       │
              ┌────────▼─────────┐
              │   MCP Server     │
              │  (3 tools)       │
              │  get_routes      │
              │  compare_options │
              │  recommend       │
              └────────┬─────────┘
                       │
        ┌──────────────┼───────────────┐
        │              │               │
   Providers       Scoring         Hub Finder
   (5 modes)       Engine          (multi-leg)
        │
   ┌────┴────────────────────────────────┐
   │ Flight  Train  Bus  Cab  Personal   │
   │  ↓       ↓      ↓    ↓     ↓        │
   │ Live -> Live -> Scrp ->Model->Model │
   │  ↓       ↓      ↓    ↓     ↓        │
   │ Mock    Mock   Mock  -     -        │
   └─────────────────────────────────────┘

Scoring model

For each option:

priceScore  = 100 * (1 - (fare - minFare) / (maxFare - minFare))
timeScore   = 100 * (1 - (duration - minTime) / (maxTime - minTime))
composite   = (weightPrice * priceScore)
            + (weightTime  * timeScore)
            + (weightComfort * comfortIndex)

Comfort index is a static table per sub-mode (e.g. flight_business: 95, bus_non_ac: 35).

Multi-leg routing

When the origin (or destination) has no airport/station, the hub finder:

  1. Scans all cities in the database
  2. Filters to ones that have an airport (for flights) or station (for trains)
  3. Picks the closest one within 500 km (airports) or 300 km (stations)
  4. Generates a connecting cab leg, then the main transport leg, then a final cab leg if needed

Example: Khammam -> Delhi (flight)

  • Khammam has no airport
  • Nearest airport: Vijayawada (179 km)
  • Final journey: Khammam -> [cab, Rs.2228] -> Vijayawada -> [flight, Rs.4019] -> Delhi

API

Endpoint Method Purpose
/api/analyze-route POST Get all options + recommendation for a route
/api/locations GET List all 117 supported cities
/api/book-flight POST Generate Travelpayouts booking redirect URL
/api/health GET Service health + which providers are configured
/api/rate-limit GET Google Maps quota usage
/docs GET Interactive Swagger UI
/sse GET MCP server-sent events transport

Full schema at http://localhost:3001/docs once running.


Tech Stack

Layer Tech
Language TypeScript
Runtime Node.js 22
Server Express 5
MCP @modelcontextprotocol/sdk 1.29
Validation Zod 4
Cache better-sqlite3
HTTP axios
Scraping cheerio
Docs swagger-ui-express
Frontend Vanilla JS, no framework

Deployment

The included Dockerfile works on any container host. One-click deploy options:

  • Railway: New Project -> Deploy from GitHub repo -> add env vars -> done
  • Render: New Web Service -> connect repo -> Docker -> add env vars

After deploy, set TRAVELPAYOUTS_HOST to your deployed domain - the live flight API requires it for affiliate attribution.


License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选