MCP Server for the Google Maps API.

Tools

  1. maps_geocode
  2. Convert address to coordinates
  3. Input: address (string)
  4. Returns: location, formatted_address, place_id

  5. maps_reverse_geocode

  6. Convert coordinates to address
  7. Inputs:
    • latitude (number)
    • longitude (number)
  8. Returns: formatted_address, place_id, address_components

  9. maps_search_places

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

  13. maps_place_details

  14. Get detailed information about a place
  15. Input: place_id (string)
  16. Returns: name, address, contact info, ratings, reviews, opening hours

  17. maps_distance_matrix

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

  21. maps_elevation

  22. Get elevation data for locations
  23. Input: locations (array of {latitude, longitude})
  24. Returns: elevation data for each point

  25. maps_directions

  26. Get directions between points
  27. Inputs:
    • origin (string)
    • destination (string)
    • mode (optional): "driving" | "walking" | "bicycling" | "transit"
  28. 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>"
      }
    }
  }
}

Build

Docker build:

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

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

[
  {
    "description": "Convert an address into geographic coordinates",
    "inputSchema": {
      "properties": {
        "address": {
          "description": "The address to geocode",
          "type": "string"
        }
      },
      "required": [
        "address"
      ],
      "type": "object"
    },
    "name": "maps_geocode"
  },
  {
    "description": "Convert coordinates into an address",
    "inputSchema": {
      "properties": {
        "latitude": {
          "description": "Latitude coordinate",
          "type": "number"
        },
        "longitude": {
          "description": "Longitude coordinate",
          "type": "number"
        }
      },
      "required": [
        "latitude",
        "longitude"
      ],
      "type": "object"
    },
    "name": "maps_reverse_geocode"
  },
  {
    "description": "Search for places using Google Places API",
    "inputSchema": {
      "properties": {
        "location": {
          "description": "Optional center point for the search",
          "properties": {
            "latitude": {
              "type": "number"
            },
            "longitude": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "query": {
          "description": "Search query",
          "type": "string"
        },
        "radius": {
          "description": "Search radius in meters (max 50000)",
          "type": "number"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "name": "maps_search_places"
  },
  {
    "description": "Get detailed information about a specific place",
    "inputSchema": {
      "properties": {
        "place_id": {
          "description": "The place ID to get details for",
          "type": "string"
        }
      },
      "required": [
        "place_id"
      ],
      "type": "object"
    },
    "name": "maps_place_details"
  },
  {
    "description": "Calculate travel distance and time for multiple origins and destinations",
    "inputSchema": {
      "properties": {
        "destinations": {
          "description": "Array of destination addresses or coordinates",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mode": {
          "description": "Travel mode (driving, walking, bicycling, transit)",
          "enum": [
            "driving",
            "walking",
            "bicycling",
            "transit"
          ],
          "type": "string"
        },
        "origins": {
          "description": "Array of origin addresses or coordinates",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "origins",
        "destinations"
      ],
      "type": "object"
    },
    "name": "maps_distance_matrix"
  },
  {
    "description": "Get elevation data for locations on the earth",
    "inputSchema": {
      "properties": {
        "locations": {
          "description": "Array of locations to get elevation for",
          "items": {
            "properties": {
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              }
            },
            "required": [
              "latitude",
              "longitude"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "locations"
      ],
      "type": "object"
    },
    "name": "maps_elevation"
  },
  {
    "description": "Get directions between two points",
    "inputSchema": {
      "properties": {
        "destination": {
          "description": "Ending point address or coordinates",
          "type": "string"
        },
        "mode": {
          "description": "Travel mode (driving, walking, bicycling, transit)",
          "enum": [
            "driving",
            "walking",
            "bicycling",
            "transit"
          ],
          "type": "string"
        },
        "origin": {
          "description": "Starting point address or coordinates",
          "type": "string"
        }
      },
      "required": [
        "origin",
        "destination"
      ],
      "type": "object"
    },
    "name": "maps_directions"
  }
]