Travel Planner MCP Server
Provides 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.
README
Travel Planner MCP Server
A multi-agent travel planning system built with Google Agent Development Kit (ADK) that exposes its tools via the Model Context Protocol (MCP).
The system uses a root agent with two sub-agents — a weather agent and a travel plan agent — to create weather-aware 3-day travel itineraries. The tools are also exposed through an MCP server, making them accessible to any MCP-compliant client.
Architecture
┌─────────────────────────────────────────────────┐
│ Root Agent │
│ (travel_planner) │
│ │
│ Orchestrates the travel planning workflow: │
│ gather info → check weather → create plan │
│ │
│ ┌─────────────────┐ ┌──────────────────────┐ │
│ │ Weather Agent │ │ Travel Plan Agent │ │
│ │ │ │ │ │
│ │ get_weather() │ │ create_travel_plan()│ │
│ │ (Open-Meteo API)│ │ (itinerary builder) │ │
│ └─────────────────┘ └──────────────────────┘ │
└─────────────────────────────────────────────────┘
▼ exposed via ▼
┌─────────────────────────────────────────────────┐
│ MCP Server (stdio) │
│ │
│ Wraps ADK FunctionTools and exposes them as │
│ MCP tools accessible to any MCP client │
│ │
│ Tools: get_weather, create_travel_plan │
└─────────────────────────────────────────────────┘
Project Structure
travel-planner-mcp-server/
├── travel_planner/ # ADK multi-agent package
│ ├── __init__.py
│ ├── agent.py # Root agent (orchestrator with sub-agents)
│ ├── sub_agents/
│ │ ├── __init__.py
│ │ ├── weather_agent.py # Weather specialist sub-agent
│ │ └── travel_plan_agent.py # Travel planning specialist sub-agent
│ └── tools/
│ ├── __init__.py
│ ├── weather_tools.py # Open-Meteo API weather tool
│ └── travel_tools.py # Travel plan generation tool
├── mcp_server.py # MCP server exposing ADK tools
├── adk_client_agent/ # Example ADK agent consuming the MCP server
│ └── mcp_travel_client/
│ ├── __init__.py
│ └── agent.py
├── pyproject.toml
├── requirements.txt
├── .env.example
└── README.md
Prerequisites
- Python 3.10+
- A Google API key (for Gemini model access)
Setup
-
Clone the repository:
git clone <repo-url> cd travel-planner-mcp-server -
Install dependencies:
pip install -r requirements.txt -
Configure environment:
cp .env.example .env # Edit .env and add your Google API key
Usage
Option 1: Run the ADK Multi-Agent System Directly
This uses the root agent with its sub-agents through the ADK web UI:
adk web
# Select "travel_planner" in the browser UI
The root agent will:
- Ask for your destination and travel date
- Delegate to the weather agent to fetch the forecast
- Delegate to the travel plan agent to create the itinerary
- Present a comprehensive 3-day travel plan
Option 2: Run the MCP Server
This exposes the tools via MCP protocol for any MCP client to consume:
python mcp_server.py
The MCP server exposes two tools:
get_weather— Fetches 3-day weather forecast for a location using Open-Meteo APIcreate_travel_plan— Generates a structured 3-day travel itinerary template
Option 3: Run the MCP Client Agent
This demonstrates an ADK agent consuming the MCP server:
cd adk_client_agent
adk web
# Select "mcp_travel_client" in the browser UI
Option 4: Connect from Any MCP Client
Add to your MCP client configuration (e.g., Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"travel-planner": {
"command": "python3",
"args": ["/path/to/mcp_server.py"]
}
}
}
Tools
get_weather
Fetches a 3-day weather forecast using the Open-Meteo API (free, no API key required).
Parameters:
| Parameter | Type | Description |
|---|---|---|
location |
string | City or place name (e.g., "Paris", "Tokyo") |
date |
string | Start date in YYYY-MM-DD format |
Returns: Temperature (C/F), conditions, precipitation, wind speed, and UV index for 3 days.
create_travel_plan
Generates a structured 3-day travel itinerary template.
Parameters:
| Parameter | Type | Description |
|---|---|---|
location |
string | Destination city or place |
start_date |
string | Trip start date (YYYY-MM-DD) |
weather_summary |
string | Weather conditions summary |
interests |
string | Travel interests (default: "general sightseeing") |
Returns: Day-by-day itinerary structure with time slots, meals, and tips.
How It Works
This project demonstrates Pattern 2 from the ADK documentation: Building an MCP server with ADK tools.
- ADK
FunctionToolwraps the Python tool functions adk_to_mcp_tool_type()converts ADK tool schemas to MCP format- The MCP server advertises tools via
list_toolsand executes them viacall_tool - Any MCP client can discover and invoke the tools through the standard protocol
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。