cablate/mcp-google-map

Community
cablate
GitHubSave
285 starsUpdated 12d ago87/100v0.0.52· 12d ago

This MCP server provides 18 Google Maps tools for AI agents

This server provides 18 Google Maps tools, including geocoding, routing, place search, and weather. It enables AI agents to interact with geospatial data, plan routes, and explore locations.

What it does

  • This server provides 18 Google Maps tools, including geocoding, routing, place search, and weather.
  • It enables AI agents to interact with geospatial data, plan routes, and explore locations.

Best for

Geocoding addresses to coordinatesPlanning optimized multi-stop routesSearching for places near a locationTracking local business search rankings
About cablate/mcp-google-map

cablate/mcp-google-map is a MCP server categorised under other, google maps, routing, location data. This server provides 18 Google Maps tools, including geocoding, routing, place search, and weather. It enables AI agents to interact with geospatial data, plan routes, and explore locations.

How to install

Pick your MCP client from the Install panel on this page to get a one-click install link (Cursor, VS Code) or a ready-to-paste configuration for Claude Desktop, Claude Code, Gemini, Codex, Windsurf, and other MCP-compatible clients. No local setup required for remote servers.

License

cablate/mcp-google-map is released under the MIT license. This is a permissive open-source license, so you can freely use, modify, and distribute it — subject to its terms.

No reviews yet

Be the first to leave a review after using this server in production.

README

Refreshed 7h ago

npm version npm downloads GitHub stars license

MCP Google Maps — AI-Powered Geospatial Tools

Give your AI agent the ability to understand the physical world —
geocode, route, search, and reason about locations.

English | 繁體中文

Travel planning demo — Kyoto 2-day, Tokyo outdoor, Japan 5-day, Bangkok budget

  • 18 tools — 14 atomic + 4 composite (explore-area, plan-route, compare-places, local-rank-tracker)
  • 3 modes — stdio, StreamableHTTP, standalone exec CLI
  • Agent Skill — built-in skill definition teaches AI how to chain geo tools (skills/google-maps/)

vs Google Grounding Lite

This projectGrounding Lite
Tools183
GeocodingYesNo
Step-by-step directionsYesNo
ElevationYesNo
Distance matrixYesNo
Place detailsYesNo
TimezoneYesNo
WeatherYesYes
Air qualityYesNo
Map imagesYesNo
Composite tools (explore, plan, compare)YesNo
Open sourceMITNo
Self-hostedYesGoogle-managed only
Agent SkillYesNo

Quick Start

# stdio (Claude Desktop, Cursor, etc.)
npx @cablate/mcp-google-map --stdio

# exec CLI — no server needed
npx @cablate/mcp-google-map exec geocode '{"address":"Tokyo Tower"}'

# HTTP server
npx @cablate/mcp-google-map --port 3000 --apikey "YOUR_API_KEY"

Special Thanks

Special thanks to @junyinnnn for helping add support for streamablehttp.

Available Tools

ToolDescription
maps_search_nearbyFind places near a location by type (restaurant, cafe, hotel, etc.). Supports filtering by radius, rating, and open status.
maps_search_placesFree-text place search (e.g., "sushi restaurants in Tokyo"). Supports location bias, rating, open-now filters.
maps_place_detailsGet full details for a place by its place_id — reviews, phone, website, hours. Optional maxPhotos param returns photo URLs.
maps_geocodeConvert an address or landmark name into GPS coordinates.
maps_reverse_geocodeConvert GPS coordinates into a street address.
maps_distance_matrixCalculate travel distances and times between multiple origins and destinations.
maps_directionsGet step-by-step navigation between two points with route details.
maps_elevationGet elevation (meters above sea level) for geographic coordinates.
maps_timezoneGet timezone ID, name, UTC/DST offsets, and local time for coordinates.
maps_weatherGet current weather conditions or forecast — temperature, humidity, wind, UV, precipitation.
maps_air_qualityGet air quality index, pollutant concentrations, and health recommendations by demographic group.
maps_static_mapGenerate a map image with markers, paths, or routes — returned inline for the user to see directly.
maps_batch_geocodeGeocode up to 50 addresses in one call — returns coordinates for each.
maps_search_along_routeSearch for places along a route between two points — ranked by minimal detour time.
Composite Tools
maps_explore_areaExplore what's around a location — searches multiple place types and gets details in one call.
maps_plan_routePlan an optimized multi-stop route — uses Routes API waypoint optimization (up to 25 stops) for efficient ordering.
maps_compare_placesCompare places side-by-side — searches, gets details, and optionally calculates distances.
maps_local_rank_trackerTrack a business's local search ranking across a geographic grid — like LocalFalcon. Supports up to 3 keywords for batch scanning. Returns rank at each point, top-3 competitors, and metrics (ARP, ATRP, SoLV).

