Skip to main content
Glama
Google Maps Scraper MCP Server

Google Maps Scraper MCP Server

by Elvarenti

Google Maps Scraper MCP Server & CLI

npm test license: MIT

A stdio MCP server and command-line tool for the MapExporter Google Maps API: search Google Maps places, read reviews and get public photo URLs as JSON or CSV.

Using Claude Code, Cursor, VS Code or ChatGPT? You don't need this package. Connect directly to the hosted, zero-install MCP endpoint https://mapexporter.app/mcp (Streamable HTTP, OAuth sign-in or API key). See the Google Maps Scraper MCP page.

This package is for MCP clients that only support stdio, for shell scripts and terminals, for running the server in a Docker container, or for when you want to read the source of what runs on your machine.

It is a thin, dependency-free proxy (about 300 lines of Node.js). It exposes exactly the tools of the hosted server — search_places, list_reviews and list_photos — by forwarding every tools/list and tools/call to https://mapexporter.app/mcp. Scraping, validation and quota accounting all happen on the MapExporter service; nothing runs or is cached locally.

Get an API key

Sign in and create a key (it starts with maps_) on the API dashboard, then pass it as MAPEXPORTER_API_KEY.

The Free plan includes 20 requests per month. Each successful search_places, list_reviews or list_photos call uses one request, whatever the number of pages, reviews or photos returned; failed calls are not counted. Paid plans are on the pricing page.

Listing the tools does not need a key, so MCP clients and directories can inspect the server before you sign up.

Related MCP server: Google Places MCP Server

Connect an MCP client (stdio)

Requires Node.js 18.3 or later.

Claude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json), Cline (cline_mcp_settings.json) and Windsurf (~/.codeium/windsurf/mcp_config.json) all use the same shape:

{
  "mcpServers": {
    "mapexporter": {
      "command": "npx",
      "args": ["-y", "google-maps-scraper-mcp"],
      "env": {
        "MAPEXPORTER_API_KEY": "maps_your_key"
      }
    }
  }
}

Claude Code

claude mcp add mapexporter -e MAPEXPORTER_API_KEY=maps_your_key -- npx -y google-maps-scraper-mcp

(or, without this package: claude mcp add --transport http mapexporter https://mapexporter.app/mcp)

VS Code (.vscode/mcp.json)

{
  "servers": {
    "mapexporter": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "google-maps-scraper-mcp"],
      "env": { "MAPEXPORTER_API_KEY": "maps_your_key" }
    }
  }
}

Docker

docker build -t google-maps-scraper-mcp https://github.com/Elvarenti/google-maps-scraper-mcp.git
{
  "mcpServers": {
    "mapexporter": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "MAPEXPORTER_API_KEY", "google-maps-scraper-mcp"],
      "env": { "MAPEXPORTER_API_KEY": "maps_your_key" }
    }
  }
}

Then ask in plain language, for example: "Find dentists in Austin, then show the five newest reviews of the first one."

Use it from the command line

export MAPEXPORTER_API_KEY=maps_your_key

npx -y google-maps-scraper-mcp search "coffee shop in Portland" --page 2 --csv > places.csv
npx -y google-maps-scraper-mcp reviews "<fid>" --sort-by 2
npx -y google-maps-scraper-mcp photos "<fid>" --max-results 20 --csv
npx -y google-maps-scraper-mcp tools   # print the tool schemas, no key needed

After a global install (npm i -g google-maps-scraper-mcp) the same commands are available as mapexporter search ….

  • --json (default) prints the full result as returned by the tool.

  • --csv prints the places, reviews or photos rows as CSV on stdout. Nested values become JSON text, lists are joined with ; , and cells that start like a spreadsheet formula are prefixed with '. The remaining fields (partial, warnings, next_cursor, returned_count, …) go to stderr as one JSON line, so you can still page through reviews.

  • Exit codes: 0 success, 1 API or tool error (message on stderr), 2 usage error.

The fid (0x…:0x…) of a place is returned by search. For a single Google Maps URL, the free Place ID Finder shows it in the browser.

Tools

The authoritative schemas are whatever tools/list returns (npx -y google-maps-scraper-mcp tools); this table mirrors them. Unknown arguments are rejected.

search_places

Search Google Maps places. CLI: search <q>.

Argument

Type

Default

Notes

q

string, 1–300 chars

required

Search query, e.g. pizza in Brooklyn

page

integer 1–10

1

Number of result pages to collect (about 20 places each), not a page index

hl

string

en

Language

ll

string

—

Map viewport @lat,lng,zoom, zoom an integer 1–21

extra

boolean

false

Visit each business website to add emails and medias (social profiles); slower, best effort

Returns places[], partial and warnings[]. Each place includes fields such as name, fid, place_id, full_address, phone, website, categories, average_rating, review_count, opening_hours, latitude, longitude and google_maps_url.

list_reviews

Read one page of public reviews for a place. CLI: reviews <fid>.

Argument

Type

Default

Notes

fid

string 0x…:0x…

required

From search_places

cursor

string

—

next_cursor from the previous call; keep fid, sort_by and hl the same

sort_by

1, 2, 3 or 4

1

1 most relevant, 2 newest, 3 highest rating, 4 lowest rating

hl

string

en

Language

Returns reviews[] and next_cursor (null on the last page).

list_photos

Public photo URLs of a place. CLI: photos <fid>.

Argument

Type

Default

Notes

fid

string 0x…:0x…

required

From search_places

max_results

integer ≥ 1

200

Upper limit for this delivery; reaching it is not guaranteed

Returns photos[{url}], returned_count, reported_total (the count Google reports, or null), status (always partial: a complete album is not guaranteed) and reason.

Configuration

Variable

Default

Purpose

MAPEXPORTER_API_KEY

—

API key, sent as Authorization: Bearer. Required for tool calls, not for initialize or tools/list

MAPEXPORTER_MCP_URL

https://mapexporter.app/mcp

Remote MCP endpoint to forward to

Requests carry the header User-Agent: google-maps-scraper-mcp/<version>.

Development

git clone https://github.com/Elvarenti/google-maps-scraper-mcp.git
cd google-maps-scraper-mcp
npm test                  # node:test, no dependencies to install
node src/cli.js tools     # run from source

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers