Repository avatar
Other Tools
v0.1.0
active

placegraph-mcp

io.github.0xlearner/placegraph-mcp

Google Maps as a knowledge graph: competitor clusters, territory leads, site selection, reviews.

Documentation

placegraph-mcp

An MCP server that turns Google Maps into a knowledge graph of the businesses in an area: who customers compare, which leads trail their competitors, how busy a trade area is, who answers their reviews, and how Maps places join to your own records.

The edges come from Google's own "People also search for" panel, the list of places Google shows next to a business because people look at them together. Keyword search and star ratings can't tell you that two businesses are substitutes. This list can.

One run gives you a map of who your real competitors are, according to Google itself.

Data comes from the Google Maps Full Suite actor on Apify. It runs on your Apify account and you pay per result (see Costs). The server itself is free and open source.

What you can ask

Use caseAsk your assistantTools
Competitive knowledge graph"Which coffee shops in Austin do customers actually compare, and how do they cluster?"competitor_graph, alternatives, export_graph
Territory leads with competitor context"Find every dentist within 10 km of downtown Austin and show me the ones that trail their competitors."territory_leads, enrich_leads, find_places
Footfall-aware site selection"Should our new gym go on South Lamar or West Anderson Lane?"site_selection, walk_times
Review response tracking"Which of these 12 locations aren't replying to bad reviews?"review_responses
Graph-backed recommendations"Best dentist open after 7 pm near downtown, and what else people consider"find_places, alternatives
Entity resolution"Match these CRM accounts to their Google Maps listings"match_entities

Coverage by country: measured in 33 countries (every continent and script), checked weekly in five more on rotation.

Worked examples: one per use case, run from a plain prompt in Claude Code, with the tools it picked, its answer and the Apify cost ($0 to $0.47 each).

Example: Austin coffee shops (December 2026)

30 coffee shops, up to 24 "people also search for" places each: 209 places, 491 edges, 8 communities (modularity 0.50).

  • Category anchors, the places listed in the most panels: Houndstooth Coffee (11), Palomino Coffee, Radio Coffee & Beer, CaPhe.in (10 each), Proud Mary, Flightpath, Epoch (9 each).
  • Communities: a specialty/third-wave cluster (Houndstooth, Epoch, Proud Mary, Radio), an "iconic South Congress" cluster (Mozart's, Jo's, Bouldin Creek), and neighbourhood groups. Google never labels them; the graph shows them.
  • 7 of the 30 shops had no panel at all. Not every place has one.

Example: Austin dentists

A grid search (2 km cells, 10 km radius, 25 cells) found 411 unique places inside the circle (362 of them dental), where a single Google Maps search stops at about 120. Of the 190 dental practices with 50+ reviews, 13 are rated below 4.5. enrich_leads compares each of them with the places Google lists next to it. For example, a 4.5-star practice whose competitors have a median of 4.9 gets a high outreach score.

Directories

Listed in the official MCP Registry (io.github.0xlearner/placegraph-mcp) and on Glama:

placegraph MCP server on Glama

On Glama you can browse the tools, check the server's quality score, and try it online in the MCP Inspector before installing.

Install

You need an Apify API token. A free Apify account includes monthly credit.

Hosted (no install). The server runs on Cloudflare Workers at https://placegraph-mcp.rhat398.workers.dev/mcp (Streamable HTTP). Send your Apify token as a bearer header; it's used for that request only and never stored or logged:

claude mcp add --transport http placegraph https://placegraph-mcp.rhat398.workers.dev/mcp \
  --header "Authorization: Bearer apify_api_..."

Clients that can't set headers (claude.ai custom connectors, which use OAuth) aren't supported yet. Or run it locally:

Claude Code

claude mcp add placegraph -e APIFY_TOKEN=apify_api_... -- npx -y github:0xlearner/placegraph-mcp

Claude Desktop, Cursor, VS Code (mcpServers config):

{
  "mcpServers": {
    "placegraph": {
      "command": "npx",
      "args": ["-y", "github:0xlearner/placegraph-mcp"],
      "env": { "APIFY_TOKEN": "apify_api_..." }
    }
  }
}

Tip: create a token in Apify that is limited to running this actor and reading its datasets.

Not on npm yet: npx builds it from GitHub on first use (Node 20+). Or clone it, npm install, and point the config at node /path/to/placegraph-mcp/dist/stdio.js.

Tools

