IPinfo MCP Server
The IPinfo MCP Server gives AI assistants and MCP-compatible developer tools direct access to IP address intelligence from IPinfo. You can connect clients such as Claude Desktop, VS Code, Cursor, LM Studio, Gemini CLI, Claude Code, and Codex CLI to query geolocation, ASN, privacy, residential proxy, and quota data.
Point your MCP client to this URL:
https://mcp.ipinfo.io/
Client Setup
Paste your IPinfo token into the examples below to configure the server in your MCP client.
Code-Focused MCP Clients
Install the server in VS Code or add it manually to .vscode/mcp.json.
Full Instructions: https://community.ipinfo.io/t/using-the-official-ipinfo-mcp-server-in-vs-code/7255
Requires VS Code 1.99+
{
"servers": {
"ipinfo": {
"type": "http",
"url": "https://mcp.ipinfo.io/",
"headers": {
"Authorization": "Bearer <IPINFO_TOKEN>"
}
}
}
}
General MCP Clients
Use MCPB (a helper app for adding remote MCP servers) or add the server manually to claude_desktop_config.json.
- macOS:
~/Library/Application Support/Claude/ - Windows:
%APPDATA%/Claude/ - Linux:
~/.config/Claude/
Full Instructions: https://community.ipinfo.io/t/using-the-official-ipinfo-mcp-server-in-claude-desktop/7261
{
"mcpServers": {
"ipinfo": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.ipinfo.io/",
"--header",
"Authorization: Bearer <IPINFO_TOKEN>"
]
}
}
}
Restart Claude Desktop after saving.
Tools
Available Tools
The MCP server exposes the following IPinfo tools.
ipinfo_lookup
Geolocation, network, and metadata for IP addresses. Set detailed=true for city-level geolocation, privacy flags, and richer ASN data.
ipinfo_geolocate
Geographic location data for one or more IP addresses. The free tier returns country and continent, while detailed=true adds city, region, coordinates, timezone, and postal code.
ipinfo_asn
Autonomous system and network ownership information, including ASN, organization name, and domain. Set detailed=true for network type such as ISP, hosting, business, or education.
ipinfo_check_privacy
Checks whether IP addresses use VPN, proxy, relay, or Tor. Also includes flags for anycast, hosting, mobile, and satellite networks.
ipinfo_check_residential_proxy
Detects residential proxy usage and returns the proxy service name, last seen date, and observation frequency.
ipinfo_quota
Returns API usage and remaining quota, including daily and monthly counts, plan limits, and remaining requests.
Tool Selection Quick Guide
Use this mapping to choose the right tool for the user intent.
| User Intent | Recommended Tool | Notes |
|---|---|---|
| Full IP profile (geo + network + privacy flags) | ipinfo_lookup | Use detailed=true for city-level + richer fields |
| Country/continent only | ipinfo_geolocate | Default mode is lightweight |
| City/region/coordinates/timezone | ipinfo_geolocate | Requires detailed=true |
| ASN and owner/network details | ipinfo_asn | Use detailed=true for network type |
| VPN/proxy/Tor/anonymity checks | ipinfo_check_privacy | Paid feature |
| Residential proxy checks | ipinfo_check_residential_proxy | Paid feature/add-on |
| Usage and quota | ipinfo_quota | No pagination |
Usage Guidance
Prompting Best Practices
- Include the exact tool name in the prompt.
- Specify required output fields explicitly.
- If city-level output is needed, require
detailed=true. - When applicable, require
validation_errorsto be returned. - For large inputs on paginated tools, require pagination completion (
page_size<=1000and iterate all pages).
Example template:
Use exactly <tool_name> for these IPs: [IPs].
Return fields: [field list].
When applicable, also return validation_errors and pagination metadata.
If error=true, map code to recovery action.
Prompt Scenario Table
Use this quick-reference table to improve prompt quality when working with AI assistants and the IPinfo MCP tools.
| Wrong Prompt | Likely Result | Advice | Correct Prompt |
|---|---|---|---|
| Tell me about this IP: 8.8.8.8 | Ambiguous request. The assistant may return only one data dimension such as location or ASN. | Specify the exact tool and fields you need. | Use ipinfo_lookup with detailed=true for 8.8.8.8. Return geolocation, ASN, privacy flags, and validation_errors. |
| Is this IP suspicious? | Subjective output without consistent checks. | Replace vague wording with measurable privacy indicators. | Use ipinfo_check_privacy for 1.1.1.1 and return is_anonymous, anonymous.is_vpn, anonymous.is_proxy, anonymous.is_tor, and is_hosting. |
| Who owns this IP and is it a VPN? | The assistant may call only one tool and miss part of the answer. | Split mixed intent into tool-specific steps. | Step 1: call ipinfo_asn for 52.95.110.1 and return ASN/name/domain. Step 2: call ipinfo_check_privacy for the same IP and return VPN/proxy/Tor flags. |
| Get city for these IPs | The assistant may call geolocation in default mode and only return country/continent. | Force detailed mode for city-level output. | Use ipinfo_geolocate with detailed=true for [IPs]. Return city, region, country, latitude, longitude, and timezone. |
| Check these 2,300 IPs | One call may only process a slice and appear incomplete. | Explicitly require pagination completion. | Process 2,300 IPs with page_size=1000, iterate all pages, and aggregate all results and validation_errors. |
| Find proxy IPs | The assistant may use residential proxy only and miss VPN/Tor/proxy indicators. | Clarify whether you need general privacy detection or only residential proxy checks. | Use ipinfo_check_privacy for VPN/proxy/Tor detection. Use ipinfo_check_residential_proxy only for residential proxy classification. |
| The tool returned nothing | Empty results may be misread as a hard failure. | Validate pagination, input validity, and error object first. | If results is empty, first check _pagination, then validation_errors, then top-level error to explain the cause. |
| Use the best tool | Tool choice may vary and be incorrect for your intent. | For critical workflows, always pin the tool name. | Use exactly ipinfo_check_privacy for these IPs and do not substitute another tool. Include validation_errors in the output. |
| Why did this fail? | No clear recovery action is provided. | Translate error codes into user actions. | If error=true, map code to action: NO_TOKEN -> configure token, ACCESS_DENIED -> upgrade plan, RATE_LIMITED -> retry with backoff. |
| Enrich these 2,000 IPs | The assistant may repeatedly report only the first 25 IPs and claim completion. | Force full pagination traversal and require per-page accounting. | Process all IPs with page_size=1000 and iterate page=1.._pagination.total_pages. Return processed_count, remaining_count, and unique IP count to prove full coverage. |
| Re-run enrichment with latest data | The assistant may reuse its native memory/cache and avoid making fresh tool calls. | Explicitly instruct no memory reuse and require evidence of new calls. | Do not use prior outputs or chat memory. Call the MCP tool again for all IPs and return current _meta (api_calls_made, from_cache) and timestamped run summary. |
| Get full details for these IPs | The assistant may keep using lite-style results and omit detailed fields. | Require detailed mode and reject incomplete field sets. | Use ipinfo_lookup with detailed=true. Response is invalid unless it includes city-level geo and privacy/network flags where available. |
| Write results to output file | The assistant may summarize in chat but skip overwriting the target file. | Make file write requirements explicit and verifiable. | Overwrite <output_file> with the new complete results (do not append). Confirm by reporting file path, final record count, and that previous content was replaced. |
Response Handling Rules
When interpreting any tool response, use this order:
- Check top-level
errorfirst. - Check
_paginationto confirm result coverage. - Read
resultsfor successful IPs. - Read
validation_errorsfor rejected IPs.
This prevents common misreads where empty results are treated as API failures.
Validation and Pagination Behavior
- Input supports mixed-quality IP lists.
- Valid public IPs are processed.
- Invalid/private/loopback/reserved/multicast/bogon IPs appear in
validation_errors. - A single response can contain both successful
resultsandvalidation_errors. page_sizeis limited to 1000.- Requesting a page beyond available data returns empty
results(not a hard error).
Error Codes and Recovery Actions
| Error Code | Meaning | Recommended Action |
|---|---|---|
NO_TOKEN | Token is missing | Configure bearer token in MCP client settings |
ACCESS_DENIED | Token lacks required plan/feature | Upgrade plan or use supported tool/mode |
RATE_LIMITED | Request rate exceeded | Retry with backoff or use a higher tier |
API_ERROR | Upstream API error | Retry; escalate if persistent |
Notes
- The MCP server is powered by IPinfo API service.
- All examples above use bearer token authentication through the
Authorizationheader. - Support for manual setup details can vary slightly by client version.