/ Annuaire / Playground / Google Maps
● Officiel modelcontextprotocol 🔑 Nécessite votre clé

Google Maps

par modelcontextprotocol · modelcontextprotocol/servers-archived

Geocoding, place search, directions, distance matrix — Google Maps power for itineraries, store-locator features, and regional analyses.

The reference Google Maps MCP (now in modelcontextprotocol/servers-archived). Wraps key Maps APIs: geocoding, place search and details, directions, distance matrix, elevation. Useful for any agent task that needs real-world geography. Note: archived means no active maintenance — plan for community forks long-term.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

google-maps.replay ▶ prêt
0/0

Installer

Choisissez votre client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-google-maps"
      ]
    }
  }
}

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-google-maps"
      ]
    }
  }
}

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-google-maps"
      ]
    }
  }
}

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-google-maps"
      ]
    }
  }
}

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "google-maps",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-google-maps"
      ]
    }
  ]
}

Continue utilise un tableau d'objets serveur plutôt qu'une map.

~/.config/zed/settings.json
{
  "context_servers": {
    "google-maps": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/server-google-maps"
        ]
      }
    }
  }
}

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

claude mcp add google-maps -- npx -y @modelcontextprotocol/server-google-maps

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : Google Maps

Plan a day-trip itinerary with realistic travel times

👤 Travelers, anyone planning a multi-stop day ⏱ ~10 min beginner

Quand l'utiliser : You have 5 places you want to hit in one day and need a realistic order, with travel times.

Prérequis
  • Google Maps API key with relevant APIs enabled — console.cloud.google.com → enable Geocoding, Places, Directions APIs, then create key
Déroulement
  1. Geocode all stops
    Geocode these 5 places into lat/lng: <list>. Verify each address looks right.✓ Copié
    → 5 coordinates with confidence
  2. Compute distance matrix
    Get drive times between every pair of stops at 10am on a weekday. Show as a matrix.✓ Copié
    → 5×5 time matrix
  3. Order and add directions
    Suggest the order that minimizes total drive time. Then give me turn-by-turn directions stop-to-stop.✓ Copié
    → Optimized route with directions

Résultat : An itinerary you can actually execute, not 'sounds nice' planning.

Pièges
  • Distance matrix doesn't account for parking time / walk to door — Pad each leg by 10-15 min for parking; longer for downtown destinations
  • Real-time traffic only available for certain modes/regions — Use departure_time to get traffic-aware estimates; 'now' may be excluded depending on plan
Combiner avec : brave-search

Build store-locator data for a regional product

👤 Devs implementing a 'find a location' feature ⏱ ~30 min intermediate

Quand l'utiliser : You're building a 'nearest store' feature and need to seed it with real coordinates and details.

Déroulement
  1. Geocode each store address
    I have a CSV of 50 store addresses at /data/stores.csv. Geocode each, return a new CSV with added lat, lng, place_id, and Google's normalized address.✓ Copié
    → Enriched CSV; flag any addresses that didn't geocode cleanly
  2. Pull rich details for each
    For each place_id, fetch hours, phone, website. Add to the CSV.✓ Copié
    → Per-store details, with missing-data flags where applicable
  3. Validate sample
    Pick 5 random rows and verify the geocoded coords visually look right (e.g. 'Stockholm address geocoded to Sweden, not Wisconsin').✓ Copié
    → Sanity check pass; outliers flagged

Résultat : A clean store dataset ready to power a UI.

Pièges
  • Geocoding API has per-call cost — 50 addresses is a few cents but 50k is real money — Cache results aggressively; only re-geocode when address strings change
Combiner avec : filesystem

Find which of your customers live within X minutes of a candidate location

👤 Ops, real-estate, growth analysts ⏱ ~25 min advanced

Quand l'utiliser : You're evaluating a new store/office location and want to know how many existing customers it would serve.

