Travel Assistant RAG MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Travel Assistant RAG MCPPlan a 3-day Singapore itinerary for next week, adjusting for weather"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Travel Planning Assistant — Singapore
A context-aware travel assistant combining a Retrieval-Augmented Generation (RAG) knowledge base with live information from MCP tools. Built with LangChain, FAISS, Groq, and Streamlit.
Architecture
┌───────────────────────────┐
│ Streamlit UI (app.py) │
└─────────────┬─────────────┘
│
▼
┌───────────────────────────┐
│ agent.py (router) │ ← classifies query via Groq LLM
└──┬──────────────────┬─────┘
│ │
▼ ▼
┌────────────┐ ┌────────────────────────┐
│ rag.py │ │ mcp_clients.py │
│ FAISS │ │ (stdio transport) │
│ + Groq │ │ │
└─────┬──────┘ └────────┬───────────────┘
│ │
▼ ▼
4 KB docs ┌──────────────┐ ┌──────────────┐
(markdown) │ weather_srv │ │ currency_srv │
│ (FastMCP) │ │ (FastMCP) │
│ Open-Meteo │ │ frankfurter │
└──────────────┘ └──────────────┘Related MCP server: Travel Planner MCP Server
Knowledge Base Sources
Title | URL | Reuse |
Singapore Attractions | Public web content | |
Singapore Transport | Public web content | |
Singapore Food & Culture | Public web content | |
Singapore Itineraries | Public web content |
Each markdown file begins with metadata:
<!-- source_title: <title> | source_url: <url> -->RAG Workflow
Ingest (
ingest.py) — reads alldata/knowledge_base/*.mdfiles, splits withRecursiveCharacterTextSplitter(chunk_size=800, chunk_overlap=100).Embed —
sentence-transformers/all-MiniLM-L6-v2(local, no API key).Store — FAISS index saved to
./faiss_index/.Retrieve — top-4 chunks per question via
similarity_search.Generate — Groq
openai/gpt-oss-20banswers using only retrieved context.Cite — every KB fact carries a
[KB: <source_title>]marker; if the KB is insufficient, the assistant replies exactly: "I don't have enough information in the knowledge base to answer this reliably."
MCP Tools
Tool | Server | Transport | API |
|
| stdio (FastMCP) | Open-Meteo |
|
| stdio (FastMCP) | frankfurter.dev |
The client (mcp_clients.py) spawns each server as a subprocess via
stdio_client + ClientSession, calls the required tool, and returns structured
JSON. Failures return {"error": "..."} and never fabricate data.
Prompt & Context Strategy
Prompt | Purpose |
| Classifies the query into KB / WEATHER / CURRENCY / COMBINED / NONE |
| Forces context-only answers with |
| Merges KB + MCP outputs, labels every fact with its origin, builds day-wise plans |
| Global rules: cite KB and MCP, refuse hallucinations, preserve preferences |
Context retention: app.py stores the full message history in
st.session_state.messages. agent.py prepends the last 6 turns to the
COMBINED_PROMPT via the {history} slot, so follow-ups like "Make day 2 indoor only"
modify the previous plan correctly.
Factual vs. AI-generated: Every statement is labelled:
[KB: <source_title>]— from the knowledge base[Source: MCP weather tool]/[Source: MCP currency tool]— from live toolsUnmarked text is the LLM's own synthesis (clearly separable from the above)
Setup
Requires Python 3.11–3.13. Groq API key (free tier).
cd travel_assistant
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r requirements.txtCopy .env.example to .env and set:
GROQ_API_KEY=gsk_your_key_here
GROQ_MODEL=openai/gpt-oss-20bBuild the vector index:
python ingest.pyTest MCP tools:
python mcp_clients.pyTest the agent:
python agent.pyLaunch the UI:
streamlit run app.pyOpen http://localhost:8501.
Sample Questions
Try these in order to exercise every code path:
What are the must-visit attractions in Singapore?— RAG onlyWhat's the weather in Singapore for the next 3 days?— MCP weatherConvert INR 50000 to SGD— MCP currencyPlan a 3-day Singapore itinerary for next week and adjust for weather— combined RAG + MCPMake day 2 indoor only— multi-turn contextConvert my 60000 INR budget to SGD and suggest a 3-day plan— combined currency + itineraryWhat's the best ramen shop in Tokyo?— KB-insufficiency guardrail
Full transcripts in sample_conversations.md.
Acceptance Criteria Mapping
Criterion | Where |
KB from 3+ sources |
|
Embedding-based retrieval |
|
Grounded answers with sources |
|
Weather via MCP |
|
Currency via MCP |
|
Combined RAG + MCP response | Q4 in |
Multi-turn context |
|
Tool selection by intent |
|
Missing-knowledge handling | Q7 (refusal) |
Tool-failure handling |
|
Simple UI |
|
Notes
Groq models: use
openai/gpt-oss-20boropenai/gpt-oss-120b. The olderllama-3.xnames were deprecated by Groq.MCP SDK pinned to
mcp>=1.2,<2for the v1 API (FastMCP).FAISS index is small (~9 chunks) and loads in under a second.
All tools are read-only; no booking, payment, or reservation logic.
AI Travel Planning Assistant — Singapore
Source code: https://github.com/hban1116/travel-assistant-rag-mcp
A context-aware travel assistant combining a Retrieval-Augmented Generation (RAG) knowledge base with live information from MCP tools. Built with LangChain, FAISS, Groq, and Streamlit.
This server cannot be deployed
Maintenance
Related MCP Connectors
Singapore property & financial data APIs for AI agents. 27 MCP tools. x402 micropayments.
Weather, code search, currency & Solana trust scoring as MCP tools. Free, no API key needed.
TravelMind: 8 MCP tools for travel (12306 trains, flights, hotels, geocode, planning, policy).
Your personal AI travel concierge — flights, hotels, 116M+ POIs, visas, weather & more
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables intelligent travel planning by combining weather forecasts and route calculations for destinations. Provides personalized travel recommendations based on weather conditions and supports trip planning with persistent conversation memory.-
- FlicenseNot gradedqualityDmaintenanceProvides weather-aware travel planning tools that fetch 3-day forecasts and generate structured itineraries using a multi-agent orchestration system. It exposes specialized agents for weather data and trip planning to any MCP-compliant client.-
- AlicenseNot gradedqualityBmaintenanceA grounded Singapore travel-planning brain for your AI personal assistant.MIT
- FlicenseNot gradedqualityCmaintenanceProvides AI agents with live, structured access to Singapore government open data including weather, transport, property, and company registry via 35 well-described tools.1-