• GEO DATA
  • LOGIC
  • REPORTS
  • HUMAN

How to identify user location from IP with your AI

Connect Geocode.xyz to your agent. Once linked, you can pass IP addresses to your AI to pull geographic data immediately.

Ask AI about this page

Short answer

How can I find a user's location using an IP address?

Give the IP address to your agent and it will use the ip_geolocation tool to return the city and country. You'll get specific geographic details for any valid IP. Here is how the data is handled.

Where the data lands.

Location outcomes.

The agent translates raw IP addresses into usable geographic information.

GEO DATA

City and country info

The agent extracts the city and country from the IP. You get clear text strings you can use in other tasks.

LOGIC

Regional filtering

Your agent can use the country code to decide if a user belongs to a specific region. This helps automate regional logic.

REPORTS

Data for your sheets

The agent can take the location results and write them into a spreadsheet or a document. This keeps your logs organized.

HUMAN

Manual review needed

If a user is on a VPN, the agent returns the location of the VPN server. You'll need to verify if that's the data you actually want.

The workflow

What your AI does when the IP arrives.

The agent handles the heavy lifting of the lookup and data extraction.

  1. Run lookup

    The agent takes the IP address and triggers the geolocation process.

    ip_geolocation
  2. Parse results

    The agent pulls the city and country out of the raw response.

    ip_geolocation
  3. Format output

    The agent turns the location data into the specific format you requested.

    ip_geolocation
  4. Finalize task

    The agent uses the location to complete your specific request or update a record.

    ip_geolocation

Try it

Copy these to start.

Use these prompts to get the agent working immediately.

Starting points

These are opening lines. Swap the bracketed IP addresses for the ones you need to check.

Geocode.xyz Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_YMP5yr72ClOYHPbkGdAG4fut8bUvsypCNjyAPgwg/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Geocode.xyz capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "geocodexyz-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_YMP5yr72ClOYHPbkGdAG4fut8bUvsypCNjyAPgwg/mcp"
    }
  }
}
Copy into chat04
  • Use ip_geolocation to find the city and country for the IP address 8.8.8.8.

  • Check the location for the IP address [insert IP] and tell me the country.

  • Look up the IP address in my customer spreadsheet and tell me where the user in row 5 is located.

  • Find the city for [insert IP] and return it as a simple list.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Geocode.xyz once, then ask.

One link is all it takes. Your login stays encrypted on our side, and you can start using the tools right away.

Connect Geocode.xyz to your AI

FAQ

How this task behaves.

  • 01

    Can the AI find a person's exact street address?

    No. The tool only provides city and country information based on the IP.

  • 02

    Does the AI store the IP addresses I provide?

    No. The agent uses the IP to perform the lookup and then follows your instructions for the data.

  • 03

    Can the AI change the user's location?

    No. This tool is for retrieving data and cannot modify network settings or user profiles.

  • 04

    What if the IP address is invalid?

    The agent will tell you it cannot find a location for that specific IP.

  • 05

    Can the AI use this to send emails?

    No. This tool only retrieves location data. You'll need a different tool to send messages.

  • More questions about Geocode.xyz? The Connector page answers them. See everything the Geocode.xyz Connector can do

Connect Geocode.xyz to Claude, Cursor, ChatGPT & more