Build a No‑Code Travel‑Planning AI Assistant with VS Code, Cline, and Gaode MCP Server
This guide walks through setting up VS Code, installing the Cline plugin, configuring a Gaode Map MCP Server API key, and using the DeepSeek model to generate a personalized park‑recommendation agent and a visual HTML page, while also explaining the stdio‑based communication between Cline and the MCP Server.
Environment Setup
Apply for a Gaode Map API Key on the Gaode Open Platform.
Install the Cline extension in VS Code and enable the Use MCP servers option.
Configure DeepSeek API credentials in Cline.
Install nvm, then use it to install Node.js 22.10.0:
nvm install 22.10.0
nvm use 22.10.0
npx --versionModify settings.txt to use domestic mirrors: <code>node_mirror: https://npmmirror.com/mirrors/node/ npm_mirror: https://npmmirror.com/mirrors/npm/</code>
Two‑Step Travel Planning with Gaode MCP
Enter the following Chinese prompt in Cline’s Type your task here field:
我住在北京海淀区永丰地铁站附近,女朋友在北京市海淀区魏公村地铁站附近,
帮我推荐几个与两个人距离相近,方便停车的,景色优美的公园。
并给出公园的具体信息。Cline forwards the request to DeepSeek, which orchestrates the Gaode MCP tools maps_geo, maps_around_search and maps_search_detail. After approving the tool calls, DeepSeek returns three parks: Yuanmingyuan Ruins Park, Qinghe Source Riverside Park, and Xianghuangqi Park.
Generating a Visual HTML Page
Ask the model to render the recommendation as a web page:
上面的推荐内容,能不能帮我生成一个html文件,
用好看的图像表达出来,方便大家美观的查看Cline produces the HTML code, which can be previewed via the run command button. The static page can be hosted on HTMLPUT (e.g., https://share.htmlput.com/p/r9ka42qzc7?lang=zh).
Cline ↔ MCP Server Communication Principle
Cline acts as an MCP client; the Gaode MCP Server is the service side. Communication uses standard input/output (stdio). Starting the server: npx -y @amap/amap-maps-mcp-server The environment variable AMAP_MAPS_API_KEY supplies the Gaode API key. Cline sends JSON‑encoded requests through stdin and receives responses via stdout.
Custom Python Client Example
The following Python client demonstrates the same stdio mechanism. The key change is to launch the Gaode MCP server via npx instead of a Python script:
server_params = StdioServerParameters(
command="npx",
args=["-y", "@amap/amap-maps-mcp-server"],
env={"AMAP_MAPS_API_KEY": "YOUR_API_KEY"}
)After connecting, the client lists available tools (e.g., maps_weather) and can invoke them. Example output for a weather query shows the current Beijing weather.
MCP Server Configuration (JSON)
For macOS:
{
"mcpServers": {
"amap-maps": {
"command": "npx",
"args": ["-y", "@amap/amap-maps-mcp-server"],
"env": {"AMAP_MAPS_API_KEY": "YOUR_KEY"}
}
}
}For Windows (use cmd /c):
{
"mcpServers": {
"amap-maps": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@amap/amap-maps-mcp-server"],
"env": {"AMAP_MAPS_API_KEY": "YOUR_KEY"},
"disabled": false,
"autoApprove": []
}
}
}To apply the configuration, open Cline → MCP Servers → Installed → Configure MCP Servers and paste the JSON.
Summary
By installing Cline, configuring DeepSeek and Gaode API credentials, and launching the Gaode MCP server via stdio, developers can build a no‑code AI travel‑planning assistant, generate a shareable HTML page, and programmatically interact with the MCP server using a custom Python client.
Fun with Large Models
Master's graduate from Beijing Institute of Technology, published four top‑journal papers, previously worked as a developer at ByteDance and Alibaba. Currently researching large models at a major state‑owned enterprise. Committed to sharing concise, practical AI large‑model development experience, believing that AI large models will become as essential as PCs in the future. Let's start experimenting now!
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.
