Back to MCP directory
publicPublicdnsLocal runtime

Travel Planner MCP Server

一个基于Google Maps API的旅行规划MCP服务器,提供地点搜索、路线计算等功能

article

README

🚀 旅行规划 MCP 服务器 (@gongrzhe/server-travelplanner-mcp)

这是一个与 Google Maps 和旅行规划服务交互的旅行规划模型上下文协议 (MCP) 服务器实现。它能让大型语言模型 (LLMs) 执行旅行相关任务,如位置搜索、地点详细信息查找和旅行时间计算。

smithery badge

🚀 快速开始

本服务器可助力大型语言模型处理各类旅行相关任务,以下为您介绍安装与使用方法。

📦 安装指南

使用 Smithery 安装

通过 Smithery 可自动安装 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

    • 功能:使用 Google Places API 搜索地点。
    • 输入:
      • query (字符串):搜索地点的查询词。
      • location (可选):经纬度以偏向结果。
      • radius (可选):搜索半径(单位:米)。
  • getPlaceDetails

    • 功能:获取特定地点的详细信息。
    • 输入:
      • placeId (字符串):Google 地点 ID,用于检索详细信息。
  • calculateRoute

    • 功能:计算两个位置之间的路线。
    • 输入:
      • origin (字符串):起始位置。
      • destination (字符串):结束位置。
      • mode (可选):出行方式(驾驶、步行、骑行、 transit)。
  • getTimeZone

    • 功能:获取位置的时间区信息。
    • 输入:
      • location:经纬度坐标。
      • timestamp (可选):用于计算时区的时间戳。

📚 详细文档

配置

与 Claude Desktop 结合使用

要在 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"
      }
    }
  }
}

开发

源代码构建

  • 克隆仓库:
    git clone https://github.com/yourusername/your-repository.git
    cd your-repository
    
  • 安装依赖项:
    npm install
    
  • 运行服务器:
    npm start
    

环境变量

# 必要的环境变量示例
GOOGLE_MAPS_API_KEY=your_api_key_here

📄 许可证

此项目遵循 LICENSE 协议。

READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
data_object

This entry does not contain a standard command or remote URL, so a safe client config cannot be generated automatically

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client