MCP

Use maps_geocode first to turn an address into coordinates

For people who need an address resolved into coordinates, a formatted address, or a place_id, but you must first bring your own Google Maps API key and start the service with npx; the current excerpt only fully documents maps_geocode input and output, so do not invent other tool names.

Official source · server-google-maps

Install

"command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-google-maps"],

Who it is for

If you already have a Google Maps API key and want to turn an address into coordinates in an MCP conversation, this server fits. Officially it is an MCP Server for the Google Maps API.

It is not for environments that still have no key. The excerpt requires creating a key from the Google docs at https://developers.google.com/maps/documentation/javascript/get-api-key#create-api-keys . The config variable name is GOOGLE_MAPS_API_KEY; fill in your own key and do not copy any example placeholder value.

The only tool fully specified in the current excerpt is maps_geocode: input address (string), returns location, formatted_address, place_id. Other capabilities do not appear in this excerpt; do not invent tool names. This is a geocode read and still calls the Google Maps API; do not treat it as having no network or no privacy boundary.

First try in 3 minutes

First get your own key from the docs above. The official recommended main path is to start with npx in the MCP config; do not also take the Docker path in parallel:

"command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-google-maps"],

In the same config's environment variables, set GOOGLE_MAPS_API_KEY to your real key. Put this block in the MCP client config location you are already using; the excerpt does not lock a filename. Save and reload.

The first time, call only maps_geocode with an address string you already have. Do not invent parameter names that never appear. The success signal is a return of location, formatted_address, and place_id, not a message that GOOGLE_MAPS_API_KEY is missing or that npx cannot start @modelcontextprotocol/server-google-maps.

Use cases

Case 1: turn an address into coordinates. The excerpt says maps_geocode is used to Convert address to coordinates, the input is an address string, and the return includes location. You should submit your own address. What can be verified is the location field; further coordinate-format detail is not written into the excerpt.

Case 2: from the same geocode, get a standardized address and a place identifier. The excerpt says the return also includes formatted_address and place_id. On success you should see a normalized address and a place_id, not only a set of coordinates. What you can do next with those fields is not given as a next tool in the current excerpt, so do not treat a never-appearing details query as proven.

Both cases sit on maps_geocode; they only take coordinates versus formatted_address/place_id. The current excerpt has no second named tool.

Boundaries

The main path is npx -y @modelcontextprotocol/server-google-maps, plus setting GOOGLE_MAPS_API_KEY. The excerpt also shows a docker run image mcp/google-maps that likewise needs that environment variable; that is a competing install path, so do not use it in parallel on the first try.

The official page is https://github.com/modelcontextprotocol/servers-archived/tree/main/src/google-maps . Key-creation notes are at https://developers.google.com/maps/documentation/javascript/get-api-key#create-api-keys . Do not write an example placeholder key into the config. Do not invent tool names, route planning, or quota numbers that never appear.