The IP-Info.app MCP server exposes geolocation and ASN lookups as tools your AI agents can call directly. No SDK, no glue code — one Streamable HTTP endpoint, standard JSON-RPC, and the same trusted data as the REST API.
The Model Context Protocol (MCP) is an open standard that lets AI assistants and autonomous agents discover and call external tools. Register one server URL, and any MCP-capable client — Claude Code, Claude Desktop, Cursor, VS Code — sees the same IP lookup tools in its next session.
Every client connects with the same three ingredients: the endpoint https://api.ip-info.app/mcp, an x-api-key header, and Streamable HTTP transport (POST JSON-RPC 2.0 with Accept: application/json, text/event-stream). Copy the block for your client and replace YOUR_API_KEY with a key from Account → API keys.
One command registers the server for your CLI sessions:
claude mcp add --transport http ip-info https://api.ip-info.app/mcp --header "x-api-key: YOUR_API_KEY"Go to Settings → Connectors → Add custom connector (Desktop: Customize → Connectors), then use:
https://api.ip-info.app/mcpAdd a custom header x-api-key: YOUR_API_KEY when the connector form asks for authentication.
Skip manual config entirely — the interactive reference has an MCP panel that connects the server in one click:
Open /open-api and click the MCP buttonThe panel pre-fills https://api.ip-info.app/mcp and asks for your x-api-key.
Works in any client that accepts http-type server entries with custom headers:
{
"mcpServers": {
"ip-info": {
"type": "http",
"url": "https://api.ip-info.app/mcp",
"headers": { "x-api-key": "YOUR_API_KEY" }
}
}
}After registering, run tools/list to confirm the two IP-Info tools are advertised before wiring agent prompts to them.
Sign up free — no credit card required to hold an API key.
Name the key for the agent that will use it so usage stays attributable.
Keys are host-scoped to IP-Info.app; keys issued for other products are rejected.
Demo access:
Use the key demo-key with a valid TOTP in the x-ct header for a limited trial of the tools before you sign up.
Every session starts with initialize. The result carries the server capabilities and agent instructions — including the auth and billing contract your agent should respect.
curl -X POST 'https://api.ip-info.app/mcp' \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "curl", "version": "1.0" }
}
}'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-06-18",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": { "name": "ip-info", "version": "1.0.0" },
"instructions": "Authenticate with the x-api-key header. Each tool call costs 1 credit except account_whoami, which is free. HTTP 402 means the account is out of credits."
}
}Tool calls use the tools/call method. Ask for 8.8.8.8 and the tool returns geolocation plus ASN ownership — country US, ASN 15169, organization Google LLC:
curl -X POST 'https://api.ip-info.app/mcp' \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "ip_get_details",
"arguments": { "ip": "8.8.8.8" }
}
}'{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{\"ip\":\"8.8.8.8\",\"ptr\":\"dns.google\",\"city\":{\"name\":\"Mountain View\",\"region\":\"California\",\"latitude\":37.4223,\"longitude\":-122.085,\"accuracyRadius\":1000,\"timeZone\":\"America/Los_Angeles\"},\"continentCode\":\"NA\",\"countryName\":\"United States\",\"countryCode\":\"US\",\"registeredCountryCode\":\"US\",\"asn\":15169,\"aso\":\"Google LLC\",\"organization\":\"Google LLC\"}"
}
]
}
}Omit the ip argument and the tool resolves the caller's IP — handy when an agent needs its own egress context. An optional provider argument (maxmind or geojs) selects the data source.
| Tool | What it returns | Arguments | Cost |
|---|---|---|---|
account_whoami | Identity probe for the API key: account status and remaining credits | None | Free |
ip_get_details | Geolocation (city, region, country, timezone) plus ASN and organization | ip (optional — defaults to the caller IP), provider (maxmind | geojs) | 1 credit |
Both tools are read-only and idempotent, so agents can safely retry or re-check without side effects.
Every successful ip_get_details call costs one credit and appears in your usage reporting like any REST call.
Free: account_whoami never consumes credits. Point agents at it first to check the account before a long run.
When the account runs dry, calls return 402 PAYMENT_REQUIRED. Teach your agent to stop and surface the top-up link instead of retrying: ip-info.app/pricing.
Built-in contract: the initialize result carries agent instructions that spell out auth and billing, so well-behaved clients learn the rules on connect. A 401 means the key is missing, invalid, or issued for another product — never retry it blindly.
Plain-text summary of the product, MCP endpoint, tools, and billing for LLM clients.
Machine-readable MCP server card other clients read to learn what this server offers.
No. The IP-Info.app MCP server is hosted at https://api.ip-info.app/mcp. You only register the URL and your API key in an MCP client.
Any client that speaks Streamable HTTP transport: Claude Code, Claude Desktop, Cursor, VS Code assistants, agent frameworks, and CLIs that accept an "http"-type server entry with custom headers.
Yes. The demo-key key with a valid TOTP in the x-ct header grants limited trial access to the tools.
The initialize result includes agent instructions describing the API key requirement, the 1-credit cost per tool call, the free account_whoami probe, and the 402 out-of-credits signal.
Create an API key, paste one JSON config, and your agent can resolve any IP address.
1 credit per tool call · account_whoami is free
Master the lookup fields your agents will consume through MCP
Response handling, edge cases, and production rollout patterns
Guardrails for giving agents read-only IP lookup tools
Combine IP signals with account and review logic