How to Add Google Maps Search to Claude Code
Claude Code is built for coding tasks, but plenty of coding tasks have a location component — building a restaurant finder, scraping business data, testing a Maps integration. When you need real business listings to work with, Claude Code can now fetch them directly through AgentPatch.
Why This Matters
If you’re building anything location-aware, you eventually need real data to test against. Sample datasets go stale fast, and hardcoding fake businesses wastes time. With Google Maps available as a tool, Claude Code can look up actual businesses and use the results directly in whatever it’s building.
This also helps outside of location-specific projects. If you’re working on a project that needs to verify an address, find a timezone for a city, or look up a business’s details, Claude Code can do that inline without breaking your flow.
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 local business directory and need seed data to populate your dev database. You tell Claude Code:
“I need 5 real coffee shops in Seattle for the seed data. Can you grab them from Maps?”
Claude Code searches Maps directly:
Searching Google Maps for "coffee shops Seattle"...
Found several results. Here are 5 to use for seed data:
1. Victrola Coffee Roasters — 310 E Pike St, Seattle, WA 98122 | Rating: 4.6
2. Espresso Vivace — 532 Broadway Ave E, Seattle, WA 98102 | Rating: 4.5
3. Caffe Vita — 1005 E Pike St, Seattle, WA 98122 | Rating: 4.4
4. Lighthouse Roasters — 400 N 43rd St, Seattle, WA 98103 | Rating: 4.7
5. Elm Coffee Roasters — 240 2nd Ave Ext S, Seattle, WA 98104 | Rating: 4.6
Adding these to seed.ts now.
Claude Code fetched the data and moved straight into writing the seed file. No tab-switching, no copy-pasting from a browser.
Wrapping Up
Adding AgentPatch to Claude Code gives it live access to business and place data during any session. Google Maps is one tool — the same config unlocks web search, news, image generation, email, and every other tool on the marketplace. Visit agentpatch.ai to see what’s available.