# IP2Location.io — how to use (mcp.ai)

Connect your IP2Location.io account and use 5 tools for developer tools straight from your AI agent. Connect with your own API key. IP2Location.io provides a fast and accurate IP Geolocation API tool to determine a user's location and use the geolocation information in different use cases.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_ip2location_io?ms=1787293440000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `ip2location_io_bulk_ip_geolocation`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/ip2location_io`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/ip2location_io/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/ip2location_io/bulk/ip/geolocation` — Tool to retrieve geolocation information for multiple IP addresses in bulk. Use when processing up to 1000 IPs at once.
  - body: { fields?: string[], format?: string, ip_list: string[] }
- `POST https://api.mcp.ai/api/ip2location_io/domain/whois` — Tool to retrieve WHOIS information for a given domain. Use when you need domain registration and contact details via IP2WHOIS API.
  - body: { key: string, domain: string, format?: string }
- `POST https://api.mcp.ai/api/ip2location_io/get/api/key` — Tool to retrieve the configured API key. Use when authentication is needed for IP2Location.io requests.
- `POST https://api.mcp.ai/api/ip2location_io/get/ip/geolocation` — Tool to retrieve comprehensive geolocation data for an IPv4 or IPv6 address. Returns location details including country, region, city, coordinates, timezone, ISP, ASN, and proxy information.
  - body: { ip: string, lang?: string, format?: string }
- `POST https://api.mcp.ai/api/ip2location_io/ip2/whois/hosted/domain` — Tool to retrieve hosted domain names by IP address. Use when you need to list domains hosted on a given IP. Call after confirming the IP.
  - body: { ip: string, page?: integer, format?: string }

## Example prompts
- "What can I do in IP2Location.io?"
- "Show me a summary of my IP2Location.io account"

## More
- Page: https://mcp.ai/ip2location_io
- Agent spec (llms.txt): https://mcp.ai/ip2location_io/llms.txt
- Postman collection: https://mcp.ai/ip2location_io/postman.json
