/ Verzeichnis / Playground / Google Maps
● Offiziell modelcontextprotocol 🔑 Eigener Schlüssel nötig

Google Maps

von 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.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

google-maps.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren 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"
      ]
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

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

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

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

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

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

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: Google Maps

Plan a day-trip itinerary with realistic travel times

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

Wann einsetzen: You have 5 places you want to hit in one day and need a realistic order, with travel times.

Voraussetzungen
  • Google Maps API key with relevant APIs enabled — console.cloud.google.com → enable Geocoding, Places, Directions APIs, then create key
Ablauf
  1. Geocode all stops
    Geocode these 5 places into lat/lng: <list>. Verify each address looks right.✓ Kopiert
    → 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.✓ Kopiert
    → 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.✓ Kopiert
    → Optimized route with directions

Ergebnis: An itinerary you can actually execute, not 'sounds nice' planning.

Fallstricke
  • 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
Kombinieren mit: brave-search

Build store-locator data for a regional product

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

Wann einsetzen: You're building a 'nearest store' feature and need to seed it with real coordinates and details.

Ablauf
  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.✓ Kopiert
    → 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.✓ Kopiert
    → 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').✓ Kopiert
    → Sanity check pass; outliers flagged

Ergebnis: A clean store dataset ready to power a UI.

Fallstricke
  • 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
Kombinieren mit: filesystem

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

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

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

Ablauf
  1. Geocode the candidate
    Geocode the candidate address: '1234 Market St, San Francisco'.✓ Kopiert
    → 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.✓ Kopiert
    → Per-ZIP drive time
  3. Aggregate
    How many customers are within 15 min, 30 min, 60 min? Plot a histogram (ascii bars OK).✓ Kopiert
    → Bucketed counts that inform the decision

Ergebnis: A data-grounded answer to 'should we open here?'

Fallstricke
  • 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
Kombinieren mit: postgres · filesystem

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

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.✓ Kopiert
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.✓ Kopiert
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.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
Per-API. Default project caps but raisable.
Tokens pro Aufruf
Small; cost is monetary not tokens
Kosten in €
Pay-per-call. Geocoding $5/1k. Place Details $17/1k. Distance Matrix $5/1k elements. $200/mo free credit historically — verify current Google policy.
Tipp
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.

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: API key in env var GOOGLE_MAPS_API_KEY. Restrict the key by API and (if possible) by IP/referrer in Google Cloud console.
Datenabfluss: All calls to maps.googleapis.com
Niemals gewähren: unrestricted-everywhere keys — can be scraped from build artifacts and abused

Fehlerbehebung

Häufige Fehler und Lösungen

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.

Alternativen

Google Maps vs. andere

AlternativeWann stattdessenKompromiss
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

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen