MCP Server Archived reference

Google Maps

MCP server exposing Google Maps API tools for geocoding, place search and details, directions, distance matrix, and elevation, run via NPX or Docker.

docker build -t mcp/google-maps -f src/google-maps/Dockerfile .
Google Maps preview image

What it is

The Google Maps MCP Server is an MCP server for the Google Maps API. It provides seven tools: geocoding, reverse geocoding, place search, place details, distance matrix, elevation, and directions. It can be configured in Claude Desktop or VS Code using either NPX or Docker, and it authenticates with a Google Maps API key. The repository is in the archived servers repo and is MIT licensed.

Who it's for

  • Developers who want an MCP client such as Claude Desktop or VS Code to look up addresses, places, and routes
  • Users who already have or can create a Google Maps API key
  • Teams that want to share a VS Code MCP configuration via .vscode/mcp.json

Requirements

Requirements

  • A Google Maps API key, provided via the GOOGLE_MAPS_API_KEY environment variable
  • Either Node.js with NPX (to run @modelcontextprotocol/server-google-maps) or Docker (to run mcp/google-maps)
  • An MCP client such as Claude Desktop or VS Code

Setup

  1. Get a Google Maps API key

    Create an API key by following the Google Maps documentation linked in the README (https://developers.google.com/maps/documentation/javascript/get-api-key#create-api-keys).

  2. Claude Desktop with NPX

    Add this block to your claude_desktop_config.json, replacing <YOUR_API_KEY> with your key.

    json
    {
      "mcpServers": {
        "google-maps": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-google-maps"],
          "env": {
            "GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
          }
        }
      }
    }
  3. Claude Desktop with Docker

    Alternatively, add this block to your claude_desktop_config.json to run the server in Docker.

    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>"
          }
        }
      }
    }
  4. VS Code manual install (NPX)

    Add this to your User Settings (JSON) file (open it with Ctrl + Shift + P and 'Preferences: Open User Settings (JSON)'). Optionally put it in .vscode/mcp.json in your workspace, where the mcp key is not needed.

    json
    {
      "mcp": {
        "inputs": [
          {
            "type": "promptString",
            "id": "maps_api_key",
            "description": "Google Maps API Key",
            "password": true
          }
        ],
        "servers": {
          "google-maps": {
            "command": "npx",
            "args": ["-y", "@modelcontextprotocol/server-google-maps"],
            "env": {
              "GOOGLE_MAPS_API_KEY": "${input:maps_api_key}"
            }
          }
        }
      }
    }
  5. Build the Docker image

    To build the Docker image locally, run this command.

    bash
    docker build -t mcp/google-maps -f src/google-maps/Dockerfile .

Examples

Geocode an address

Prompt
prompt
Use maps_geocode with address set to an address string.

Expected output: The maps_geocode tool takes an address (string) and returns location, formatted_address, and place_id.

Get directions

Prompt
prompt
Use maps_directions with origin, destination, and optionally mode set to "driving", "walking", "bicycling", or "transit".

Expected output: Returns route details with steps, distance, and duration.

Search nearby places

Prompt
prompt
Use maps_search_places with query, and optionally location { latitude, longitude } and radius in meters (max 50000).

Expected output: Returns an array of places with names, addresses, and locations. The place_id can then be passed to maps_place_details for contact info, ratings, reviews, and opening hours.

Compare travel times

Prompt
prompt
Use maps_distance_matrix with origins (string[]), destinations (string[]), and optional mode.

Expected output: Returns a matrix of distances and durations between the given origins and destinations.

Pros & cons

Pros

  • Pro:Covers seven Google Maps capabilities: geocoding, reverse geocoding, place search, place details, distance matrix, elevation, and directions
  • Pro:Supports both NPX and Docker setups, with documented configs for Claude Desktop and VS Code
  • Pro:VS Code config uses a password-type input prompt for the API key rather than hardcoding it
  • Pro:MIT licensed

Cons

  • Con:Requires a Google Maps API key to be obtained and configured
  • Con:Located in the servers-archived repository, indicating it is no longer in the active servers repo
  • Con:README documents only tool inputs and outputs, with no usage examples or troubleshooting guidance

Images