The Google Maps MCP Server is a powerful integration of the Google Maps API within the Model Context Protocol (MCP) framework. It provides a suite of tools for geocoding, reverse geocoding, place search, distance calculations, and more, enabling seamless location-based functionalities in your applications.
The server offers the following tools to interact with the Google Maps API:
maps_geocodeaddress (string)location, formatted_address, place_idmaps_reverse_geocodelatitude (number)longitude (number)formatted_address, place_id, address_componentsmaps_search_placesquery (string)location (optional): { latitude: number, longitude: number }radius (optional): number (meters, max 50000)names, addresses, locationsmaps_place_detailsplace_id (string)name, address, contact info, ratings, reviews, opening hoursmaps_distance_matrixorigins (string[])destinations (string[])mode (optional): "driving" | "walking" | "bicycling" | "transit"maps_elevationlocations (array of {latitude, longitude})maps_directionsorigin (string)destination (string)mode (optional): "driving" | "walking" | "bicycling" | "transit"steps, distance, durationTo use the Google Maps MCP Server, you need a Google Maps API key. Follow the instructions here to create one.
Add the following configuration to your claude_desktop_config.json:
{
"mcpServers": {
"google-maps": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GOOGLE_MAPS_API_KEY",
"mcp/google-maps"
],
"env": {
"GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
Alternatively, you can use NPX for setup:
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-google-maps"
],
"env": {
"GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
To build the Docker image, run the following command:
docker build -t mcp/google-maps -f src/google-maps/Dockerfile .
This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, refer to the LICENSE file in the project repository.