这是一个用于与Google Maps和旅行规划服务交互的Travel Planner模型上下文协议(MCP)服务器实现。此服务器使大型语言模型能够执行与旅行相关的任务,如地点搜索、场所详情查询和旅行时间计算。
<a href="https://glama.ai/mcp/servers/y3u6yjiiq1"> <img width="380" height="200" src="https://gips1.baidu.com/it/u=467842305,4005892092&fm=3081&app=3_081&f=PNG?w=760&h=400" alt="Travel Planner Server MCP 服务器" /> </a>要通过 Smithery 自动安装 Travel Planner for Claude Desktop:
npx -y @smithery/cli install @GongRzhe/TRAVEL-PLANNER-MCP-Server --client claude
# 使用 npx(推荐)
npx @gongrzhe/server-travelplanner-mcp
# 使用环境变量设置 Google Maps API 密钥
GOOGLE_MAPS_API_KEY=your_api_key npx @gongrzhe/server-travelplanner-mcp
或者全局安装:
# 全局安装
npm install -g @gongrzhe/server-travelplanner-mcp
# 全局安装后运行
GOOGLE_MAPS_API_KEY=your_api_key @gongrzhe/server-travelplanner-mcp
searchPlaces
query (字符串):地点搜索查询location (可选):偏置结果的纬度和经度radius (可选):搜索半径(米)getPlaceDetails
placeId (字符串):要检索详细信息的 Google 地点IDcalculateRoute
origin (字符串):起始地点destination (字符串):结束地点mode (可选):旅行方式(驾驶、步行、骑自行车、公共交通)getTimeZone
location:纬度和经度坐标timestamp (可选):用于计算时区的时间戳要在 Claude Desktop 应用中使用此服务器,请在您的 claude_desktop_config.json 文件的 "mcpServers" 部分添加以下配置:
{
"mcpServers": {
"travel-planner": {
"command": "npx",
"args": ["@gongrzhe/server-travelplanner-mcp"],
"env": {
"GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
}
}
}
}
或者,如果您已安装该包,可以直接使用 node 命令:
{
"mcpServers": {
"travel-planner": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
}
}
}
}
npm install
npm run build
GOOGLE_MAPS_API_KEY(必需):您的 Google Maps API 密钥,需要启用以下 API:
此 MCP 服务器采用 MIT 许可证。更多详情,请参阅项目仓库中的 LICENSE 文件。