# CountryStateCity MCP for AI Agents AI Agent Connect

> CountryStateCity MCP provides a global geographic database for your AI agent. It handles ISO codes, phone numbers, state/province hierarchies, and city-level data. Use it to get precise location context and coordinates for any country or region instantly.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_84Tzke4E2WhwikYMpRcFHGTsTtK4ZRJ3G2gMigKE/ai-agent-connect
- **Tags:** geographic-data, iso-codes, location-services, global-database, address-validation

## Description

Connect a global geographic database to your AI agent to pull accurate data on countries, states, and provinces instantly. Instead of hunting through messy spreadsheets or guessing, you just ask your agent. It knows the small details too, like latitude, longitude, and local currencies. If you need to validate a list of addresses or figure out which states belong to a specific country, this handles the heavy lifting. It's one of the many tools you can access through the Vinkius catalog, making it easy to plug into your existing workflow without worrying about the backend logic. You get the right data, formatted correctly, every single time. You can pull everything from high-level country lists down to city-level granularity for specific states. It's a reliable source of truth for anyone who needs to ensure their geographic data is consistent across different regions and languages.

## Tools

### get_state
Get detailed information for a specific state or province. This provides the necessary context for regional data points.

### list_cities_by_state
Pull a complete list of cities for a given state. It's great for populating local search results or delivery zones.

### list_countries
Get a full list of all countries with their ISO codes, phone codes, and emojis. This helps you build accurate country selection menus.

### list_states
Retrieve every state or province within a specific country. Use this to map out regional divisions for any nation.

### list_cities_by_country
List every city in a country. This tool is perfect for high-level geographic mapping on the Supporter+ tier.

### get_country
Fetch specific details like coordinates and currency for a single country. Use it to get precise location metadata for your database.

## Prompt Examples

**Prompt:** 
```
List all countries and include their emojis.
```

**Response:** 
```
I've retrieved the list of countries. Here are a few:

| Country | ISO Code | Emoji |
| :--- | :--- | :--- |
| Afghanistan | AF | 🇦🇫 |
| Albania | AL | 🇦🇱 |
| Algeria | DZ | 🇩🇿 |
| Andorra | AD | 🇦🇩 |

Would you like the full list or details for a specific one?
```

**Prompt:** 
```
What are the states in India (IN)?
```

**Response:** 
```
Querying states for India... I found 36 states and territories, including:

* **Maharashtra** (MH)
* **Delhi** (DL)
* **Karnataka** (KA)
* **Tamil Nadu** (TN)

Which state would you like to explore further?
```

**Prompt:** 
```
List the cities in the state of New York (NY), US.
```

**Response:** 
```
Fetching cities for New York, United States... I've found cities such as:

* Albany
* Buffalo
* New York City
* Rochester

Do you need specific details for any of these cities?
```

## Capabilities

### Pull country lists with ISO codes
Get a full list of countries including ISO2/ISO3 codes and phone numbers.

### Find all states for a specific country
Retrieve all administrative divisions for any country in the database.

### Get city lists for states or countries
Fetch every city within a specific state or an entire country.

### Retrieve specific coordinates for locations
Get precise latitude and longitude for specific countries or states.

### Fetch local currency data for countries
Access currency information for different countries to aid in localization.

### Get country emojis for UI display
Pull the correct flag emojis for every country to use in your interface.

## Use Cases

### Populating a multi-region signup form
A developer needs a list of countries for a signup form. They ask the agent to list countries with ISO codes and emojis to populate the UI.

### Validating shipping zones for a state
A logistics lead needs to see all cities in New York. They use the state-based city tool to get a clean list for a delivery map.

### Cleaning up messy address data
An analyst has a list of California and needs to know it's a state in the US. They use the state listing tool to confirm the hierarchy.

### Fetching local currency for travel sites
A travel site needs to show local currency for 50 different countries. They use the country detail tool to pull that specific metadata quickly.

## Benefits

- Stop guessing ISO codes by pulling them directly from a verified source for your database.
- Build better UI components by pulling country emojis and phone codes automatically.
- Simplify shipping logic by mapping out entire regions and city lists for delivery.
- Clean your data faster by validating geographic hierarchies and state listings.
- Save hours of manual research by getting coordinates and currency data for any country.

## How It Works

The bottom line is you get accurate geographic data for your app without the manual research.

1. Connect your CountryStateCity API key to the Connector in your client.
2. Ask your agent to find specific locations or list regions.
3. Get back structured data like ISO codes, coordinates, or city names.

## Frequently Asked Questions

**Does CountryStateCity MCP provide ISO codes?**
Yes, it provides ISO2 and ISO3 codes for countries. This helps you build accurate database entries without manual research.

**Can I use CountryStateCity MCP to get coordinates?**
Yes, it provides latitude and longitude. You can use this to plot locations on a map or store them in your database.

**Does CountryStateCity MCP work for all countries?**
Yes, it is a global database. It covers countries, states, and cities worldwide for your projects.

**Can CountryStateCity MCP list cities by state?**
Yes, it has a specific tool for that. This makes it easy to build regional navigation or shipping lists.

**Is CountryStateCity MCP good for shipping apps?**
Yes, it helps map regions. You can verify which cities belong to which states to define your delivery zones.

**How do I get city data with CountryStateCity MCP?**
You can use the city listing tools to pull data for a specific state or country. This ensures your app has the correct regional details.

**How can I list all cities within a specific state or province?**
Use the `list_cities_by_state` tool by providing the Country ISO2 code (e.g., 'US') and the State ISO2 code (e.g., 'NY'). The agent will return a list of all cities registered in that region.

**Can I get detailed metadata like emojis and phone codes for a country?**
Yes! The `get_country` tool allows you to fetch full details for a specific country using its ISO2 code. You can also use `list_countries` with the `fields` parameter to include 'emoji' or 'phonecode' in the results.

**Is there a limit when listing all cities in a country?**
The `list_cities_by_country` tool requires a Supporter+ tier API key from CountryStateCity. For standard users, it is recommended to use `list_cities_by_state` to query cities in smaller administrative batches.