All tools are annotated with readOnlyHint: true and destructiveHint: false — MCP clients can auto-approve these without user confirmation.

Prerequisite: Enable Places API (New) and Routes API in Google Cloud Console before using place-related and routing tools.

Installation

Method 1: stdio (Recommended for most clients)

Works with Claude Desktop, Cursor, VS Code, and any MCP client that supports stdio:

{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": ["-y", "@cablate/mcp-google-map", "--stdio"],
      "env": {
        "GOOGLE_MAPS_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Reduce context usage — If you only need a subset of tools, set GOOGLE_MAPS_ENABLED_TOOLS to limit which tools are registered:

{
  "env": {
    "GOOGLE_MAPS_API_KEY": "YOUR_API_KEY",
    "GOOGLE_MAPS_ENABLED_TOOLS": "maps_geocode,maps_directions,maps_search_places"
  }
}

Omit or set to * for all 18 tools (default).

Method 2: HTTP Server

For multi-session deployments, per-request API key isolation, or remote access:

npx @cablate/mcp-google-map --port 3000 --apikey "YOUR_API_KEY"

# Bind to all interfaces for remote access (e.g. Docker, LAN)
npx @cablate/mcp-google-map --host 0.0.0.0 --port 3000 --apikey "YOUR_API_KEY"

Then configure your MCP client:

{
  "mcpServers": {
    "google-maps": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Server Information

  • Transport: stdio (--stdio) or Streamable HTTP (default)
  • Tools: 18 Google Maps tools (14 atomic + 4 composite) — filterable via GOOGLE_MAPS_ENABLED_TOOLS

CLI Exec Mode (Agent Skill)

Use tools directly without running the MCP server:

npx @cablate/mcp-google-map exec geocode '{"address":"Tokyo Tower"}'
npx @cablate/mcp-google-map exec search-places '{"query":"ramen in Tokyo"}'

All 18 tools available: geocode, reverse-geocode, search-nearby, search-places, place-details, directions, distance-matrix, elevation, timezone, weather, air-quality, static-map, batch-geocode-tool, search-along-route, explore-area, plan-route, compare-places, local-rank-tracker. See skills/google-maps/ for the agent skill definition and full parameter docs.

Batch Geocode

Geocode hundreds of addresses from a file:

npx @cablate/mcp-google-map batch-geocode -i addresses.txt -o results.json
cat addresses.txt | npx @cablate/mcp-google-map batch-geocode -i -

Input: one address per line. Output: JSON with { total, succeeded, failed, results[] }. Default concurrency: 20 parallel requests.

API Key Configuration

API keys can be provided in three ways (priority order):

  1. HTTP Headers (Highest priority)

    {
      "mcp-google-map": {
        "transport": "streamableHttp",
        "url": "http://localhost:3000/mcp",
        "headers": {
          "X-Google-Maps-API-Key": "YOUR_API_KEY"
        }
      }
    }
    
  2. Command Line

    mcp-google-map --apikey YOUR_API_KEY
    
  3. Environment Variable (.env file or command line)

    GOOGLE_MAPS_API_KEY=your_api_key_here
    MCP_SERVER_PORT=3000
    MCP_SERVER_HOST=0.0.0.0
    

Development

Local Development

# Clone the repository