Google Maps MCP Server
Provides comprehensive access to Google Maps Platform APIs, enabling geocoding, places search, routing, geolocation, and other geospatial operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Maps MCP Server find Italian restaurants near Times Square"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Maps MCP Server
A Model Context Protocol (MCP) server that provides comprehensive access to Google Maps Platform APIs. This server enables LLMs to perform geocoding, places search, routing, and other geospatial operations through a standardized interface.
Features
πΊοΈ Comprehensive Google Maps Integration - Access to Places, Routes, Geocoding, and utility APIs
π Advanced Places Search - Text search, nearby search, autocomplete, and detailed place information
π£οΈ Smart Routing - Route computation with real-time traffic, tolls, and alternative routes
π Precise Geocoding - Forward and reverse geocoding with international support
π Geolocation Services - IP-based and WiFi/cellular location estimation
π Rich Resources - Built-in documentation and examples accessible via MCP resources
π Security First - Input validation, rate limiting, and secure API key handling
Related MCP server: MCP Google Maps
Quick Start
1. Get Google Maps API Key
Visit the Google Cloud Console
Create a new project or select an existing one
Enable the required APIs (see API requirements by tool below)
Create an API key and restrict it to the enabled APIs
Important: This server uses the new Google Maps Platform APIs (Places API (New) and Routes API), not the legacy versions
API Requirements by Tool
Tool | Required Google Cloud Console API |
| Geocoding API |
| Places API (New) |
| Routes API |
| Elevation API |
| Time Zone API |
| Geolocation API |
| Roads API |
| Geolocation API + Places API (New) |
2. Configure MCP Client
Add the server to your MCP client configuration:
Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json or through Command Palette > Open MCP Settings > New MCP Server):
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": ["-y", "google-maps-mcp-server"],
"env": {
"GOOGLE_MAPS_API_KEY": "your-api-key-here"
}
}
}
}With custom rate limiting:
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": ["-y", "google-maps-mcp-server"],
"env": {
"GOOGLE_MAPS_API_KEY": "your-api-key-here",
"GOOGLE_MAPS_RATE_LIMIT_ENABLED": "true",
"GOOGLE_MAPS_RATE_LIMIT_WINDOW_MS": "120000",
"GOOGLE_MAPS_RATE_LIMIT_MAX_REQUESTS": "200"
}
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": ["google-maps-mcp-server"],
"env": {
"GOOGLE_MAPS_API_KEY": "your-api-key-here"
}
}
}
}With rate limiting disabled:
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": ["google-maps-mcp-server"],
"env": {
"GOOGLE_MAPS_API_KEY": "your-api-key-here",
"GOOGLE_MAPS_RATE_LIMIT_ENABLED": "false"
}
}
}
}Other MCP Clients
# Set environment variable
export GOOGLE_MAPS_API_KEY="your-api-key-here"
# Run the server
npx google-maps-mcp-serverAvailable Tools
Geocoding
geocode_search- Convert addresses to coordinatesgeocode_reverse- Convert coordinates to addresses
Places
places_search_text- Search places with natural languageplaces_nearby- Find places within a radiusplaces_autocomplete- Get place suggestionsplaces_details- Get detailed place informationplaces_photos- Get place photo URLs
Routing
routes_compute- Calculate optimal routesroutes_matrix- Compute distance matrices
Utilities
elevation_get- Get elevation datatimezone_get- Get timezone informationgeolocation_estimate- Estimate location from WiFi/cell dataroads_nearest- Find nearest roads
Special Tools
nearby_find- Find nearby cities, towns, or POIsip_geolocate- Geolocate using IP address
Usage Examples
Find Nearby Restaurants
{
"tool": "places_nearby",
"arguments": {
"location": {"lat": 37.7749, "lng": -122.4194},
"radius_meters": 1000,
"included_types": ["restaurant"],
"max_results": 10
}
}Get Driving Directions
{
"tool": "routes_compute",
"arguments": {
"origin": {"address": "San Francisco, CA"},
"destination": {"address": "Los Angeles, CA"},
"travel_mode": "DRIVE",
"routing_preference": "TRAFFIC_AWARE"
}
}Geocode an Address
{
"tool": "geocode_search",
"arguments": {
"query": "1600 Amphitheatre Parkway, Mountain View, CA",
"language": "en"
}
}Geolocate by IP Address
{
"tool": "ip_geolocate",
"arguments": {
"reverse_geocode": true
}
}The ip_geolocate tool also supports an optional ip_override parameter for testing with different IP addresses:
{
"tool": "ip_geolocate",
"arguments": {
"ip_override": "8.8.8.8",
"reverse_geocode": true
}
}Note: The ip_override parameter accepts public IPv4 or IPv6 addresses. Private and reserved IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8) are rejected. The IP override is best-effort and Google's Geolocation API may not always honor the request.
Configuration
Environment Variables
GOOGLE_MAPS_API_KEY(required) - Your Google Maps Platform API key
Rate Limiting Configuration
GOOGLE_MAPS_RATE_LIMIT_ENABLED(optional, default:true) - Enable/disable rate limitingSet to
falseto disable rate limiting entirely
GOOGLE_MAPS_RATE_LIMIT_WINDOW_MS(optional, default:60000) - Rate limit window in millisecondsControls the time window for rate limiting (e.g., 60000 = 1 minute)
GOOGLE_MAPS_RATE_LIMIT_MAX_REQUESTS(optional, default:100) - Maximum requests per windowMaximum number of requests allowed per endpoint within the time window
Example Rate Limiting Configurations
# Default rate limiting (100 requests per minute per endpoint)
GOOGLE_MAPS_API_KEY="your-api-key-here"
# Disable rate limiting entirely
GOOGLE_MAPS_API_KEY="your-api-key-here"
GOOGLE_MAPS_RATE_LIMIT_ENABLED=false
# Custom rate limiting (200 requests per 2 minutes per endpoint)
GOOGLE_MAPS_API_KEY="your-api-key-here"
GOOGLE_MAPS_RATE_LIMIT_WINDOW_MS=120000
GOOGLE_MAPS_RATE_LIMIT_MAX_REQUESTS=200
# Stricter rate limiting (50 requests per 30 seconds per endpoint)
GOOGLE_MAPS_API_KEY="your-api-key-here"
GOOGLE_MAPS_RATE_LIMIT_WINDOW_MS=30000
GOOGLE_MAPS_RATE_LIMIT_MAX_REQUESTS=50API Quotas and Billing
This server uses Google Maps Platform APIs which require billing to be enabled. Monitor your usage in the Google Cloud Console to avoid unexpected charges. Consider implementing usage limits in your application.
Resources
The server provides built-in MCP resources with documentation and examples:
google-maps://docs/api-overview- API overview and capabilitiesgoogle-maps://docs/place-types- Complete place types referencegoogle-maps://docs/travel-modes- Available travel modesgoogle-maps://docs/field-masks- Places API field optimizationgoogle-maps://examples/common-queries- Example queries and patterns
Access these through your MCP client's resource interface.
Development
Building from Source
git clone <repository-url>
cd google-maps-mcp-server
npm install
npm run buildTesting
npm testUsing MCP Inspector
npm run build
GOOGLE_MAPS_API_KEY="your-api-key-here" npx @modelcontextprotocol/inspector ./dist/index.jsError Handling
The server returns structured errors with helpful context:
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "API quota exceeded",
"context": {
"endpoint": "/places/textsearch",
"status": 429
}
}
}Common error codes:
INVALID_REQUEST- Invalid input parametersAPI_KEY_INVALID- Invalid or missing API keyQUOTA_EXCEEDED- API quota exceededREQUEST_FAILED- Network or API request failed
Security
API keys are never logged or exposed
Input validation prevents injection attacks
Rate limiting protects against abuse
IP addresses are hashed in logs for privacy
Contributing
Contributions are welcome! Please submit pull requests to our GitHub repository.
License
MIT License - see LICENSE file for details.
Available Tools
15 toolselevation_getB
Get elevation data for locations or along a path
Inputs: path, samples, locations.
geocode_reverseB
Convert geographic coordinates (latitude/longitude) into human-readable addresses with detailed address components. Useful for location-based services and mapping applications.
Inputs: lat (required), lng (required), language.
geocode_searchA
Convert addresses, place names, or landmarks into geographic coordinates (latitude/longitude). Supports region biasing and multiple languages for accurate global geocoding.
Inputs: query (required), region, language.
geolocation_estimateB
Estimate location from WiFi/cell data using Google Geolocation API
Inputs: cell_towers, consider_ip, wifi_access_points.
ip_geolocateA
Estimate geographic location using IP address through Google's Geolocation API. Provides approximate location with accuracy radius and optional reverse geocoding for address details.
Inputs: language, ip_override, reverse_geocode.
nearby_findA
Discover nearby cities, towns, or points of interest from any location or address. Automatically calculates distances and sorts results by proximity. Supports both coordinate and address-based searches.
Inputs: what (required), origin (required), region, language, +3 more.
places_autocompleteC
Get place suggestions for autocomplete
Inputs: input (required), region, language, location_bias, +2 more.
places_detailsC
Get detailed information about a place
Inputs: place_id (required), fields, region, language, +1 more.
places_nearbyC
Discover places within a specified radius of a geographic location. Perfect for finding restaurants, shops, services, and attractions near a specific point of interest.
Inputs: location (required), radius_meters (required), region, language, +2 more.
places_photosC
Get signed photo URLs for a place
Inputs: photo_reference (required), max_width, max_height.
places_search_textB
Search for places using natural language queries with advanced filtering options. Supports place type filtering, rating thresholds, price levels, location biasing, and real-time availability status.
Inputs: query (required), region, language, open_now, +7 more.
roads_nearestC
Find nearest roads to given points
Inputs: points (required), travel_mode.
routes_computeB
Calculate optimal routes between locations with real-time traffic data, toll information, and alternative route options. Supports multiple travel modes including driving, walking, cycling, and transit.
Inputs: origin (required), destination (required), units, region, +8 more.
routes_matrixB
Compute distance matrix between multiple origins and destinations
Inputs: origins (required), destinations (required), units, region, +3 more.
timezone_getC
Get timezone information for a location
Inputs: lat (required), lng (required), language, timestamp.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 15 tools
Most tools have distinct purposes, but 'nearby_find' and 'places_nearby' both discover nearby places, causing potential confusion. Descriptions help differentiate, but there is some overlap.
Names follow a consistent verb_noun pattern with underscores, though some are action-first (e.g., elevation_get) and others domain-first (e.g., geocode_reverse). Overall pattern is predictable.
15 tools cover a wide range of Google Maps API functionalities including geocoding, places, routes, elevation, and timezone. The count is well-scoped for the domain.
The tool set covers major Google Maps API categories comprehensively, including directions, distance matrix, places, geocoding, and more. No obvious gaps for typical use cases.
Maintenance
Related MCP Connectors
Google Maps MCP Pack β geocoding, places, directions, distance matrix, elevation. Uses Google Mapsβ¦
Hosted MCP for live place search, geocoding & turn-by-turn routes. No Maps API key to manage.
Geoapify MCP β wraps the Geoapify Location Platform (geoapify.com)
Real-time Google Maps local business leads, reviews, places & emails MCP. OAuth or API key.
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides access to Google Maps API functionality including geocoding, place search, direction routing, and distance calculations through a structured MCP interface.419 npmMIT
- AlicenseAqualityBmaintenanceProvides access to Google Maps API functionality including places search, geocoding, directions, distance matrix, elevation data, and static map generation through the MCP interface.820 npm1MIT
- AlicenseNot gradedqualityDmaintenanceProvides MCP tools for Google Maps services including directions, geocoding, distance matrix, and places search.13Apache 2.0
- FlicenseNot gradedqualityDmaintenanceComprehensive MCP server for Google Maps APIs, enabling geocoding, place search and details, distance matrix, elevation, and directions through natural language.6-