Deploy the MCP Google Maps server as an agent in a Meshagent room, and connect a chatbot or agent that can use the Google Maps tools.

Prerequisites

Required Environment Variables

  • GOOGLE_MAPS_API_KEY: Your Google Maps API key

Steps

  1. Install Meshagent CLI (with all optional dependencies):

    pip install "meshagent[all]"
    
  2. Sign up and authenticate: Follow Meshagent CLI authentication steps

  3. Run the Google Maps MCP Agent in a Meshagent Room:

    meshagent service test --room=test --role=agent --image=meshagent/mcp-google-maps:latest \
      --env MESHAGENT_PORT=8001 \
      --env GOOGLE_MAPS_API_KEY=<YOUR_GOOGLE_MAPS_API_KEY> \
      --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
      --name=mcp-google-maps-service
    
    • This command starts a Meshagent room with the MCP Google Maps server running and available to Room agents. Rooms will automatically close if they go inactive.
  4. Join an AI chatbot/agent to the Room with toolkit enabled:

    meshagent chatbot join --room=test --agent-name=sample --name=sample --toolkit=mcp-google-maps
    
    • Starts a chatbot in the Meshagent room that can use the google-maps toolkit.
    • Multiple toolkits can be used simultaneously in the same room with the same agent.
    • A link to interact with the agent and access the tools will be provided in the output.

Tools Available

Tools Provided By This Server

ToolShort Description
maps_directionsGet directions between two points
maps_distance_matrixCalculate travel distance and time for multiple origins and destinations
maps_elevationGet elevation data for locations on the earth
maps_geocodeConvert an address into geographic coordinates
maps_place_detailsGet detailed information about a specific place
maps_reverse_geocodeConvert coordinates into an address
maps_search_placesSearch for places using Google Places API

Tools Details

maps_directions

Get directions between two points

ParameterTypeDescription
destinationstringEnding point address or coordinates
originstringStarting point address or coordinates
modestring (optional)Travel mode (driving, walking, bicycling, transit)

maps_distance_matrix

Calculate travel distance and time for multiple origins and destinations

ParameterTypeDescription
destinationsarrayArray of destination addresses or coordinates
originsarrayArray of origin addresses or coordinates
modestring (optional)Travel mode (driving, walking, bicycling, transit)

maps_elevation

Get elevation data for locations on the earth

ParameterTypeDescription
locationsarrayArray of locations to get elevation for

maps_geocode

Convert an address into geographic coordinates

ParameterTypeDescription
addressstringThe address to geocode

maps_place_details

Get detailed information about a specific place

ParameterTypeDescription
place_idstringThe place ID to get details for

maps_reverse_geocode

Convert coordinates into an address

ParameterTypeDescription
latitudenumberLatitude coordinate
longitudenumberLongitude coordinate

maps_search_places

Search for places using Google Places API

ParameterTypeDescription
querystringSearch query
locationobject (optional)Optional center point for the search
radiusnumber (optional)Search radius in meters (max 50000)