Building a Local Business Finder with Claude Code

If you’re building a local business finder — or any location-aware feature — you need real data to develop and test against. Claude Code can now pull that data directly from Google Maps through AgentPatch, without you leaving the terminal.

Why This Matters

Location features fail in non-obvious ways: weird edge cases with sparse results, businesses that lack ratings, addresses that don’t geocode cleanly. You won’t find those issues with fake data. Real Maps results expose them early.

Getting a Google Maps API key is doable, but it involves setting up a GCP project, enabling the right APIs, configuring billing, and managing the key securely. AgentPatch gives Claude Code Maps access through the same single config you use for everything else.

Setup

Install the AgentPatch CLI (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Then use it:

ap search "web search"
ap run agentpatch google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Run this command to add AgentPatch as an MCP server:

claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Claude Code discovers all AgentPatch tools automatically.

Example

You’re building a business directory app and want to test how the listing page renders with realistic data. You tell Claude Code:

“I need some real gym listings in Chicago to test the business card component. Grab a few from Maps.”

Claude Code searches Maps and uses the results:

Searching Google Maps for "gym Chicago"...

Got several results. Using these for the test fixtures:

1. Equinox Lincoln Park — 1750 N Clark St | 4.2★ | Open 24 hours
2. XSport Fitness River North — 435 N Michigan Ave | 3.9★ | 5am–11pm
3. Midtown Athletic Club — 2444 N Elston Ave | 4.5★ | 5am–10pm

Adding to fixtures/businesses.ts now. Want me to test the card component renders them correctly?

Claude Code fetched real listings, dropped them into your fixture file, and moved right into testing. That’s a better workflow than searching Maps manually, copying data, and formatting it yourself.

Wrapping Up

With AgentPatch connected, Claude Code can pull real business data from Google Maps during any session. That’s one tool on the marketplace — the same config also unlocks web search, news, email, image generation, and more. Explore the full list at agentpatch.ai.