# OpenCage Geocoder MCP for AI Agents AI Agent Connect

> OpenCage Geocoder lets your AI agent translate human addresses into precise latitude and longitude coordinates and vice versa. It works worldwide, pulling from multiple open sources like OpenStreetMap to ensure accuracy. If you need to map out a delivery route, find a specific landmark, or clean up a messy list of locations, this Connector handles the heavy lifting of geographic data.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_Oo9CdLqd7PdzHDJE8MP4UsAbpXEOl2GV84VNK9hD/ai-agent-connect
- **Tags:** geocoding, reverse-geocoding, maps, location-data, coordinates

## Description

This Connector connects your agent to the OpenCage Geocoding API to handle global location data without you having to manage a complex geospatial database. Instead of manually looking up coordinates or guessing where an address lands, your agent can now handle these tasks instantly. It's built for situations where precision matters, whether you're trying to pinpoint a specific store in a dense city or find the nearest road to a set of coordinates. You'll find it easy to add this to your workflow through the Vinkius catalog, where it sits alongside hundreds of other tools designed to give your agent more hands in the real world. It handles the messy parts of geographic data, like different language formats and local landmarks, so you can focus on the actual logic of your application.

## Tools

### reverse_geocode
Takes a set of coordinates and returns a formatted address with location metadata. Use this to turn raw GPS points into readable streets.

### forward_geocode
Converts a human-readable address or landmark into precise latitude and longitude coordinates. This is useful for mapping out specific points of interest.

## Prompt Examples

**Prompt:** 
```
What are the coordinates for the Eiffel Tower in Paris?
```

**Response:** 
```
I've geocoded the Eiffel Tower. The coordinates are Latitude 48.85837, Longitude 2.29448. It is located at Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France.
```

**Prompt:** 
```
What is the address at latitude 52.51627 and longitude 13.37772?
```

**Response:** 
```
The address for those coordinates is Brandenburger Tor, Pariser Platz, 10117 Berlin, Germany.
```

**Prompt:** 
```
Find 'Main Street' but only in the United Kingdom and return the result in French.
```

**Response:** 
```
Searching for 'Main Street' in the UK... I found a primary result: Main Street, Gibraltar, Royaume-Uni (Note: Gibraltar is a British Overseas Territory). Would you like to see other matches within the UK?
```

## Capabilities

### Convert addresses to coordinates
Your agent turns a street address or landmark into exact latitude and longitude.

### Turn coordinates into addresses
The agent takes raw GPS data and returns a human-readable street address.

### Get results in multiple languages
Your agent can request location data in various languages to fit local needs.

### Retrieve road information
The agent finds specific road data and nearby road matching for a location.

### Access global location data
Your agent pulls from multiple sources to cover the entire globe.

## Use Cases

### Verifying shipping addresses for delivery
A delivery driver enters a vague address. The agent uses forward_geocode to get the exact coordinates for the route.

### Turning GPS points into street names
A real estate app has a list of GPS points. The agent uses reverse_geocode to find the street names and cities.

### Cleaning messy location datasets
A data analyst has a list of 1,000 addresses in different languages. The agent cleans the list by getting standardized coordinates for each.

### Finding nearby roads for navigation
A developer wants to find the nearest road to a specific point. The agent pulls road data and attributes to help with local navigation.

## Benefits

- Get accurate coordinates for any landmark or city without leaving your workspace.
- Turn raw GPS data into readable addresses instantly for better data clarity.
- Support multiple languages to handle international location data for global users.
- Access data from diverse sources like OpenStreetMap for better global coverage.
- Get specific road attributes and matching for more precise navigation data.

## How It Works

The bottom line is your agent gets a reliable way to understand and interact with global geographic data.

1. Subscribe to the Connector via the Vinkius marketplace.
2. Enter your OpenCage API Key into the configuration.
3. Ask your agent to find coordinates, map addresses, or look up landmarks.

## Frequently Asked Questions

**Can OpenCage Geocoder handle international addresses?**
Yes, it provides global coverage by pulling from multiple sources like OpenStreetMap.

**How does OpenCage Geocoder help with logistics?**
It allows your agent to convert shipping addresses into coordinates for easier routing.

**Can I get results in different languages?**
Yes, you can specify the language format to get addresses in the local dialect.

**What is the difference between forward and reverse geocoding?**
Forward geocoding turns an address into coordinates, while reverse geocoding turns coordinates into an address.

**Can OpenCage Geocoder find nearby roads?**
It can retrieve specific road data and attributes to help with more precise location matching.

**Is OpenCage Geocoder good for cleaning data?**
It's perfect for data analysts who need to standardize a list of messy addresses into clean geographic data.

**Can I limit the search results to a specific country?**
Yes! Use the `countrycode` parameter in the `forward_geocode` tool with ISO 3166-1 alpha-2 codes (e.g., 'us' for USA, 'br' for Brazil) to restrict results to that territory.

**How do I get the address of a specific set of coordinates?**
Use the `reverse_geocode` tool by providing the `lat` (latitude) and `lng` (longitude). The agent will return the most accurate formatted address found for those coordinates.

**Can I get information about the nearest road to a location?**
Yes. By setting the `roadinfo` parameter to true in either `forward_geocode` or `reverse_geocode`, the API will attempt to match the location to the nearest road and include road-specific data in the response.