- VALID
- MISMATCH
- INVALID
- REVIEW
Short answer
How can I use AI to check if my city, state, and country names are correct?
Your AI uses hierarchical lookups to confirm that a city belongs to a specific state and that state belongs to the right country. It catches typos and mismatches by pulling real data. You'll get a clean list of valid locations and a set of errors to fix.
Data outcomes
Where every issue lands.
The AI categorizes every row in your dataset based on its accuracy.
VALID
Confirmed matches
The AI finds exact matches for the city, state, and country. These rows are ready for use.
MISMATCH
Hierarchy errors
The AI flags rows where the city is in the wrong state or the state is in the wrong country. You'll see exactly where the chain breaks.
INVALID
Unrecognized names
The AI identifies names that don't exist in the database. These are likely typos or fake entries.
REVIEW
Human intervention
Ambiguous entries that don't clearly match a single location go here. You decide if these are correct or need manual fixing.
The workflow
What your AI does when the data arrives.
The AI treats your dataset as a series of checks, moving from the largest region down to the specific city.
Identify the country
The AI looks up the provided country name to establish the top level of the hierarchy.
get_countryVerify the state
Once the country is set, the AI checks if the state exists within that specific nation.
get_stateConfirm the city
The AI pulls a list of valid cities for that state to see if your city name is actually on the list.
list_cities_by_stateFlag the errors
The AI compares its findings against your original text and marks any discrepancies.
get_countryget_statelist_cities_by_state
Try it
Copy these to start.
Use these prompts to kick off the validation process.
Starting points
Swap the bracketed text for your actual file names or data sources.
CountryStateCity Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_84Tzke4E2WhwikYMpRcFHGTsTtK4ZRJ3G2gMigKE/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — CountryStateCity capabilities are ready to use.
{
"mcpServers": {
"countrystatecity-mcp": {
"url": "https://edge.vinkius.com/vk_preview_84Tzke4E2WhwikYMpRcFHGTsTtK4ZRJ3G2gMigKE/mcp"
}
}
}Check the location data in my spreadsheet for any city/state mismatches.
Validate the address list in this CSV and flag any invalid country names.
Look through my contact list and tell me if any cities are in the wrong state.
Verify the geographic hierarchy for the rows in this text block.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect CountryStateCity once, then ask.
Just link the MCP to your client. Your credentials stay encrypted, and you can start asking questions immediately.
Connect CountryStateCity to your AIFAQ
How this task behaves.
- 01
Can the AI fix the typos in my spreadsheet automatically?
No. The AI identifies the errors and tells you what they are, but you must perform the actual edits in your file.
- 02
Does the AI delete any of my original data?
No. The AI only reads your data to perform lookups. It has no permission to modify or delete your files.
- 03
What happens if a city name is spelled correctly but is in the wrong state?
The AI will flag it as a mismatch because the city won't appear in the list of valid cities for that specific state.
- 04
Can I use this to validate international addresses?
Yes, as long as the country, state, and city names are present in the database provided by the tools.
- 05
How does the AI know if a state belongs to a country?
It uses the hierarchical lookup tools to verify that the state is a valid child of the country you provided.
More questions about CountryStateCity? The Connector page answers them. See everything the CountryStateCity Connector can do
Connect CountryStateCity to Claude, Cursor, ChatGPT & more
