home / mcp / google maps mcp server

Google Maps MCP Server

MCP Google Maps server that can be used by claude, cursor, chatgpt, etc. - Based on ArtixZ/MCP-Google-Maps

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bach-ai-tools-mcp-google-maps": {
      "command": "npx",
      "args": [
        "-y",
        "@bachstudio/mcp-google-maps"
      ],
      "env": {
        "CACHE_TTL": "3600",
        "DEFAULT_REGION": "US",
        "ENABLE_CACHING": "true",
        "DEFAULT_LANGUAGE": "en",
        "GOOGLE_MAPS_API_KEY": "YOUR_API_KEY",
        "MAX_REQUESTS_PER_DAY": "100000",
        "MAX_REQUESTS_PER_SECOND": "50"
      }
    }
  }
}

You can access Google Maps capabilities through a dedicated MCP server, enabling you to search places, geocode addresses, compute routes, get elevations, and generate static maps—all integrated via the MCP protocol for easy, scalable usage in your apps.

How to use

You connect to the Google Maps MCP server through your MCP client and call its endpoints as you would with other MCP services. Use the available commands to search for nearby places, fetch detailed place information, geocode addresses, reverse geocode coordinates, obtain distance matrices, request driving or walking directions, retrieve elevation data, and generate visual maps with directions. Configure your client to route requests to the MCP server and pass your Google Maps API key and preferences via the provided environment settings.

In practice, you will configure your MCP client to target the Google Maps MCP server, then issue requests corresponding to the supported actions such as searching for places near a location, looking up details for a specific place, converting addresses to coordinates or vice versa, and generating route visualizations. Your client handles the response data, allowing you to display results in your app or workflow. Keep your API key secure and respect usage limits set by the server configuration.

How to install

# Prerequisites
- You need Node.js installed on your machine
- You may also use a package manager like npm or npx

# Install the Google Maps MCP server package globally
npm install -g @bachstudio/mcp-google-maps

# Test that the MCP server runs locally
npx bachstudio-mcp-google-mmaps

Configuration and usage notes

To use the Google Maps MCP server, include the MCP server configuration in your MCP client setup. The following configuration enables the server, passes your API key, and applies sensible defaults for language, region, and rate limits.

{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": ["-y", "@bachstudio/mcp-google-maps"],
      "env": {
        "GOOGLE_MAPS_API_KEY": "your_api_key_here",
        "DEFAULT_LANGUAGE": "en",
        "DEFAULT_REGION": "US",
        "MAX_REQUESTS_PER_SECOND": "50",
        "MAX_REQUESTS_PER_DAY": "100000",
        "ENABLE_CACHING": "true",
        "CACHE_TTL": "3600"
      },
      "enabled": true
    }
  }
}

Troubleshooting and tips

Ensure your Google Maps API key is valid and has the necessary permissions for the requested endpoints. Monitor rate limits and adjust MAX_REQUESTS_PER_SECOND and MAX_REQUESTS_PER_DAY to suit your usage. If you enable caching, verify that cache TTL and storage are appropriate for your application’s latency and cost targets.

Notes

The server exposes a set of endpoints for places search, place details, geocoding, reverse geocoding, distance matrix, directions, elevation, and static map generation. Use these tools to build feature-rich maps experiences within your applications while leveraging the MCP ecosystem.

Available tools

search_nearby

Search for places near a given location or query, returning matching results with basic details and coordinates.

get_place_details

Retrieve comprehensive information about a specific place, including address, contact, ratings, and geometry.

get_geocode

Convert a physical address into geographic coordinates (latitude and longitude).

get_reverse_geocode

Convert geographic coordinates back into a human-readable address.

get_distance_matrix

Calculate distances and travel times between multiple origins and destinations.

get_directions

Obtain step-by-step directions between two points, with travel mode options.

get_elevation

Fetch elevation data for specified locations or paths.

get_map_with_directions

Generate visual maps that display routes, waypoints, and static map imagery.