Déroulement
  1. Geocode the candidate
    Geocode the candidate address: '1234 Market St, San Francisco'.✓ Copié
    → Coordinate confirmed
  2. Distance matrix to customer ZIPs
    From the candidate, compute drive time to each of these 100 customer ZIP centroids: <list>. Use 9am weekday.✓ Copié
    → Per-ZIP drive time
  3. Aggregate
    How many customers are within 15 min, 30 min, 60 min? Plot a histogram (ascii bars OK).✓ Copié
    → Bucketed counts that inform the decision

Résultat : A data-grounded answer to 'should we open here?'

Pièges
  • ZIP centroid is a poor proxy for actual customer addresses — If you have actual addresses, use them; centroids skew suburban analyses
  • Distance matrix limits batch size — Google caps origins×destinations per call; chunk into multiple requests, but you'll pay per element either way
Combiner avec : postgres · filesystem

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

google-maps + filesystem

Bulk-geocode a CSV and write the enriched file back

Read /data/customers.csv, geocode each address, write /data/customers_geo.csv with added lat/lng/place_id columns.✓ Copié
google-maps + postgres

Geocode customer rows during onboarding

For every row in customers where lat IS NULL, geocode the address and update the row. Stop after 500 to manage cost.✓ Copié
google-maps + brave-search

Brave finds candidate places → Google Maps gets the geocode + directions

Brave-search 'best ramen Mission SF'. For the top 3, get place_ids and walking directions from 16th St BART.✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
maps_geocode address: str Address → coordinates $5 / 1000 calls
maps_reverse_geocode lat: number, lng: number Coordinates → address $5 / 1000 calls
maps_search_places query: str, location?, radius? Find places by name/category near a point $17-32 / 1000 (text search) or less for nearby
maps_place_details place_id: str Hydrate one place with full details $17 / 1000 base + add-ons per field
maps_distance_matrix origins[], destinations[], mode?, departure_time? Bulk distance/time between many points $5 / 1000 elements (origin×destination)
maps_directions origin, destination, mode?, waypoints? Turn-by-turn for one route $5 / 1000 calls
maps_elevation locations: [{lat, lng}] Elevation profile for a path or points $5 / 1000 calls

Coût et limites

Coût d'exécution

Quota d'API
Per-API. Default project caps but raisable.
Tokens par appel
Small; cost is monetary not tokens
Monétaire
Pay-per-call. Geocoding $5/1k. Place Details $17/1k. Distance Matrix $5/1k elements. $200/mo free credit historically — verify current Google policy.
Astuce
Cache geocoded addresses indefinitely (they don't change). Distance matrix is the easy way to blow $50 in one prompt — always compute origins × destinations before calling.

Sécurité

Permissions, secrets, portée

Stockage des identifiants : API key in env var GOOGLE_MAPS_API_KEY. Restrict the key by API and (if possible) by IP/referrer in Google Cloud console.
Sortie de données : All calls to maps.googleapis.com
Ne jamais accorder : unrestricted-everywhere keys — can be scraped from build artifacts and abused

Dépannage

Erreurs courantes et correctifs

REQUEST_DENIED

API not enabled for your key, or billing not configured. Enable each API (Geocoding, Places, Directions) in Cloud console and set up billing.

OVER_QUERY_LIMIT

You hit the per-second or per-day cap. Add throttling; raise quota in Cloud console if needed.

ZERO_RESULTS on geocode

Address ambiguous or doesn't exist as written. Try adding country/state, or use Place Autocomplete instead.

Distance matrix INVALID_REQUEST

Check origins×destinations doesn't exceed the per-call element limit (varies by plan). Chunk the request.

Alternatives

Google Maps vs autres

AlternativeQuand l'utiliserCompromis
OpenStreetMap (Nominatim) via fetchFree, no API key, willing to self-rate-limit and accept lower data qualitySparser POI data; usage policy for Nominatim restricts heavy use
Mapbox via custom MCPYou want a managed alternative with often better pricing for high volumeNo first-party MCP yet
HERE / TomTom APIs via custom MCPRouting/POI in regions where Google is weakNo first-party MCP

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills