Docs menu
Applies to MapGopher v1.9.3

MCP tool reference

Last updated

Generated from MapGopher v1.9.3's MCP server: 13 tools, 3 prompts and 4 resources, captured 2026-11-06 (UTC).

Tools

Listed in the order an agent typically uses them: the scan workflow first, then the supporting tools alphabetically. Parameters with Required: No may be omitted or passed as null (shown as type | null).

start_scan

Start a Google Maps scan across every keyword x location combination. Returns IMMEDIATELY with a scan_id while the scan runs in the background. Poll get_scan_status to watch per-combo progress — results become queryable per combo as each one completes. Requires a valid license.

Parameters

NameTypeRequiredDescription
concurrencyinteger | nullNoParallel detail scrapers per combo (1-8, default 3; higher risks Google blocks — values outside 1-8 are rejected)
keywordsstring[]YesSearch terms to scan, e.g. ["dentist", "orthodontist"]
locationsstring[]YesLocations to scan each keyword in, e.g. ["Austin, TX", "Dallas, TX"]
proxy_urlstring | nullNoOptional proxy URL (http://host:port, https://host:port or socks5://host:port) for this scan — overrides the saved app setting
scrape_emailsboolean | nullNoAlso visit each business website to find an email address and social profiles — Facebook/Instagram/LinkedIn/X (much slower; socials + email validation only collected when true; email validation uses DNS MX lookups and falls back to a public resolver if system DNS is unavailable)
scrape_phone_typeboolean | nullNoAlso look up phone type + carrier via Twilio (only enriches when Twilio is configured in the app; default false)

Returns

  • note string | null — Present when a requested option could not take effect (e.g. scrape_phone_type with no Twilio configured) — the scan still runs.
  • scan_id string
  • total_combos integer

get_scan_status

Scan progress: per-combo statuses (pending/running/done/failed/cancelled), result counts, total stored results, and how many results are new since your last call. Pass wait_seconds to BLOCK until the scan finishes or the timeout (max 600s) instead of polling in a loop — it returns immediately when no scan is running; without it (or 0) this is the classic instant poll. Each combo's rows become available in get_results once it reaches done.

Parameters

NameTypeRequiredDescription
wait_secondsinteger | nullNoBlock until the scan finishes or the timeout (max 600s) — poll loop replacement; returns immediately when no scan is running or wait reaches 0

Returns

  • combos object[] — Array of ComboInfo objects.
    • keyword
    • location
    • note — M5 pagination end-state note for this combo's search list (e.g. "stopped at page cap — results may be truncated"), recorded when the combo completes — absent when the list provably reached its end or no note applies.
    • results
    • status — pending | running | done | failed | cancelled
  • license object | null — Present only when the license is known to be invalid.
    • message
    • valid
  • new_results_since_last_call integer
  • running boolean
  • scan_id string | null
  • total_combos integer
  • total_results integer

summarize_results

Aggregate overview — CALL THIS FIRST, before get_results. totals_scope=cumulative_store: total, email/website/phone coverage, average rating and top categories cover ALL saved rows across scans. by_combo_scope=latest_scan_new_rows: by_combo counts only still-saved NEW rows inserted by the current/latest scan in this process; existing rows re-seen during that scan do not count. Combo counts need not sum to total, can be zero after a stopped scan, and are empty after app restart until a scan runs. The same optional filter applies to both scopes. hide_duplicates is OFF by default; true hides same-phone duplicates from this view without deleting them. clear_results empties the saved collection.

Parameters

NameTypeRequiredDescription
filterobject | nullNoOptional row filter, same shape as get_results
NameTypeRequiredDescription
category_containsstring | nullNoCase-insensitive substring the category must contain
claimedboolean | nullNotrue = only claimed listings (unknown counts as claimed — the storage default); false = only explicitly unclaimed
email_validboolean | nullNotrue = only MX-validated deliverable emails (unvalidated rows count as not-valid); false = invalid, unvalidated or missing
has_emailboolean | nullNotrue = only rows with an email, false = only rows without
has_websiteboolean | nullNotrue = only rows with a website, false = only rows without
hide_duplicatesboolean | nullNotrue = show one row per phone (the most-reviewed listing) — off by default; multi-listing businesses and broken listings stay visible when false
min_ratingnumber | nullNoMinimum rating (e.g. 4.0); rows without a rating are excluded
min_reviewsinteger | nullNoMinimum review count; rows without a count are excluded

Returns

  • avg_rating number | null — Mean rating over rated rows (None when no row has a rating).
  • by_category object[] — Top 10 categories by row count.
    • category
    • count
  • by_combo object[] — New-row counts per combo of the current/latest scan, not a breakdown of the cumulative total. Empty before this process runs a scan.
    • combo_index
    • count
    • keyword
    • location
  • by_combo_scope string — by_combo counts only still-saved NEW rows inserted by the current or latest scan in this process, after the same filter. Re-seen existing listings and earlier scans are excluded; the counts need not sum to total.
  • total integer
  • totals_scope string — All aggregate fields, including total and by_category, describe the cumulative saved collection after applying the requested filter.
  • with_email integer
  • with_phone integer
  • with_social integer — Rows carrying at least one social profile link.
  • with_website integer

get_results

Read stored results as compact rows, paginated (default 20 rows, max 200 per page). Rows are the CURRENT cumulative store across scans — clear_results empties it. Call summarize_results FIRST for totals, then page through this. Narrow with combo_index and/or filter; order with sort (name_asc | rating_desc | reviews_desc | newest_desc) applied before paging.

Parameters

NameTypeRequiredDescription
combo_indexinteger | nullNo0-based combo from get_scan_status; restricts to NEW rows inserted by that combo in the current/latest scan, excluding earlier saved and re-seen rows
filterobject | nullNoOptional row filter (has_email / has_website / email_valid / claimed / min_rating / min_reviews / category_contains / hide_duplicates)
NameTypeRequiredDescription
category_containsstring | nullNoCase-insensitive substring the category must contain
claimedboolean | nullNotrue = only claimed listings (unknown counts as claimed — the storage default); false = only explicitly unclaimed
email_validboolean | nullNotrue = only MX-validated deliverable emails (unvalidated rows count as not-valid); false = invalid, unvalidated or missing
has_emailboolean | nullNotrue = only rows with an email, false = only rows without
has_websiteboolean | nullNotrue = only rows with a website, false = only rows without
hide_duplicatesboolean | nullNotrue = show one row per phone (the most-reviewed listing) — off by default; multi-listing businesses and broken listings stay visible when false
min_ratingnumber | nullNoMinimum rating (e.g. 4.0); rows without a rating are excluded
min_reviewsinteger | nullNoMinimum review count; rows without a count are excluded
pageinteger | nullNo1-based page number (default 1)
page_sizeinteger | nullNoRows per page, 1-200 (default 20)
sortstring | nullNoSort rows before paging: name_asc | rating_desc | reviews_desc | newest_desc (rows missing the value sink last; default insertion order)

Returns

  • page integer
  • page_size integer
  • results object[] — Array of CompactRow objects.
    • address
    • category
    • claimed — Whether the business has claimed its Google Maps listing (null = unknown). The unclaimed-listing outreach angle keys off this.
    • email
    • email_valid — MX-level deliverability verdict for the email's domain (null = unvalidated or inconclusive). Only set when emails were scraped.
    • facebook — Social profile links harvested from the business website during the email crawl — only collected when scrape_emails was enabled.
    • first_seen — RFC3339 instant the row first entered the store (None for rows persisted before this field existed) — what get_new_listings filters on and newest_desc sorts by.
    • google_maps_url
    • id
    • instagram
    • linkedin
    • name
    • phone
    • place_id — Google's stable per-place feature id (`!1s0x…:0x…`) parsed out of the maps URL — a compact identity for cross-referencing rows between scans/exports without the full URL. Absent when the URL carries no token.
    • rating
    • reviews
    • twitter
    • website
  • total_matches integer — Total rows matching the filter (across all pages).

export_results

Export results to a file (csv | json | xlsx | markdown) for bulk data — use this instead of paging through get_results when you need everything. Files are written into MapGopher's OWN export directory (reported in the response path): pass a bare filename like "leads.csv", a relative path inside that directory, or omit path for a timestamped default name. The file extension must match the format (csv/json/xlsx/md). An existing file is only replaced when overwrite: true is passed. Optionally pass row_keys (google_maps_url values from result rows) to export only those rows; an optional filter then narrows that subset further (row_keys first, then filter) — note hide_duplicates can drop a row named in row_keys when it is not its phone group's primary; omit both to export everything. Requires a valid license.

Parameters

NameTypeRequiredDescription
filterobject | nullNoOptional row filter, same shape as get_results
NameTypeRequiredDescription
category_containsstring | nullNoCase-insensitive substring the category must contain
claimedboolean | nullNotrue = only claimed listings (unknown counts as claimed — the storage default); false = only explicitly unclaimed
email_validboolean | nullNotrue = only MX-validated deliverable emails (unvalidated rows count as not-valid); false = invalid, unvalidated or missing
has_emailboolean | nullNotrue = only rows with an email, false = only rows without
has_websiteboolean | nullNotrue = only rows with a website, false = only rows without
hide_duplicatesboolean | nullNotrue = show one row per phone (the most-reviewed listing) — off by default; multi-listing businesses and broken listings stay visible when false
min_ratingnumber | nullNoMinimum rating (e.g. 4.0); rows without a rating are excluded
min_reviewsinteger | nullNoMinimum review count; rows without a count are excluded
formatstringYesOutput format: csv | json | xlsx | markdown (alias: md)
overwriteboolean | nullNoSet true to overwrite an existing file at the destination — the default refuses rather than silently replacing data
pathstring | nullNoDestination file INSIDE MapGopher's export directory — bare filename (e.g. "leads.csv"), relative path inside it, or an absolute path that already points into it. The extension must match the format (csv/json/xlsx/md). Omit for a timestamped default name.
row_keysstring[] | nullNoOptional subset to export, as google_maps_url values from result rows — applied before filter (which then narrows the subset); omit to export everything

Returns

  • format string
  • path string
  • rows_written integer

clear_results

Delete ALL stored results (memory + the persisted results file). Scan-history entries remain as summaries — but the rows themselves are gone for good. DESTRUCTIVE and irreversible — call only on the user's explicit confirmation, and offer an export_results backup first. Refuses while a scan is running — call stop_scan and wait for it to wind down first. Requires confirm: true.

Parameters

NameTypeRequiredDescription
confirmbooleanYesMust be true — this wipes the ENTIRE persistent results store

Returns

  • cleared boolean

expand_radius

Expand a center + radius into a list of city names (largest first) to feed start_scan's locations — e.g. expand_radius(center: "Austin, TX", radius_miles: 25) before start_scan(keywords, locations: those cities). Runs entirely offline against the bundled GeoNames city table (Nominatim online fallback only to resolve the center itself). Not license-gated: it starts nothing, it's a pure lookup.

Parameters

NameTypeRequiredDescription
centerstringYesCenter to expand: "City, ST", "City, Country" or "lat,lng" (e.g. "Austin, TX" or "30.2672,-97.7431")
max_locationsinteger | nullNoMaximum cities returned (1-100, default 100)
min_populationinteger | nullNoMinimum city population to include (100-10,000,000; default 5000 — raise it for big-city metros, lower it for rural coverage)
radius_milesnumber | nullNoRadius around the center in miles (1-500, default 25)

Returns

  • center object — The resolved center of expand_radius (mirrors geo::RadiusCenter).
    • input — The center as it was passed in.
    • lat
    • lng
    • resolved_name — How the center was resolved ("Austin, Travis County, Texas, USA" from Nominatim, "Austin, TX" from the offline table).
    • source — geonames (offline table) | nominatim (online fallback)
  • locations string[] — City display names ("Austin, TX"), largest first — feed these to start_scan's locations.
  • note string | null — Present when truncated: how to narrow.
  • total_matched integer — DISTINCT cities inside the radius at/above the population floor — after the section dedupe, BEFORE the max_locations cap.
  • truncated boolean — true when max_locations cut the list (see `note`).

get_license_status

Report the MapGopher license state on this machine. If start_scan or export_results return a license error, call this to diagnose (it refreshes the verdict, contacting the license server when needed).

Takes no parameters.

Returns

  • expires_at integer | null
  • license_key string | null — MASKED key — last 4 characters only (`…1234`). The full license key is never emitted over MCP (see `mask_license_key`).
  • licensed boolean
  • message string
  • valid boolean

get_new_listings

Rows FIRST SEEN at or after a point in time — the monitoring primitive. since: "last_scan" resolves to the newest recorded scan's start (errors when no scan has run yet), or pass an RFC3339 timestamp. Returns compact rows (same shape as get_results) with first_seen at/after the cutoff.

Parameters

NameTypeRequiredDescription
limitinteger | nullNoRows per call, 1-200 (default 20)
offsetinteger | nullNoRows to skip before the first returned row (default 0)
sincestringYes"last_scan" (newest recorded scan's start) or an RFC3339 timestamp, e.g. 2026-10-06T00:00:00Z

Returns

  • limit integer
  • offset integer
  • results object[] — Array of CompactRow objects.
    • address
    • category
    • claimed — Whether the business has claimed its Google Maps listing (null = unknown). The unclaimed-listing outreach angle keys off this.
    • email
    • email_valid — MX-level deliverability verdict for the email's domain (null = unvalidated or inconclusive). Only set when emails were scraped.
    • facebook — Social profile links harvested from the business website during the email crawl — only collected when scrape_emails was enabled.
    • first_seen — RFC3339 instant the row first entered the store (None for rows persisted before this field existed) — what get_new_listings filters on and newest_desc sorts by.
    • google_maps_url
    • id
    • instagram
    • linkedin
    • name
    • phone
    • place_id — Google's stable per-place feature id (`!1s0x…:0x…`) parsed out of the maps URL — a compact identity for cross-referencing rows between scans/exports without the full URL. Absent when the URL carries no token.
    • rating
    • reviews
    • twitter
    • website
  • since string — The cutoff actually used (resolved from "last_scan" when given).
  • total_matches integer — Total rows first seen at/after `since` (across all pages).

get_scan_history

Recent scans, newest first — returned as {entries: [...]} with keywords, locations, counts, new_listings and status per entry. with_email = NEW rows first seen this scan that already carried an email at insert; rows re-seen this scan that GAINED an email are not counted — cumulative email totals live in summarize_results. Entries SUMMARIZE past scans; their row sets are not stored separately — a cleared results store is not restored by history (only the summaries remain). The starting point for monitoring runs — reuse a past scan's keywords/locations for repeat scans, then call get_new_listings(since: "last_scan") for the delta.

Parameters

NameTypeRequiredDescription
limitinteger | nullNoMax entries, 1-100 (default 20); newest first

Returns

  • entries object[] — Scan entries, newest first (bounded by the request's limit).
    • businesses_found
    • duration_secs
    • keywords
    • locations
    • new_listings
    • started_at — RFC3339 UTC instant the scan started.
    • status — done | cancelled | error
    • with_email — NEW rows first seen this scan that already carried an email at insert; rows re-seen this scan that GAINED an email are not counted — cumulative email totals live in summarize_results

get_settings

Report the MapGopher app settings: the default proxy URL (null when unset — start_scan's proxy_url param overrides it per scan; any embedded credentials are redacted) and the default country ISO code used for phone lookups.

Takes no parameters.

Returns

  • country_iso string — Default country for phone-type lookups (ISO 3166 alpha-2).
  • proxy_url string | null — Chrome --proxy-server value used when a scan doesn't override it (null = direct connection). Any `user:pass@` credentials are redacted to `***@` — proxy credentials must not ride into AI context via tool output.
  • scrape_emails boolean | null — Persistent scrape-emails default that seeds the GUI toggle (MCP start_scan still requires scrape_emails per call).
  • webhook_configured boolean | null — Whether a webhook URL is configured (settable via save_settings; readable only as this boolean — never the URL or secret).

save_settings

Persist app settings. proxy_url: new default proxy (empty string clears it; omitted = unchanged); country_iso: default country for phone lookups; webhook_url: scan-finished webhook (http/https, empty string clears it); webhook_secret: webhook signing secret (empty string clears it); scrape_emails: persistent default that seeds the GUI toggle — MCP start_scan still requires scrape_emails per call and defaults to false. Every field is None = unchanged. Returns the redacted saved settings — verify with get_settings.

Parameters

NameTypeRequiredDescription
country_isostring | nullNoDefault country for phone lookups (ISO 3166 alpha-2, e.g. "US")
proxy_urlstring | nullNoNew default proxy URL (http/https/socks5); empty string clears it; omitted = unchanged
scrape_emailsboolean | nullNoDefault for the scrape-emails toggle (seeds the GUI checkbox); omitted = unchanged
webhook_secretstring | nullNoWebhook signing secret (free-form); empty string clears it; omitted = unchanged
webhook_urlstring | nullNoWebhook URL notified when a scan finishes (http/https); empty string clears it; omitted = unchanged

Returns

  • country_iso string — Default country for phone-type lookups (ISO 3166 alpha-2).
  • proxy_url string | null — Chrome --proxy-server value used when a scan doesn't override it (null = direct connection). Any `user:pass@` credentials are redacted to `***@` — proxy credentials must not ride into AI context via tool output.
  • scrape_emails boolean | null — Persistent scrape-emails default that seeds the GUI toggle (MCP start_scan still requires scrape_emails per call).
  • webhook_configured boolean | null — Whether a webhook URL is configured (settable via save_settings; readable only as this boolean — never the URL or secret).

stop_scan

Stop the currently running scan (partial results already collected are kept). Returns {stopped: true} when a scan was running and the cancel flag was set, {stopped: false} when no scan is running. The scan takes a moment to actually wind down — poll get_scan_status until running is false.

Takes no parameters.

Returns

  • stopped boolean — true = a running scan was told to stop; false = nothing was running.

Prompts

Ready-made prompt templates the server advertises, which are canned versions of the workflows above.

export-clean-list

Turn the stored results into a clean, filtered contact export file for outreach (email-bearing rows, quality-sorted, written into MapGopher's export directory).

No arguments.

find-leads

Run a fresh Google Maps lead scan for a niche in a location and turn the results into an outreach-ready list (emails, socials, phones), then optionally export to a file.

Arguments

NameRequiredDescription
location Yes City or area to search in, e.g. "Austin, TX"
niche Yes Business niche or service to search for, e.g. "dentist"

monitor-niche

Re-run a niche scan and report only the NEW listings since the previous scan — the repeatable monitoring workflow.

Arguments

NameRequiredDescription
location Yes City or area to monitor, e.g. "Austin, TX"
niche Yes Business niche or service to monitor, e.g. "dentist"

Resources

Read-only data the server exposes at stable URIs.

ResourceURIDescription
Current results
current-results
mapgopher://results/current Total stored leads plus the first 25 rows in the compact result shape
App settings
settings
mapgopher://settings Saved proxy (credentials redacted), default country and MCP toggle
Scan status
scan-status
mapgopher://scan/status Live per-combo progress of the current/last scan
Scan history
scan-history
mapgopher://scan/history The last 20 finished scans, newest first

What the server tells your agent

When a client connects, the server advertises this instructions string verbatim, because it's the server's own framing of the intended workflow:

MapGopher scrapes Google Maps for business leads. Workflow: (1) start_scan with keywords + locations — returns immediately; (2) ONE get_scan_status(wait_seconds: up to 600) call blocks until every combo is done/failed/cancelled or the 600s cap passes (stop_scan aborts) — call again if it times out with running still true; prefer it over tight polling loops (client per-tool timeouts apply — many default to 300s; keep waits under yours or raise it); (3) summarize_results for an overview; (4) get_results (paginated, max 200/page, sort/filter supported); (5) export_results (csv|json|xlsx|markdown, files are written into MapGopher's own export directory — pass a bare filename like "leads.csv"; the extension must match the format and an existing file is only replaced with overwrite: true) for bulk data. get_scan_history + get_new_listings(since) track what's NEW between repeat scans; prompts find-leads / monitor-niche / export-clean-list encode the full workflows; resources mapgopher://results/current, mapgopher://scan/status, mapgopher://scan/history and mapgopher://settings are read-only peeks. Scanning and exporting require a valid license — get_license_status diagnoses problems; status and summary tools always work.