AMAP MCP Server
TravelPlanner-Agent
Ein intelligenter Reiseplanungs-Agent auf Basis von LangGraph + MCP. Über natürliche Sprachdialoge werden automatisch die 高德地图-API aufgerufen, um echte Wetter- und Sehenswürdigkeitsdaten abzurufen, nach geografischer Distanz geclustert und gruppiert, um strukturierte mehrtägige Reiserouten zu generieren (inklusive Kartenmarkierungen und Restaurantempfehlungen in der Nähe).
Funktionen
Multi-Agent-Orchestrierung: LangGraph-graphgesteuert (Präferenzextraktion → Gedächtnisabruf → Absichtserkennung → Tool-Aufruf → Reiseplanung)
Echte Daten: Verbindung zu 高德地图 über MCP, Abruf von Echtzeit-Wetter, Sehenswürdigkeiten (mit Koordinaten) und umliegenden Restaurants
Routenplanung: K-means-Clustering + Nearest-Neighbor-Kette, geografisch nahe Sehenswürdigkeiten werden am selben Tag geplant, Besichtigung ohne Umwege
Vektor-Gedächtnis: Lokales Embedding-Modell + ChromaDB, automatische Extraktion von Benutzerpräferenzen und Injektion per semantischer Suche
Strukturierte Ausgabe:
with_structured_outputgeneriert TripPlan-JSON, Frontend-Karten + 高德地图-AnzeigeEval-Regression: Automatische Bewertung von Absichtsweiterleitung, strukturierter Ausgabe, Tool-Aufrufen und Präferenzextraktion anhand fester Testfälle
Related MCP server: Ingrids Reisetjenester
Technologie-Stack
Kategorie | Technologie |
Backend | FastAPI + LangGraph |
LLM | DeepSeek (Hauptdialog / strukturierte Ausgabe / Präferenzextraktion) |
Externe Dienste | 高德地图 API (über MCP) |
Vektor | ChromaDB + BGE lokales Embedding |
Frontend | Eingebettetes HTML + 高德 JS API |
Architektur
用户输入
→ extract(偏好提取,两级过滤:关键词粗筛 + LLM 精判)
→ retrieve(记忆检索,从向量库查相关偏好注入)
→ route(意图判断:规划 or 闲聊)
→ model(LLM 决定调用工具)
→ tools(MCP 高德:天气 / 景点 / 周边餐厅)
→ plan(K-means 聚类分组 + LLM 结构化输出 TripPlan)
→ 前端卡片 + 地图展示Schnellstart
Systemanforderungen
Python 3.10+
Lokales Embedding-Modell (BGE, muss heruntergeladen werden, siehe unten)
1. Abhängigkeiten installieren
pip install -r requirements.txt2. Lokales Embedding-Modell herunterladen
Das Projekt verwendet BAAI/bge-small-zh-v1.5 für die Vektorsuche. Laden Sie es von ModelScope in das Verzeichnis models/ herunter:
mkdir -p models
python -c "from modelscope import snapshot_download; snapshot_download('AI-ModelScope/bge-small-zh-v1.5', local_dir='./models/bge-small-zh-v1.5')"3. Umgebungsvariablen konfigurieren
Kopieren Sie .env.example zu .env und füllen Sie Ihre Schlüssel aus:
# DeepSeek(主对话 + 结构化输出 + 偏好提取)
DEEPSEEK_API_KEY=your_deepseek_key
DEEPSEEK_BASE_URL=https://api.deepseek.com
# 高德地图(Web 服务 API Key,后端调天气/景点/餐厅)
AMAP_API_KEY=your_amap_web_key4. Frontend-高德 JS Key
Öffnen Sie app.py und ersetzen Sie YOUR_AMAP_JS_KEY im HTML durch Ihren 高德 JS-API-Key (dieser unterscheidet sich vom Web-Service-Key).
5. Starten
python app.pyÖffnen Sie http://localhost:8000 im Browser und geben Sie z. B. „Helfen Sie mir, eine dreitägige Reise nach Xi'an zu planen" ein.
Verzeichnisstruktur
TravelPlanner-Agent/
├── app.py # 主后端(FastAPI + LangGraph 图)
├── amap_mcp_server.py # 高德 MCP Server(天气/景点/周边餐厅)
├── config.py # 配置(从 .env 读取)
├── eval_app.py # Eval 回归测试
├── requirements.txt # 依赖
└── examples/ # 学习版示例(V0-V5 逐步搭建过程)
├── main.py # V0 最小 LLM 调用
├── trip_agent.py # V2 手写 Agent Loop
├── graph_agent.py # V3 LangGraph 版
├── v4_memory.py # V4 手工记忆
├── v4_vector_memory.py # V4 向量检索记忆
├── v5_eval.py # V5 Eval
└── test_structured.py # 结构化输出验证Eval ausführen
python eval_app.pyEs werden 6 Testfälle ausgeführt, die automatisch bewerten: Absichtsweiterleitung, Vollständigkeit der strukturierten Ausgabe, Tool-Aufrufe und Präferenzextraktion.
Sicherheitshinweise
.envist in.gitignoreaufgenommen, bitte keine echten API-Keys committenDer 高德 JS Key ist ein Frontend-Key, der im Klartext exponiert ist und durch Domain-Whitelists eingeschränkt wird; bitte konfigurieren Sie Ihre eigene Whitelist
Lokale Modelle und Vektordatenbank-Daten werden nicht ins Repository committet
Lizenz
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables location-based services through AMap/AutoNavi Maps API including geocoding, weather information, route planning, and POI searches. Supports multiple transportation modes and provides detailed geographic data for Chinese locations.123Mulan Permissive Software , Version 2
- -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 gradedqualityNot gradedmaintenanceEnables AI-assisted travel planning with real-time weather forecasts, place discovery, customized itinerary generation based on interests and budget, and travel distance calculations between cities.
- FlicenseNot gradedqualityDmaintenanceProvides comprehensive geographic information services and route planning for AI agents via the Amap (Gaode Maps) API. It supports geocoding, multi-modal navigation, POI searches, and administrative region queries.3
Related MCP Connectors
TravelMind: 8 MCP tools for travel (12306 trains, flights, hotels, geocode, planning, policy).
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Real-world data for agents: air quality, geocoding, quakes, holidays, web search
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Day2586/TravelPlanner-Agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server