How to Add Location Intelligence to Claude Code
Claude Code handles most tasks well, but it has no built-in access to live location data. If your project involves maps, geolocation, or anything place-related, you’ve been doing the location lookups yourself and feeding results back in. AgentPatch adds Google Maps to Claude Code so it can handle those lookups directly.
Why This Matters
Location features are common enough that this comes up constantly: validating that an address is real, finding test data for a nearby search, checking what timezone a city is in, generating realistic seed data with actual coordinates. None of these require a dedicated geo project — they’re incidental to a lot of different work.
Having Maps available means Claude Code can answer those questions on its own without needing you to look things up and paste results in.
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 delivery app and need to test radius calculations with real data. You tell Claude Code:
“I need to verify our 5-mile delivery radius logic. Can you find some real restaurants in Denver’s RiNo district and their approximate coordinates so I can test the boundary cases?”
Claude Code searches Maps and uses the results:
Searching Google Maps for "restaurants RiNo district Denver"...
Here are 5 restaurants with addresses I can use to estimate coordinates:
1. Safta — 3330 Brighton Blvd | ~39.7677, -104.9735
2. Comida — 2715 17th St | ~39.7606, -104.9889
3. Dio Mio — 3264 Larimer St | ~39.7665, -104.9789
4. Hop Alley — 3500 Larimer St | ~39.7671, -104.9778
5. Biker Jim's — 2148 Larimer St | ~39.7534, -104.9861
I'll use these as test points in the radius calculation tests.
Want me to write the test cases?
Claude Code gathered real location data and connected it to the task at hand. That’s more useful than asking you to look up coordinates yourself.
Wrapping Up
With AgentPatch connected, Claude Code can handle location lookups directly during any session. Google Maps is one tool — the same config gives access to web search, news, image generation, email, and every other tool on the marketplace. Explore at agentpatch.ai.