MCP Server
Connect your AI agent to Iploc's IP geolocation in one line of config.
Quick start
{ "mcpServers": { "iploc": { "url": "https://api.iploc.ai/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } }}Setup Guide
Config file location:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
claude_desktop_config.json
{ "mcpServers": { "iploc": { "url": "https://api.iploc.ai/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } }}Setup steps:
- Get a free API key from your dashboard
- Open the config file at the path above
- Paste the JSON config, replacing
YOUR_API_KEY - Restart Claude Desktop
Available Tools
7 tools available through the MCP server. All geolocation tools are included on every plan.
| Tool | Description | Tier |
|---|---|---|
ip_lookup | Full geolocation for any IP address | All |
my_ip | Look up the caller's own IP geolocation | All |
batch_lookup | Look up multiple IPs at once | All |
is_vpn | VPN, proxy, Tor, and bot detection | Pro+ |
ip_to_country | Country code only (lightweight) | All |
distance | Geographic distance between two IPs | All |
analyze_ips | Aggregate statistics for IP lists | Pro+ |
Example Prompts
Once connected, ask your AI agent any of these in natural language:
“Where is 8.8.8.8 located?”
Get full geolocation data for Google's DNS server
“Is 1.2.3.4 a VPN?”
Check if an IP is behind a VPN, proxy, or Tor
“How far apart are 8.8.8.8 and 1.1.1.1?”
Calculate geographic distance between two IPs
“Analyze these IPs and tell me which countries they're from: 8.8.8.8, 1.1.1.1, 9.9.9.9, 208.67.222.222”
Batch analyze IPs with aggregate country statistics
Get Started for Free
Free tier includes 1,000 requests per day, all geolocation fields, and full MCP access. No credit card required.
What Is MCP (Model Context Protocol)?
The Model Context Protocol (MCP) is an open standard that lets AI agents connect to external tools and data sources. Instead of copying and pasting data into chat windows, MCP allows your AI assistant to directly query APIs, databases, and services on your behalf. Think of it as a universal plugin system for AI — one config file, and your agent gains new capabilities.
MCP was introduced by Anthropic and has been adopted by Claude Desktop, Claude Code, Cursor, Windsurf, ChatGPT, and a growing ecosystem of AI-powered development tools. It uses a simple client-server architecture where the AI agent (client) connects to tool servers that expose capabilities through a standardized interface.
Why IP Geolocation for AI Agents?
AI agents increasingly need real-world context to be useful. When an agent is analyzing logs, investigating security incidents, building analytics dashboards, or debugging network issues, it needs to know where IP addresses are located. Without MCP, you'd have to manually look up each IP and paste the results back into the conversation. With Iploc's MCP server, your agent can look up any IP address instantly and use the geolocation data in its reasoning.
Common use cases include security analysis (identifying the origin of suspicious traffic), DevOps automation (verifying CDN routing and server locations), compliance checking (ensuring data residency requirements are met), and fraud detection (comparing user-claimed locations with actual IP geolocation). The VPN detection tool is particularly useful for security workflows where agents need to identify anonymized traffic.
How the Iploc MCP Server Works
Iploc's MCP server uses the Streamable HTTP transport, which means it works over standard HTTPS connections — no local processes, no Docker containers, no stdio pipes. You add the server URL and your API key to your client's config file, and the connection is established automatically when your AI agent starts.
The server exposes 7 tools that your agent can call through natural language. When you ask “Where is 8.8.8.8?”, your AI agent recognizes this as an IP geolocation query, calls the ip_lookup tool, and presents the results in a readable format. All lookups run against Iploc's fused multi-source database, which combines data from multiple free geolocation providers for better accuracy than any single source. For basic IP information, try the IP Lookup tool or check What Is My IP for your own address.
Iploc vs Other IP Geolocation APIs for MCP
Iploc is the first IP geolocation API with native MCP support built in. While other providers require custom wrapper scripts or third-party integrations, Iploc's MCP server is a first-class feature — same infrastructure, same speed, same data. Sub-millisecond lookups mean your agent gets instant responses, and the fused multi-source database ensures accuracy beyond what any single provider can offer.
All geolocation fields are available on every plan, including the free tier. There's no feature gating — you get country, region, city, postal code, coordinates, timezone, ISP, ASN, and connection type on every lookup. Premium detection features (VPN, proxy, Tor, bot) are available on Pro plans and above. For network-level investigation, pair MCP lookups with DNS lookups or ASN lookups for comprehensive analysis.