ToolWhat it doesStarts runs
competitor_graphSearch a category in an area. The result is a graph of the places listed under "People also search for", with its anchors (in-degree) and communities (Louvain).yes
territory_leadsGrid search past the ~120-per-search cap. Returns a summary, the lowest-rated leads and join-key coverage.yes
enrich_leadsAdds each lead's competitors from a territory job and scores the lead: rating gap, review share, outreach score.yes
site_selectionFor each candidate address: nearby competitors, distance, rating, popular times (hourly busyness), a saturation index, and competitors shared between candidates.yes
walk_timesWalking, driving or cycling time from each candidate to its nearest competitors.yes
review_responsesReply rate, reply rate on low ratings, response-time buckets, and unanswered low-rated reviews.yes
job_statusA job's status. Once its runs finish, the job's analysis.no
find_placesFilter a job's places: text, category, rating, reviews, website/phone, open at a time of day, distance.no
alternativesA place's neighbours in the graph (1-2 hops): what customers consider instead.no
match_entitiesMatch your records to a job's places on place id, phone, website domain, street address and name. A shared phone or domain is reported as ambiguous instead of guessed.no
export_graphExport the graph as cypher (Neo4j), graphml (Gephi, yEd), json or mermaid; focus_place_id exports one place's neighbourhood.no

Jobs. Collecting data takes minutes. A tool that starts runs waits up to wait_s seconds (default 45). If the runs aren't done by then, it returns a job_id, and job_status(job_id) returns the result once they finish. Job ids are self-contained: they work in a later conversation too, for as long as Apify keeps the run's data (your Apify plan's data retention).

Costs

Every tool that starts runs shows its estimate first and refuses to start above max_cost_usd (default $5). Each run is also capped at its estimate on Apify's side. Measured in December 2026 unless marked:

TaskTimeCost
Competitor graph: 30 places, up to 24 competitors each~10 min~$1.60
Competitor graph: 30 places, 10 competitors each (default)—up to ~$1.00 (estimate)
Grid: 411 places in 10 km, 25 cells~11 min~$0.90
Grid: 56 places in 3 km around downtown, 8 cells~4 min~$0.16
Enrich 20 leads, 10 competitors each~5 min~$0.48
Site selection, per candidate (nearby + wider search, popular times)~3-5 min~$0.14-0.17
Walking time, per route~10 s~$0.006
Review responses: 5 locations x 100 reviews~1 min~$0.26

find_places, alternatives, match_entities and export_graph cost nothing: they reuse a finished job's data.

Load the graph into Neo4j

export_graph(job_id, format: "cypher")

Paste the output into Neo4j Browser (AuraDB Free works), then:

MATCH (a:Place)-[r:PEOPLE_ALSO_SEARCH]->(b:Place) RETURN a, r, b

Colour the nodes by community and size them by listed_by.

Good to know

  • "People also search for" isn't shown for every place. Typically 20-30% have none on a given day, and Google varies the list from day to day. A graph is a snapshot.
  • Off-category places. Panels sometimes list places of other kinds, such as a bar next to a coffee shop or an office next to a dentist. These are left out of the analysis unless you pass include_off_category.
  • Popular times exist for roughly two in three established businesses, and not for new ones. Site selection reports the coverage for each candidate.
  • Response times are approximate. Google gives a review's date exactly, but the owner's reply only as "3 weeks ago". Latency is therefore reported in buckets (same day, within a week, within a month, later), and as uncertain when it can't be pinned to one.
  • Other cities' branches. A chain's panel can list its branches elsewhere. Entries more than 50 km from the place listing them are left out of the graph (pas_far_dropped counts them).
  • Vacation rentals that show up in nearby searches (e.g. "Studio with gym and pool") are dropped from site selection.
  • Hosted server limits. The hosted endpoint runs on Cloudflare's free plan, which gives each call a small CPU and request budget. Over it, tools degrade instead of failing: graphs over 600 links come back without clusters (anchors, alternatives and exports still work), match_entities takes 100 rows per call, job_status may answer "still running" sooner, and a call that would start more runs than one request can handle asks you to split it. The local server (npx) has no such limits.
  • The data is what Google Maps shows publicly. You're responsible for using it in line with applicable laws and Google's terms.

Development

npm install
npm test            # offline: fixtures from real runs, reviewer data removed
npm run build
APIFY_TOKEN=... node scripts/live-smoke.mjs   # live, small runs (~$0.30)
APIFY_TOKEN=... node scripts/country-check.mjs --countries=JP,BR   # live coverage check (~$0.01 a country)

License

Apache-2.0

No installation packages available.