Yan-AutoTravel-
AI Travel Planner 是一个基于 Spring Boot + Spring AI 的后端与 Vue 3 + Vite 的前端组合项目,面向智能旅游场景,提供 智能行程规划、多模态问答与个性化推荐 能力。 系统集成了 MCP (Model Context Protocol) 工具链,支持从 自然语言理解 → RAG (Retrieval-Augmented Generation) → 多 Agent 协同 → 个性化生成 的完整 AI 应用流程。同时配套 CSV 向量化预处理脚本,实现高效的数据清洗、向量化与检索。
claude mcp add --transport stdio yongyanliututu-yan-autotravel- npm run dev
How to use
Yan-AutoTravel is a Spring Boot back-end coupled with a Vue 3 front-end, built around MCP for enabling action-oriented planning, RAG-based retrieval augmentation, and multi-modal capabilities. The back-end exposes REST endpoints for planning, drafts, questions (SSE stream), and recommendations, orchestrating a planner that uses ReAct-style reasoning and tool calls via the MCP toolchain. The front-end provides an interactive UI for creating trip plans, asking questions to the system, discovering personalized recommendations, and viewing plan details. The MCP integration allows natural language queries to drive the planning process, access city data, and leverage modular tools (e.g., 12306 train data) to produce coherent itineraries.
How to install
Prerequisites:
- Java 17+ (for the Spring Boot back-end)
- Node.js 18+ (for the Vue front-end)
- Python 3.10+ (for data ingestion scripts)
- Backend setup
- Install Java and Maven if not already installed.
- Navigate to backend directory: cd backend
- Ensure application.yml contains your OpenAI or DashScope API key configuration and MCP data sources.
- Run the backend: mvn spring-boot:run
- The backend will start on http://localhost:8080 (Swagger at http://localhost:8080/swagger-ui/index.html)
- Frontend setup
- Open a separate terminal and navigate to web directory: cd web
- Install dependencies and start dev server: npm install npm run dev
- Front-end will be available at http://localhost:5173
- Data ingestion (vector pre-processing)
- Navigate to vector-ingest: cd vector-ingest
- Install Python dependencies: pip install pandas requests pillow
- Normalize CSV data: python ingest_hyper_csv.py
- Generate thumbnails (if needed): python image_jobs.py ./output/poi_normalized.csv
- Environment and MCP configuration
- Set required environment variables (examples shown in README): setx CITYDATA_DIR "C:\path\to\citydata" (Windows) or export CITYDATA_DIR=/path/to/citydata (Unix) setx MCP_AMAP_SERVER "https://www.modelscope.cn/mcp/servers/@amap/amap-maps" setx MCP_12306_SERVER "https://www.modelscope.cn/mcp/servers/@Joooook/12306-mcp"
- Start the dedicated MCP-enabled services (as described in the mcp_config section).
- Access and usage
- Backend API: http://localhost:8080/swagger-ui/index.html
- Frontend: http://localhost:5173
Additional notes
Tips and common issues: ensure OpenAI or DashScope compatible API keys are configured in application.yml or via environment variables. If using MCP endpoints, verify network access to MCP server URLs and ensure CORS settings allow frontend-origin requests. For large planning tasks, enable streaming QA (SSE) on the /api/qa/ask endpoint to observe step-by-step reasoning. If you modify environment variables, restart the backend server to apply changes. The vector ingestion scripts assume city data is present at CITYDATA_DIR; adjust paths accordingly.