MCP Connector

Connect AI agents to Google Maps API for location data

MCP connector providing AI agents with 7 Google Maps API tools for geocoding, place search, directions, distances, and elevation data.

Works with google maps

35
Spark score
out of 100
Updated May 2025
Source checked Sep 10, 2026
Version 1.0.0

Add to Favorites

Why it matters

Enable AI agents to access comprehensive Google Maps functionality including geocoding, place search, directions, distance calculations, and elevation data through a standardized MCP interface.

Outcomes

What it gets done

01

Convert addresses to coordinates and vice versa with geocoding and reverse geocoding

02

Search for places by text query and retrieve detailed business information including ratings and reviews

03

Calculate travel distances and durations between multiple points across different transportation modes

04

Get turn-by-turn directions and elevation data for route planning and geographic analysis

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Overview

Google Maps

This MCP server exposes seven Google Maps API tools to AI clients: geocoding (address to coordinates), reverse geocoding (coordinates to address), place search with optional radius filtering, detailed place information including ratings and hours, distance and duration matrices across transport modes, elevation data for coordinate arrays, and turn-by-turn directions. Use it when your AI application needs to resolve physical locations, find nearby businesses, calculate travel routes or times, or enrich geographic data with elevation or place details. It fits trip planning, delivery optimization, location-based recommendations, and any workflow translating between addresses and coordinates.

What it does

The Google Maps MCP Server connects AI clients to the Google Maps API through seven specialized tools. It converts addresses to coordinates and back, searches for places, retrieves detailed business information including ratings and reviews, calculates travel distances and times across multiple transport modes, fetches elevation data, and generates turn-by-turn directions.

When to use - and when NOT to

Use this connector when your AI workflow needs to resolve physical addresses, calculate routes or travel times, find nearby businesses, or enrich location data with elevation or place details. It fits applications like trip planning assistants, delivery route optimization, location-based recommendations, or any system that translates between human-readable addresses and geographic coordinates.

When NOT to use: The upstream repository is archived and no longer actively maintained by its owner. Do not use this connector for production systems requiring ongoing support, security patches, or compatibility updates. Avoid it if your use case requires Google Maps features not exposed by the seven available tools.

Inputs and outputs

You provide a Google Maps API key as an environment variable. Individual tools accept:

  • maps_geocode: address string; returns coordinates, formatted address, place ID
  • maps_reverse_geocode: latitude and longitude numbers; returns formatted address, place ID, address components
  • maps_search_places: query string, optional location object, optional radius in meters (max 50000); returns array of places with names, addresses, locations
  • maps_place_details: place_id string; returns name, address, contact info, ratings, reviews, opening hours
  • maps_distance_matrix: arrays of origin and destination strings, optional mode (driving/walking/bicycling/transit); returns distances and durations matrix
  • maps_elevation: array of location objects with latitude/longitude; returns elevation data for each point
  • maps_directions: origin and destination strings, optional mode; returns route details with steps, distance, duration

Integrations

The connector integrates with:

  • Claude Desktop: via Docker or NPX, configured in claude_desktop_config.json
  • VS Code / VS Code Insiders: manual configuration in User Settings (JSON) or workspace .vscode/mcp.json file, with one-click install buttons for NPX and Docker deployment
  • Docker: pre-built mcp/google-maps image for containerized environments
  • NPX: direct execution via @modelcontextprotocol/server-google-maps package

Configuration example

{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-google-maps"],
      "env": {
        "GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Who it's for

Developers building AI assistants that handle location queries, travel planning, or local business discovery. Product teams prototyping location-aware features without custom API integration code. Data engineers enriching datasets with geographic coordinates, elevation, or place metadata. Researchers experimenting with spatial reasoning in LLM applications where the Google Maps API provides the necessary ground truth.

Source README

Google Maps MCP Server

MCP Server for the Google Maps API.

Tools

  1. maps_geocode

    • Convert address to coordinates
    • Input: address (string)
    • Returns: location, formatted_address, place_id
  2. maps_reverse_geocode

    • Convert coordinates to address
    • Inputs:
      • latitude (number)
      • longitude (number)
    • Returns: formatted_address, place_id, address_components
  3. maps_search_places

    • Search for places using text query
    • Inputs:
      • query (string)
      • location (optional): { latitude: number, longitude: number }
      • radius (optional): number (meters, max 50000)
    • Returns: array of places with names, addresses, locations
  4. maps_place_details

    • Get detailed information about a place
    • Input: place_id (string)
    • Returns: name, address, contact info, ratings, reviews, opening hours
  5. maps_distance_matrix

    • Calculate distances and times between points
    • Inputs:
      • origins (string[])
      • destinations (string[])
      • mode (optional): "driving" | "walking" | "bicycling" | "transit"
    • Returns: distances and durations matrix
  6. maps_elevation

    • Get elevation data for locations
    • Input: locations (array of {latitude, longitude})
    • Returns: elevation data for each point
  7. maps_directions

    • Get directions between points
    • Inputs:
      • origin (string)
      • destination (string)
      • mode (optional): "driving" | "walking" | "bicycling" | "transit"
    • Returns: route details with steps, distance, duration

Setup

API Key

Get a Google Maps API key by following the instructions here.

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

Docker
{
  "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>"
      }
    }
  }
}

NPX

{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-google-maps"],
      "env": {
        "GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Usage with VS Code

For quick installation, use one of the one-click install buttons below...

Install with NPX in VS Code Install with NPX in VS Code Insiders

Install with Docker in VS Code Install with Docker in VS Code Insiders

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

{
  "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}"
        }
      }
    }
  }
}

For Docker installation:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "maps_api_key",
        "description": "Google Maps API Key",
        "password": true
      }
    ],
    "servers": {
      "google-maps": {
        "command": "docker",
        "args": ["run", "-i", "--rm", "mcp/google-maps"],
        "env": {
          "GOOGLE_MAPS_API_KEY": "${input:maps_api_key}"
        }
      }
    }
  }
}

Build

Docker build:

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

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.