Build a Travel‑Planning AI Agent in 5 Minutes with Alibaba Cloud’s MCP Service
This guide explains how the open‑source MCP protocol from Anthropic, now offered as a full‑lifecycle service on Alibaba Cloud Bailian, lets you quickly create a plug‑and‑play AI agent that integrates large models with external tools such as maps and weather APIs, all in under five minutes.
MCP Overview and Benefits
MCP is an open protocol introduced by Anthropic to standardize interactions between large AI models and external data sources or tools. Alibaba Cloud Bailian launched the industry’s first full‑lifecycle MCP service, dramatically lowering the development threshold for AI agents.
Why Traditional AI Applications Struggle
Conventional AI apps rely solely on the model’s internal knowledge, acting like a "worker without an arm" and cannot fetch real‑time data such as weather or news, limiting commercial value.
Although Function Call techniques attempt to bridge this gap, each API must be hard‑coded and repeatedly adapted for different platforms, resulting in high development and maintenance costs.
How MCP Transforms Tool Integration
MCP turns tool calls into a plug‑and‑play experience, similar to inserting a USB drive, by shifting from hard‑coded dependencies to protocol‑driven connections. This reduces integration time to 5‑10 minutes and works across platforms.
Practical Tutorial: Building a Travel‑Planning Agent
Follow these steps on the Bailian platform to create a zero‑code, model‑driven intelligent agent capable of planning trips, retrieving maps, and providing weather information.
Create the Agent Application Go to Bailian → Application Management → Add New Application.
Select the Model Choose 通义千问-Max as the base model.
Configure the Model Set the model to 通义千问-Max in the configuration panel.
Prompt Configuration
Copy the following prompt into the system prompt field. It defines the agent’s role, skills, and constraints.
# 角色
你是一位经验丰富的旅游规划专家,擅长使用MCP工具为用户提供全面的旅行规划服务。你对全球各地的旅游景点、文化习俗和交通住宿信息了如指掌,能够根据用户的需求提供个性化的旅行建议。
## 技能
### 技能 1:理解客户需求
- 详细了解用户的旅行偏好,包括目的地、预算、出行日期、活动偏好等信息。
- 使用MCP工具收集并分析相关信息,确保准确把握用户需求。
### 技能 2:制定旅行计划
- 根据用户的需求,使用MCP工具生成详细的旅行计划,包括但不限于:
- 行程安排:推荐的游览路线、活动安排、时间分配等。
- 住宿建议:根据预算和偏好推荐合适的酒店或民宿。
- 交通指南:提供从出发地到目的地及各个景点之间的交通方式和路线建议。
- 餐饮推荐:介绍当地的特色美食和餐厅。
- 注意事项:提醒用户需要注意的文化差异、安全提示等。
### 技能 3:优化旅行计划
- 根据用户的反馈调整旅行计划,确保最终方案满足用户的所有需求。
- 提供备用方案以应对可能的变化,如天气变化、交通延误等。
### 技能 4:解答旅行相关问题
- 回答用户关于旅行的各种问题,例如签证、保险、货币兑换等。
- 如果遇到不确定的问题,可以使用MCP工具或其他搜索工具查找相关信息。
## 限制
- 只提供旅行相关的建议和信息,不提供预订服务。
- 所有价格均为预估,可能会受到季节等因素的影响。
- 使用MCP工具时,必须遵循其使用规范,确保数据的安全性和准确性。
- 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。Knowledge and Skill Configuration
Enable network search to fetch the latest data, then add the Amap Maps MCP service as a skill.
After opening the service, select it and confirm.
Testing the Agent
Enter the following query in the chat window and send:
帮我制定未来几天,杭州5日游计划,请包含吃住行,天气,酒店(凤起路附近),餐饮美食。The agent will return a detailed itinerary as shown in the example screenshot.
Cleanup
After testing, delete the agent application to avoid incurring further costs by navigating to Application Management, selecting the app, and choosing “Delete”.
Conclusion
The MCP protocol enables rapid, low‑code construction of powerful AI agents that can seamlessly integrate external tools, illustrated here with a travel‑planning assistant built on Alibaba Cloud Bailian in just five minutes.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
