# LocationIQ MCP

> LocationIQ (Geocoding & Maps) connects your AI agent to professional mapping services. It lets you convert addresses into GPS coordinates, calculate driving or cycling routes between points, and find human-readable street addresses from raw latitude and longitude data, all through conversation.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** geocoding, routing, reverse-geocoding, location-intelligence, maps-api

## Description

Need to know where an address is, how far it is, or the best way to drive there? This MCP turns your AI client into a full mapping service. You can ask your agent to take a vague location name and get precise coordinates instantly. Need to calculate optimal paths for a delivery fleet? Just describe the start and end points, and the agent figures out the distance matrix for you. If you only have raw GPS numbers, this MCP translates them back into formatted street addresses with postal details. It also helps clean up messy data by snapping inaccurate signals right onto the nearest road network. Because Vinkius hosts all 4,000+ available tools in one catalog, you can connect your preferred AI client and instantly access top-tier geospatial intelligence without needing dozens of separate API keys.

## Tools

### search_autocomplete
The agent provides a list of suggested locations when you type out the beginning of an address or city name.

### check_account_balance
You verify how many location requests are left on your account to prevent unexpected usage limits.

### calculate_directions
It calculates the best path and travel time when moving by driving, walking, or cycling between two coordinates.

### calculate_distance_matrix
You generate a table that shows the travel duration and distance for many different start points going to many end points.

### snap_nearest_roads
The agent corrects slightly off GPS data by aligning it perfectly with the nearest physical road segment.

### reverse_geocode
It converts raw latitude and longitude coordinates into a standard, human-readable postal address.

### reverse_language_bias
The agent performs reverse geocoding while translating the resulting full address into your desired language.

### search_geocode
You convert a specific, typed-out street address string directly into its corresponding latitude and longitude coordinates.

### search_bounding_box
It restricts location searches so results only appear within a defined geographical map rectangle.

### search_country_filter
The agent ensures that all search results are limited to addresses within specific country codes.

## Prompt Examples

**Prompt:** 
```
Find the coordinates for the 'Eiffel Tower' in Paris
```

**Response:** 
```
Resolving address… I've found the Eiffel Tower at latitude 48.8584 and longitude 2.2945. The address is 5 Avenue Anatole France, 75007 Paris, France. Would you like me to find nearby hotels?
```

**Prompt:** 
```
What is the best driving route from Lisbon to Porto?
```

**Response:** 
```
Calculating directions… The optimal route via A1 is approximately 312 km and will take about 2 hours and 55 minutes with current traffic. I can provide the detailed turn-by-turn instructions if you'd like.
```

**Prompt:** 
```
Check my remaining LocationIQ request balance
```

**Response:** 
```
Retrieving balance… You have 4,850 requests remaining out of your 5,000 daily limit. Your account is in good standing. Would you like me to perform any more geocoding lookups?
```

## Capabilities

### Convert Addresses to Coordinates
The agent takes a street address (like '1600 Pennsylvania Avenue') and returns the exact latitude and longitude.

### Calculate Optimal Routes
It determines the best driving, walking, or cycling path between two or more points, including estimated travel time.

### Find Addresses from Coordinates
The agent converts raw latitude and longitude numbers back into complete, readable street addresses with postal data.

### Map Distance Between Multiple Points
It calculates a table showing the travel time and distance between multiple origins and destinations at once.

### Clean Up GPS Data
The agent takes slightly inaccurate GPS readings and snaps them perfectly to the actual street grid for accurate tracking.

## Use Cases

### Optimizing Delivery Routes
A logistics manager needs to know the quickest way to service 15 different client sites across a city. Instead of manually mapping every segment, they ask their agent to calculate a distance matrix for all points, saving hours of planning time.

### Cleaning Dirty Data
A data analyst receives a spreadsheet with thousands of GPS coordinates that are slightly off due to poor signal. They prompt the agent to run `snap_nearest_roads` across the whole batch, ensuring every point is accurately tied to an actual street.

### Developing Location Search Features
A developer wants a user-friendly search box on their site. They use `search_autocomplete` so that as the user types 'New Yor...', the agent immediately suggests valid city and neighborhood options, improving accuracy.

### International Address Validation
A global sales team needs to verify if a client's recorded coordinates match their physical address in France. They use `reverse_geocode` combined with the language bias tool to get the precise local street address and translation.

## Benefits

- Stop guessing coordinates. Use `search_geocode` to turn any address string into guaranteed, accurate GPS numbers in a single conversation.
- Tired of manual routing? The MCP calculates optimal paths using `calculate_directions`, giving you the best driving or walking route instantly.
- Clean up messy data batches. If your dataset has slightly inaccurate GPS signals, use `snap_nearest_roads` to snap everything onto the real street network.
- Build better logistics planning with `calculate_distance_matrix`. Instead of running ten separate searches, you get a single table comparing multiple routes at once.
- Turn raw data into actionable intelligence. Use `reverse_geocode` to instantly convert coordinates back into full street addresses and postal codes for your records.

## How It Works

The bottom line is that your AI client handles all the complex mapping calculations so you don't have to write any code.

1. Subscribe to this MCP on Vinkius and enter your unique LocationIQ API Key.
2. Your AI client accesses the tool via natural conversation, telling it what location task you need (e.g., 'What's the route from A to B?').
3. The agent uses the necessary functions in the background and gives you a clear, conversational answer with all the map data.

## Frequently Asked Questions

**How do I use LocationIQ (Geocoding & Maps) to find coordinates for an address?**
Use `search_geocode`. Simply tell your agent the full street address and it returns precise latitude and longitude numbers immediately.

**Can I calculate routes with LocationIQ (Geocoding & Maps)?**
Yes, use `calculate_directions`. Just specify the two points and the mode of travel—driving, walking, or cycling—and it gives you the optimal path.

**What if my coordinates are inaccurate?**
If your GPS data is messy, run `snap_nearest_roads`. This tool fixes the signal by aligning the point perfectly to the actual street network.

**How does LocationIQ (Geocoding & Maps) handle multiple stops?**
Use `calculate_distance_matrix`. You list all your origins and destinations, and it computes a comprehensive table of travel times and distances between every pair.

**Does this MCP help with international addresses?**
Yes. Besides general searching, you can use `reverse_language_bias` to get the full street address converted into specific native language tags for global accuracy.