Google Maps (Travel Planner) MCP server

Integrates with Google Maps to enable AI-driven travel planning, itinerary optimization, and location-based services for automated trip management.
Back to servers
Setup instructions
Provider
Gongrzhe, Inc.
Release date
Dec 24, 2024
Language
TypeScript
Package
Stats
4.3K downloads
75 stars

The Travel Planner MCP Server enables Language Learning Models (LLMs) to perform travel-related tasks by interacting with Google Maps and travel planning services. It provides functionality for location search, place details lookup, route calculations, and timezone information.

Installation

Via Smithery

For automated installation with Claude Desktop:

npx -y @smithery/cli install @GongRzhe/TRAVEL-PLANNER-MCP-Server --client claude

Manual Installation

Run directly using npx (recommended):

# Basic usage
npx @gongrzhe/server-travelplanner-mcp

# With Google Maps API key
GOOGLE_MAPS_API_KEY=your_api_key npx @gongrzhe/server-travelplanner-mcp

Or install globally:

# Install the package globally
npm install -g @gongrzhe/server-travelplanner-mcp

# Run after global installation
GOOGLE_MAPS_API_KEY=your_api_key @gongrzhe/server-travelplanner-mcp

Available Tools

searchPlaces

Search for places using Google Places API:

  • Input parameters:
    • query (string, required): Search query for places
    • location (optional): Latitude and longitude to bias results
    • radius (optional): Search radius in meters

getPlaceDetails

Get detailed information about a specific place:

  • Input parameters:
    • placeId (string, required): Google Place ID to retrieve details for

calculateRoute

Calculate route between two locations:

  • Input parameters:
    • origin (string, required): Starting location
    • destination (string, required): Ending location
    • mode (optional): Travel mode (driving, walking, bicycling, transit)

getTimeZone

Get timezone information for a location:

  • Input parameters:
    • location (required): Latitude and longitude coordinates
    • timestamp (optional): Timestamp for time zone calculation

Configuration with Claude Desktop

Add the following to the "mcpServers" section of your claude_desktop_config.json:

{
  "mcpServers": {
    "travel-planner": {
      "command": "npx",
      "args": ["@gongrzhe/server-travelplanner-mcp"],
      "env": {
        "GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
      }
    }
  }
}

If you've installed the package locally, you can use:

{
  "mcpServers": {
    "travel-planner": {
      "command": "node",
      "args": ["path/to/dist/index.js"],
      "env": {
        "GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
      }
    }
  }
}

Required API Keys

To use this server, you'll need:

  • Google Maps API Key with the following APIs enabled:
    • Places API
    • Directions API
    • Geocoding API
    • Time Zone API

The API key should be set as the GOOGLE_MAPS_API_KEY environment variable when running the server.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "travel-planner" '{"command":"npx","args":["@gongrzhe/server-travelplanner-mcp"],"env":{"GOOGLE_MAPS_API_KEY":"your_google_maps_api_key"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "travel-planner": {
            "command": "npx",
            "args": [
                "@gongrzhe/server-travelplanner-mcp"
            ],
            "env": {
                "GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "travel-planner": {
            "command": "npx",
            "args": [
                "@gongrzhe/server-travelplanner-mcp"
            ],
            "env": {
                "GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later