The IP Geolocation MCP Server provides comprehensive IP intelligence and location services through 16 tools powered by IPGeolocation.io, compatible with Claude Desktop, Cursor, VS Code, and any MCP-compatible client.
IP Geolocation & Lookup
Look up location (country, city, coordinates), currency, timezone, and ASN for any IPv4/IPv6 address or domain
Bulk lookup for up to 1,000 IPs in a single request
Retrieve the public IP of the machine running the server (free, no API key needed)
Security & Threat Detection
Detect VPN, proxy, Tor, bot, spam, and other threat indicators with confidence scores and cloud-provider detection
Bulk security checks for up to 1,000 IPs at once
Ownership, ASN & Network
Look up company/organization details and ASN holder for an IP
Retrieve route prefix, connection type, and anycast status
Deep ASN lookup including peers, upstreams, downstreams, routes, and WHOIS data
Abuse & Incident Response
Retrieve abuse contact emails, phone numbers, and organizational details for any IP
Timezone & Time Conversion
Get current time and timezone details by IANA name, coordinates, IP, airport code, or UN/LOCODE
Convert times between two locations, timezones, coordinates, or airports
Astronomy & Daylight Data
Get sunrise, sunset, moonrise, moonset, twilight, day length, and moon phase for a given location and date
Retrieve daily astronomy data for date ranges up to 90 days
User-Agent Parsing
Parse user-agent strings into browser, device, OS, and engine details, with bot/crawler classification
Bulk parsing for up to 1,000 user-agent strings at once
Additional Features
Free plan access to core geolocation, timezone, astronomy, and currency tools (1,000 daily credits)
Server-side caching for deterministic lookups to reduce credit usage
Flexible
fields/excludesparameters to customize response size and reduce costs
Provides tools to look up timezone information, current local time, and specific airport details using 3-letter IATA airport codes.
IP Geolocation MCP Server | IPGeolocation.io
Official MCP server for IP geolocation, IP security, abuse contacts, ASN, timezone, astronomy, and user-agent parsing.
We build and maintain this server so you can use our APIs from Codex, Claude Desktop, Cursor, Windsurf, VS Code, and other MCP-compatible clients.
Item | Value |
Package |
|
Version |
|
Transport |
|
Node.js |
|
Free plan support | 7 tools, 1,000 credits per day |
Paid plan support | All 16 tools, advanced IP intelligence, bulk operations |
Bundle manifest |
|
Quick Start
Sign up for a free IPGeolocation API key, then add this MCP server to your client:
{
"mcpServers": {
"ipgeolocation": {
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}
}
}Restart your client after saving the configuration.
Table of Contents
What We Provide
We expose 16 MCP tools across our IP intelligence and location APIs.
What you get:
Official server maintained by the ipgeolocation.io team
One MCP package for IP lookup, security checks, timezone, astronomy, ASN, abuse contacts, and user-agent parsing
Free-plan coverage for core location, timezone, and astronomy workflows
Bulk tools for IP lookup, security checks, and user-agent parsing
Tool descriptions written to help clients choose lower-cost and lower-latency request paths
Server-side caching for deterministic lookups so repeated requests for the same input do not keep hitting upstream APIs
manifest.jsonincluded for clients that support MCP Bundles
Install
Requirements
Node.js
18or laterAn ipgeolocation.io API key for most tools
npxavailable in your environment
get_my_ip works without an API key. All other tools require one.
Sign up for a free IPGeolocation API key
Install by Client
Codex CLI
codex mcp add ipgeolocation --env IPGEOLOCATION_API_KEY=<IPGEOLOCATION_API_KEY> -- npx -y ipgeolocation-io-mcp
codex mcp listStart a new Codex session after adding the server.
Claude Desktop
We ship manifest.json for clients that support MCP Bundles. If you want to configure Claude Desktop manually, add this to claude_desktop_config.json:
{
"mcpServers": {
"ipgeolocation": {
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}
}
}Restart Claude Desktop after saving the config.
Glama
You can try the server in Glama at IP Geolocation MCP Server on Glama.
For normal setup in Glama, only IPGEOLOCATION_API_KEY is required. Leave the other environment variable fields empty unless you explicitly want to tune cache, timeout, or output limits.
If you do not already have a key, sign up for a free IPGeolocation API key.
Cline
Open the MCP Servers panel in Cline, go to Configure, then open Advanced MCP Settings. Add this to cline_mcp_settings.json:
{
"mcpServers": {
"ipgeolocation": {
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}
}
}Restart Cline after saving the config.
Cursor
Add this to .cursor/mcp.json:
{
"mcpServers": {
"ipgeolocation": {
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}
}
}Restart Cursor after saving the config.
Windsurf
Add this to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"ipgeolocation": {
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}
}
}Restart Windsurf after saving the config.
VS Code / GitHub Copilot
Add this to your VS Code settings.json:
{
"mcp": {
"servers": {
"ipgeolocation": {
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}
}
}
}Restart VS Code after saving the config.
Any Other MCP Client
Use the same process configuration:
{
"command": "npx",
"args": ["-y", "ipgeolocation-io-mcp"],
"env": {
"IPGEOLOCATION_API_KEY": "<IPGEOLOCATION_API_KEY>"
}
}Verify It Works
Use these prompts after installation. They are short, easy to validate, and cover the main tool categories.
Prompt | Preferred tool path |
Where is 8.8.8.8 located? |
|
For IP 49.12.212.42, give me security verdict, company, ASN, and city. |
|
Is 2.56.12.11 safe to allow and what is the abuse contact email? |
|
For AS1, list upstream ASN numbers only. |
|
Convert 2026-03-07 09:30 from New York to Tokyo time. |
|
Give sunrise times for Karachi from 2026-03-10 to 2026-03-15. |
|
Parse this user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 |
|
If your client keeps using an older tool path after an update, restart the client and make sure it is loading version 1.0.10.
Prompt Examples by Use Case
IP reputation and access decisions
Is 49.12.212.42 safe to trust in our network? Give me the threat summary and city.
Check these IPs for VPN, proxy, Tor, bot, and spam indicators: 49.12.212.42, 2.56.12.11, 8.8.8.8
For 203.0.113.42, tell me the threat score, whether it is a cloud provider, and whether it looks like a relay.
Ownership, ASN, and routing
Who uses 1.1.1.1 and which ASN routes it?
For AS24940, list upstream ASN numbers only.
Is this IP anycast and what route prefix is announced for it: 1.1.1.1
Abuse and incident response
For IP 2.56.12.11, give me the abuse contact email, phone number, and organization.
I need the abuse contact for 1.0.0.0 and the network route involved.
For this IP, show me the abuse contact details only: 198.51.100.27
Time and timezone workflows
What time is it in Tokyo right now?
Convert 2026-03-07 09:30 from New York to Tokyo time.
What is the current local time at JFK airport?
Astronomy and daylight planning
Give sunrise and sunset for London on 2026-06-21.
Show sunrise times in Karachi from 2026-03-10 to 2026-03-15.
For New York, give me moon phase and day length on 2026-07-17.
User-agent analysis
Parse this user agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
Parse these user agents in bulk and tell me the browser, OS, and device type for each.
Does this user agent look like a crawler or bot? Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Example Answers and Tool Output
Actual assistant wording varies by client and model. The natural-language snippets below show a typical answer. The JSON blocks show trimmed tool output returned by our MCP server.
Prompt
Locate 91.128.103.196 and give me the country, city, ASN, and local time.
Typical assistant answer
91.128.103.196 resolves to Stockholm, Sweden. The ASN is AS1257, operated by Tele2 Sverige AB. The local timezone is Europe/Stockholm, and the local time in this sample is 2026-02-12 18:36:54.401+0100.
Example tool output
{
"ip": "91.128.103.196",
"location": {
"country_name": "Sweden",
"state_prov": "Stockholms lan",
"city": "Stockholm"
},
"asn": {
"as_number": "AS1257",
"organization": "Tele2 Sverige AB",
"country": "SE"
},
"time_zone": {
"name": "Europe/Stockholm",
"current_time": "2026-02-12 18:36:54.401+0100"
}
}Prompt
Convert 2025-01-21 13:42:52 from DXB to LHR.
Typical assistant answer
2025-01-21 13:42:52 in Dubai converts to 2025-01-21 09:42:52 in London in this sample. The difference is 4 hours.
Example tool output
{
"original_time": "2025-01-21 13:42:52",
"converted_time": "2025-01-21 09:42:52",
"diff_hour": 4,
"diff_min": 240
}Prompt
Who uses 1.1.1.1 and which ASN routes it?
Typical assistant answer
1.1.1.1 is used by APNIC Research and Development, while the ASN routing it is AS13335, operated by Cloudflare, Inc.
Example tool output
{
"company": {
"name": "APNIC Research and Development",
"domain": "apnic.net"
},
"asn": {
"as_number": "AS13335",
"organization": "Cloudflare, Inc.",
"country": "US"
}
}Prompt
Show sunrise and sunset for New York from 2025-06-16 to 2025-06-18.
Typical assistant answer
For this New York date range, sunrise is about 05:23 and sunset about 20:30 each day. Day length is about 15 hours, and the moon phase changes from waning gibbous to last quarter in this sample.
Example tool output
{
"location": {
"country_name": "United States",
"state_prov": "New York",
"city": "New York",
"latitude": "40.76473",
"longitude": "-74.00084"
},
"astronomy": [
{
"date": "2025-06-16",
"sunrise": "05:23",
"sunset": "20:30",
"day_length": "15:06",
"moon_phase": "WANING_GIBBOUS"
},
{
"date": "2025-06-17",
"sunrise": "05:23",
"sunset": "20:30",
"day_length": "15:06",
"moon_phase": "LAST_QUARTER"
}
]
}Prompt
Parse this user agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
Typical assistant answer
This user agent is Safari 9.0.2 on Mac OS 10.11.2, running on an Apple Macintosh desktop with an Intel CPU.
Example tool output
{
"user_agent_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9",
"name": "Safari",
"type": "Browser",
"version": "9.0.2",
"device": {
"name": "Apple Macintosh",
"type": "Desktop",
"brand": "Apple",
"cpu": "Intel"
},
"operating_system": {
"name": "Mac OS",
"type": "Desktop",
"version": "10.11.2"
}
}Prompt
Give me the abuse contact for 1.0.0.0.
Typical assistant answer
For 1.0.0.0, the abuse contact in this sample is IRT-APNICRANDNET-AU in Australia, covering route 1.0.0.0/24, with email helpdesk@apnic.net.
Example tool output
{
"ip": "1.0.0.0",
"abuse": {
"route": "1.0.0.0/24",
"country": "AU",
"name": "IRT-APNICRANDNET-AU",
"address": "PO Box 3646, South Brisbane, QLD 4101, Australia",
"emails": ["helpdesk@apnic.net"]
}
}Tools by Plan
Free Plan
The free plan includes 1,000 credits per day and supports these tools:
Tool | Credits | What it covers |
| 1 | IP geolocation, country metadata, currency, timezone, basic ASN |
| 0 | Public IP of the machine running the MCP server |
| 1 | Currency and country metadata for any IP |
| 1 | Timezone lookup by name, location, IP, airport code, or UN/LOCODE |
| 1 | Time conversion between two locations |
| 1 | Sunrise, sunset, moonrise, moonset, twilight, and moon phase |
| 1 | Daily astronomy data for a date range up to 90 days |
Paid Plans
Paid plans unlock all tools and additional fields on lookup_ip.
Tool | Credits | What it covers |
| 1 per IP | Bulk geolocation for up to 1,000 items per MCP request by default |
| 2 | VPN, proxy, Tor, bot, and threat intelligence |
| 2 per IP | Bulk threat and anonymity checks |
| 1 | Company using an IP and the ASN holder |
| 1 | Route prefix, connection type, and anycast detection |
| 1 | Parse one user-agent string |
| 1 per UA | Parse up to 1,000 user-agent strings per MCP request by default |
| 1 | ASN details, peers, upstreams, downstreams, routes, WHOIS |
| 1 | Abuse contact emails, phone numbers, address, and route |
Paid plans also add network, company, and extended asn fields to lookup_ip, plus the include parameter for security, abuse, hostname, liveHostname, hostnameFallbackLive, user_agent, geo_accuracy, dma_code, or *.
Tool Details
Single IP or domain lookup.
Plan: free and paid
Credits: 1 base credit
Choose this when:
You need geolocation, timezone, currency, or ASN for one IP
You need both base IP data and extra modules such as
securityorabuseYou want one request instead of multiple single-purpose calls
Free plan returns base location, country metadata, currency, timezone, and basic ASN.
Paid plans add network, company, and extended ASN fields. Paid plans also support include modules.
Parameter | Required | Description |
| No | IPv4, IPv6, or domain. Domain lookup requires a paid plan |
| No | Response language. Non-English values require a paid plan |
| No | Extra modules: |
| No | Comma-separated fields to return |
| No | Comma-separated fields to exclude |
| No | Bypass the MCP cache and force a fresh upstream request |
Bulk IP lookup for multiple addresses or domains.
Plan: paid only
Credits: 1 per IP
Choose this when:
You need geolocation or IP intelligence for more than one IP
You want one request for a batch instead of many single lookups
Parameter | Required | Description |
| Yes | Array of IP addresses or domains |
| No | Response language |
| No | Extra modules per IP |
| No | Comma-separated fields to return per IP |
| No | Comma-separated fields to exclude per IP |
| No | Bypass the MCP cache and force a fresh upstream request |
The default cap is 1,000 items per MCP request. You can change it with IPGEOLOCATION_MCP_MAX_BULK_ITEMS.
Return the public IP address of the machine running this MCP server.
Plan: free and paid
Credits: 0
Choose this when:
You need the caller IP only
You want a no-auth health check for the server connection
Parameters: none
This tool always goes upstream and is not cached.
Threat and anonymity lookup for a single IP.
Plan: paid only
Credits: 2
Choose this when:
You only need security data for one IP
You do not need company, ASN, location, or abuse data in the same response
If the same prompt also needs ownership, city, timezone, network, or abuse details, prefer lookup_ip with targeted include, fields, and excludes.
Parameter | Required | Description |
| No | IP address to check |
| No | Comma-separated fields to return |
| No | Comma-separated fields to exclude |
| No | Bypass the MCP cache and force a fresh upstream request |
Returns threat score, VPN/proxy/Tor flags, provider names, confidence scores, bot/spam indicators, anonymity flags, and cloud-provider status.
Threat and anonymity lookup for multiple IPs.
Plan: paid only
Credits: 2 per IP
Choose this when:
You need security-only checks for more than one IP
You are triaging or screening a list of IPs
Parameter | Required | Description |
| Yes | Array of IP addresses |
| No | Comma-separated fields to return per IP |
| No | Comma-separated fields to exclude per IP |
| No | Bypass the MCP cache and force a fresh upstream request |
Current time and timezone details for a location.
Plan: free and paid
Credits: 1
Choose this when:
You need the current local time and timezone details for one location
You want timezone data by IANA name, coordinates, IP, airport code, or UN/LOCODE
Returns an object with location and time_zone. The time_zone object includes timezone offsets, date/date_time variants, current_time, current_time_unix, time_24, time_12, week, month, year, timezone abbreviations, and DST transition details.
Parameter | Required | Description |
| No | IANA timezone name, such as |
| No | Latitude and longitude |
| No | City or address string |
| No | IP address |
| No | IATA airport code |
| No | ICAO airport code |
| No | UN/LOCODE |
| No | Response language for IP-based lookups. Non-English values require a paid plan |
This tool always goes upstream and is not cached because it returns current time.
Convert a time from one location to another.
Plan: free and paid
Credits: 1
Choose this when:
You need a converted time between two timezones, locations, coordinates, or airports
You want a direct time difference instead of two separate timezone lookups
Parameter | Required | Description |
| No | Time to convert in |
| No | IANA timezone names |
| No | Source coordinates |
| No | Destination coordinates |
| No | Source and destination location strings |
| No | Source and destination IATA airport codes |
| No | Source and destination ICAO airport codes |
| No | Source and destination UN/LOCODEs |
This tool always goes upstream and is not cached because it can default to the current time.
Sun and moon data for one location on one date.
Plan: free and paid
Credits: 1
Choose this when:
You need sunrise, sunset, moonrise, moonset, or day length for one date
You need current positional data such as sun altitude or moon azimuth
Returns an object with location and astronomy. The astronomy object includes morning and evening twilight blocks, sunrise/sunset, solar noon, day length, moonrise/moonset, status fields, and the live sun/moon position fields for that date and location.
Parameter | Required | Description |
| No | Latitude and longitude. Highest priority when provided |
| No | City or address |
| No | IP address |
| No | Date in |
| No | Elevation in meters. Allowed range is |
| No | IANA timezone name to control time output |
| No | Response language for IP-based lookups. Non-English values require a paid plan |
This tool always goes upstream and is not cached because omitting date returns time-sensitive data.
Astronomy data for a date range.
Plan: free and paid
Credits: 1 per request
Choose this when:
You need multiple days of astronomy data in one request
You want sunrise, sunset, day length, and moon phase across a range of dates
Returns an object with location and an astronomy array. Each daily entry includes mid_night, night_end, morning, sunrise, sunset, evening, night_begin, sun_status, solar_noon, day_length, moon_phase, moonrise, moonset, and moon_status.
Parameter | Required | Description |
| Yes | Start date in |
| Yes | End date in |
| No | Latitude and longitude. Highest priority when provided |
| No | City or address |
| No | IP address |
| No | Elevation in meters |
| No | IANA timezone name to control time output |
| No | Response language for IP-based lookups. Non-English values require a paid plan |
| No | Bypass the MCP cache and force a fresh upstream request |
Parse one user-agent string.
Plan: paid only
Credits: 1
Choose this when:
You need structured browser, device, engine, and operating-system data for one user-agent string
You need to classify crawlers, bots, or malformed user agents
This MCP tool parses the explicit uaString value you provide. It does not infer a caller user-agent from the MCP connection.
Parameter | Required | Description |
| Yes | The user-agent string to parse |
| No | Bypass the MCP cache and force a fresh upstream request |
Returns name, type, version, device, engine, and operating_system.
Parse multiple user-agent strings in one request.
Plan: paid only
Credits: 1 per user-agent string
Choose this when:
You need structured parsing for more than one user-agent string
You are processing log samples or traffic batches
This MCP tool parses only the explicit uaStrings values you provide.
Parameter | Required | Description |
| Yes | Array of user-agent strings |
| No | Bypass the MCP cache and force a fresh upstream request |
The default cap is 1,000 items per MCP request. You can change it with IPGEOLOCATION_MCP_MAX_BULK_ITEMS.
Company and ASN holder lookup for one IP.
Plan: paid only
Credits: 1
Choose this when:
You only need the company using an IP and the ASN holder
You want a small response instead of full geolocation data
If the same prompt also needs security, abuse, city, timezone, or network details, prefer lookup_ip with targeted fields and include modules.
Parameter | Required | Description |
| No | IP address to look up |
| No | Bypass the MCP cache and force a fresh upstream request |
Returns company and asn objects.
Currency and country metadata for one IP.
Plan: free and paid
Credits: 1
Choose this when:
You only need currency, country calling code, TLD, or languages for one IP
You want a smaller response than full
lookup_ip
Parameter | Required | Description |
| No | IP address to look up |
| No | Bypass the MCP cache and force a fresh upstream request |
Returns currency and country_metadata.
Route and network details for one IP.
Plan: paid only
Credits: 1
Choose this when:
You only need route prefix, connection type, or anycast status
You want a smaller response than full
lookup_ip
Parameter | Required | Description |
| No | IP address to look up |
| No | Bypass the MCP cache and force a fresh upstream request |
Returns a network object with connection_type, route, and is_anycast.
Detailed ASN lookup.
Plan: paid only
Credits: 1
Choose this when:
You need ASN metadata beyond the basic ASN object returned by
lookup_ipYou need peers, upstreams, downstreams, routes, or WHOIS data
Call this once with the include set you need, then filter locally from the response instead of making repeat calls to reshape the same data.
Parameter | Required | Description |
| No | ASN such as |
| No | IP address to resolve to an ASN |
| No | Extra data: |
| No | Comma-separated fields to return |
| No | Comma-separated fields to exclude |
| No | Bypass the MCP cache and force a fresh upstream request |
Abuse contact lookup for one IP.
Plan: paid only
Credits: 1
Choose this when:
You only need abuse contact details for one IP
You want the smallest and lowest-cost abuse-only path
If the same prompt also needs geolocation or security data, prefer lookup_ip with targeted fields and include=abuse or include=security,abuse.
Parameter | Required | Description |
| No | IP address to look up |
| No | Comma-separated fields to return |
| No | Comma-separated fields to exclude |
| No | Bypass the MCP cache and force a fresh upstream request |
Returns the abuse route, country, name, organization, address, emails, and phone numbers.
Credit Costs
Each upstream API request uses credits from your ipgeolocation.io account.
Action | Credits | Free Plan |
| 1 | Yes |
| 3 total | No |
| 2 total | No |
| 4 total | No |
| 2 total | No |
| 1 total | No |
| 1 per IP | No |
| 2 | No |
| 2 per IP | No |
| 1 | Yes |
| 1 | Yes |
| 1 | Yes |
| 1 per request | Yes |
| 1 | No |
| 1 per UA | No |
| 1 | No |
| 1 | No |
| 1 | No |
| 1 | Yes |
| 1 | No |
| 0 | Yes |
For current plan details, monthly credits, and pricing, please visit our pricing page.
Error Handling
All tools return structured errors instead of crashing the server.
Code | Meaning |
| Invalid or incomplete parameters, invalid date or time format, missing coordinate pairs, or unsupported input combinations |
| Missing or invalid API key, free plan calling a paid-only capability, or unsupported non-English |
| Endpoint-specific resource not found, such as an ASN lookup target that does not exist |
| Endpoint-specific method or subscription restriction returned by the upstream API |
| Bogon or private IP address such as |
| Rate limit, daily credit limit, or account quota exceeded |
| Endpoint-specific validation or unsupported query state returned by the upstream API |
| MCP server could not reach the upstream API or received an invalid upstream response |
| MCP server timed out while waiting for the upstream API |
Exact status codes can vary by endpoint and request mode. If an upstream endpoint returns another error, we pass that error back with a structured message.
Pricing
For current plan details, credits, and pricing, please visit our pricing page.
Building from Source
git clone https://github.com/IPGeolocation/ipgeolocation-io-mcp.git
cd ipgeolocation-io-mcp
npm install
npm run buildRun the built server directly:
IPGEOLOCATION_API_KEY=<IPGEOLOCATION_API_KEY> node dist/index.jsInspect it with the MCP Inspector:
IPGEOLOCATION_API_KEY=<IPGEOLOCATION_API_KEY> npx @modelcontextprotocol/inspector node dist/index.jsTesting
Run the full test suite:
npm testRun targeted suites:
npm run test:unit
npm run test:integrationHow It Works
We run this package as a stdio MCP server on top of our v3 API portfolio.
What happens at runtime:
Your MCP client starts the server.
The client reads the tool list and tool descriptions.
The client calls the tool that best fits the prompt.
We validate inputs, call the upstream API, and return structured results.
For deterministic tools, we keep recent responses in the server process cache so repeated requests for the same input can return faster and avoid duplicate upstream calls.
Three tools, lookup_company, lookup_currency, and lookup_network, are convenience wrappers around the broader IP lookup response. We expose them separately because they are easier for clients to discover when the user only needs one narrow slice of data.
Caching and Refresh
We cache deterministic tool responses in process memory to reduce repeated upstream requests for the same input.
Why we do this:
Faster responses for repeated lookups
Lower credit usage when the same request is asked again
Less duplicate traffic to upstream APIs
Better behavior when a client retries or revisits the same question
Important points:
This is server-side cache in the MCP process, not client model memory
Default TTL is
300000ms, which is 5 minutesCache clears when the MCP server process stops or restarts
A fresh upstream call happens when the TTL expires, the request shape changes, or
force_refreshis set totrue
Cached tools:
lookup_ipbulk_lookup_ipcheck_securitybulk_security_checklookup_companylookup_currencylookup_networkparse_user_agentbulk_parse_user_agentlookup_asnget_abuse_contactget_astronomy_time_series
Live, uncached tools:
get_my_ipget_timezoneconvert_timezoneget_astronomy
Use force_refresh: true on cached tools when you explicitly want a fresh upstream response instead of a cached one.
Environment Variables
Variable | Required | Description |
| Yes for most tools | Your ipgeolocation.io API key |
| No | Upstream request timeout in milliseconds. Default |
| No | Cache TTL in milliseconds. Default |
| No | Max cache entries before eviction. Default |
| No | Max bulk items accepted per MCP request. Default |
| No | Max array items returned in tool output before truncation. Default |
| No | Max response text length before truncation. Default |
| No | Max error text length before truncation. Default |
License
Privacy Policy
See our Privacy Policy for details on how we handle data.