TravelMind AI MCP Server
โ TravelMind AI โ Real-Time Agentic Travel Planner
A multi-agent AI travel planner powered by Google Serper API (live Google search) and an MCP Server (Model Context Protocol). Four specialized agents collaborate in a pipeline to produce a complete, real-time travel plan.
๐ค Agent Architecture
User Input
โ
โผ
AgentOrchestrator
โ
โโโ Phase 1 โโ SearchAgent โโโโโโโโโโโโโโโโโโโโ Google Serper API
โ Fires 10 concurrent live searches:
โ flights ยท hotels ยท attractions ยท weather ยท visa
โ food ยท safety ยท budget ยท return flights ยท news
โ
โโโ Phase 2 (parallel) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ PlanningAgent โ synthesises search results into travel info
โ โ (visa, safety, weather, attractions, news)
โ โโโ BudgetAgent โ extracts real prices from Serper snippets,
โ builds full cost breakdown
โ
โโโ Phase 3 โโ ItineraryAgent โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Builds day-by-day plan from live Serper places data
AI-generated (if Gemini key) or rule-based fallback๐ MCP Server
The MCP server exposes all agent tools as JSON-RPC 2.0 endpoints.
Endpoint | Method | Description |
| POST | JSON-RPC 2.0 tool dispatcher |
| GET | List all 18 registered tools |
| GET | Health check & status |
| GET | SSE stream โ real-time agent events |
Registered Tools (18)
Tool | Description |
| Live flight search between two cities |
| Hotels with live prices and ratings |
| Top tourist attractions at destination |
| Current and forecast weather |
| Visa requirements by nationality |
| Restaurants and dining options |
| Travel safety advisories |
| Daily cost and expense estimates |
| General Google search for any travel query |
| Targeted train fares and duration search |
| Targeted restaurant and cuisine search |
| Targeted attraction hours and ticket search |
| Targeted route travel-time search |
| Structured category budget calculation |
| Transparent caller-rate currency conversion |
| Run the full 4-agent pipeline, returns full plan |
| Day-by-day itinerary from live data |
| Detailed budget calculation |
๐ Quick Start
1. Install
npm install2. Configure
cp .env.example .env
# Edit .env โ add your Serper API key (required for live data)Get your free Serper API key at serper.dev โ 2,500 free searches/month.
3. Run
# Interactive CLI planner
npm start
# MCP server only (for integrations)
npm run mcp
# Browser trip planner
# Start the MCP server, then open http://localhost:3001
# Run verification tests
npm run verify๐ API Keys
Key | Required? | Where to get | Free tier |
| โ Yes | 2,500 searches/mo | |
| โ No | Free tier |
Without Serper: App runs in estimation mode with built-in data.
Without Gemini: Uses rule-based itinerary and snippet extraction (fully functional).
๐ก MCP Server API โ Example Calls
Health check
curl http://localhost:3001/mcp/healthList tools
curl http://localhost:3001/mcp/toolsCall a tool (JSON-RPC 2.0)
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "search_flights",
"arguments": {
"origin": "New York",
"destination": "Bangkok",
"date": "2026-11-15"
}
}
}'Plan a full trip via MCP
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "2",
"method": "tools/call",
"params": {
"name": "plan_full_trip",
"arguments": {
"origin": "London",
"destination": "Tokyo",
"startDate": "2026-12-01",
"endDate": "2026-12-10",
"numTravelers": 2,
"totalBudget": 5000,
"currency": "USD",
"budgetTier": "moderate",
"travelType": "cultural",
"nationality": "GB"
}
}
}'SSE event stream
curl -N http://localhost:3001/mcp/events๐ Project Structure
Travel_planner_agent/
โโโ src/
โ โโโ main.js # Entry point
โ โโโ agents/
โ โ โโโ SearchAgent.js # Fires all Serper searches
โ โ โโโ PlanningAgent.js # Synthesises search โ travel info
โ โ โโโ RealtimeBudgetAgent.js # Real-time price extraction & budget
โ โ โโโ RealtimeItineraryAgent.js # Day-by-day plan from live places
โ โ โโโ BaseAgent.js # (shared base)
โ โ โโโ TransportationAgent.js # (legacy, used by fallback pipeline)
โ โ โโโ AccommodationAgent.js
โ โ โโโ BudgetAgent.js
โ โ โโโ FoodAgent.js
โ โ โโโ ItineraryAgent.js
โ โโโ core/
โ โ โโโ AgentOrchestrator.js # Real-time 3-phase coordinator
โ โ โโโ PlannerOrchestrator.js # (legacy offline orchestrator)
โ โ โโโ config.js
โ โ โโโ constants.js
โ โโโ mcp/
โ โ โโโ mcpServer.js # MCP JSON-RPC 2.0 server (Express)
โ โ โโโ mcpClient.js # MCP client with convenience wrappers
โ โ โโโ startServer.js # Standalone server entry point
โ โโโ realtime/
โ โ โโโ serperClient.js # Google Serper API wrapper
โ โโโ models/
โ โ โโโ TravelPlan.js # Shared data model
โ โโโ ui/
โ โ โโโ realtimeApp.js # Real-time app loop
โ โ โโโ realtimeDisplay.js # Terminal rendering (live-aware)
โ โ โโโ realtimePrompts.js # Inquirer prompts
โ โ โโโ app.js # (legacy UI)
โ โ โโโ display.js
โ โ โโโ prompts.js
โ โโโ data/
โ โ โโโ destinationData.js # Curated city data (fallback)
โ โ โโโ visaRules.js
โ โโโ utils/
โ โโโ logger.js
โ โโโ helpers.js
โ โโโ openaiClient.js
โ โโโ geoClient.js
โ โโโ weatherClient.js
โโโ scripts/
โ โโโ verify.js # End-to-end test suite
โโโ plans/ # Saved JSON trip plans (auto-created)
โโโ .env.example
โโโ package.json
โโโ README.mdโ What's Live vs Estimated
Feature | With Serper key | Without Serper key |
Flight prices | โ Live Google search | โก Distance-based estimate |
Hotel prices & names | โ Live + ratings | โก Tier-based estimate |
Attractions | โ Live places + ratings | โก Built-in city data |
Weather | โ Live forecast | โก Open-Meteo API (free) |
Visa info | โ Live Google search | โก Local rules database |
Restaurant names | โ Live places | โก Built-in city data |
Safety info | โ Live advisories | โก Local curated data |
Daily cost estimates | โ Live cost pages | โก Tier-based defaults |
Itinerary | โ AI+live places / rule-based+live | โก Rule-based built-in |
๐ Requirements
Node.js 18+
npm