ipgeolocation-io-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ipgeolocation.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,606 @@
1
+ # IPGeolocation.io MCP Server
2
+
3
+ Official [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for the [ipgeolocation.io](https://ipgeolocation.io) API suite (v3). Connects Claude, Cursor, Windsurf, VS Code Copilot, and any MCP-compatible AI assistant to our full range of IP intelligence, timezone, astronomy, and user-agent parsing APIs.
4
+
5
+ Built and maintained by the [ipgeolocation.io](https://ipgeolocation.io) team.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - **16 tools** covering IP geolocation, VPN/proxy detection, timezone, astronomy, user-agent parsing, ASN, and abuse contact data
12
+ - **Zero-install setup** with `npx` for any MCP client
13
+ - **Free tier included** with 1,000 credits/day for 7 tools
14
+ - **Bulk operations** for IP geolocation, security checks, and user-agent parsing (up to 50,000 per request)
15
+ - **One-click install** for Claude Desktop via [MCP Bundles](https://github.com/modelcontextprotocol/mcpb) (manifest.json included)
16
+ - **Cost optimization** built into tool descriptions so AI assistants pick the cheapest path automatically
17
+
18
+ ---
19
+
20
+ ## Quick Start
21
+
22
+ ### 1. Get your API key
23
+
24
+ Sign up at [app.ipgeolocation.io/signup](https://app.ipgeolocation.io/signup) (free, no credit card). Copy your API key from the Dashboard.
25
+
26
+ ### 2. Add to your AI client
27
+
28
+ <details>
29
+ <summary><strong>Claude Desktop (one-click install)</strong></summary>
30
+
31
+ This package includes a `manifest.json` following the [MCPB spec](https://github.com/modelcontextprotocol/mcpb) (v0.3). Claude Desktop 0.10.0 and later can install it directly with no manual config. Claude Desktop will prompt you for your API key during setup.
32
+
33
+ To configure manually instead, add to `claude_desktop_config.json`:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "ipgeolocation": {
39
+ "command": "npx",
40
+ "args": ["-y", "ipgeolocation-io-mcp"],
41
+ "env": {
42
+ "IPGEOLOCATION_API_KEY": "your-api-key-here"
43
+ }
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ </details>
50
+
51
+ <details>
52
+ <summary><strong>Cursor</strong></summary>
53
+
54
+ Add to `.cursor/mcp.json`:
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "ipgeolocation": {
60
+ "command": "npx",
61
+ "args": ["-y", "ipgeolocation-io-mcp"],
62
+ "env": {
63
+ "IPGEOLOCATION_API_KEY": "your-api-key-here"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ </details>
71
+
72
+ <details>
73
+ <summary><strong>Windsurf</strong></summary>
74
+
75
+ Add to `~/.codeium/windsurf/mcp_config.json`:
76
+
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "ipgeolocation": {
81
+ "command": "npx",
82
+ "args": ["-y", "ipgeolocation-io-mcp"],
83
+ "env": {
84
+ "IPGEOLOCATION_API_KEY": "your-api-key-here"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ </details>
92
+
93
+ <details>
94
+ <summary><strong>VS Code / GitHub Copilot</strong></summary>
95
+
96
+ Add to your VS Code `settings.json`:
97
+
98
+ ```json
99
+ {
100
+ "mcp": {
101
+ "servers": {
102
+ "ipgeolocation": {
103
+ "command": "npx",
104
+ "args": ["-y", "ipgeolocation-io-mcp"],
105
+ "env": {
106
+ "IPGEOLOCATION_API_KEY": "your-api-key-here"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ </details>
115
+
116
+ ### 3. Start asking questions
117
+
118
+ > "Where is 8.8.8.8 located?"
119
+ > "Is this IP behind a VPN? 1.2.3.4"
120
+ > "What time is it in Tokyo right now?"
121
+ > "When is sunrise tomorrow in London?"
122
+ > "Parse this user-agent string: Mozilla/5.0..."
123
+
124
+ ---
125
+
126
+ ## Usage Examples
127
+
128
+ <details>
129
+ <summary><strong>Example 1: Locate an IP and check for VPN</strong></summary>
130
+
131
+ **User prompt:** "Where is 203.0.113.42 located, and is it using a VPN?"
132
+
133
+ **What happens:**
134
+ 1. The AI calls `lookup_ip` with `ip=203.0.113.42` and `include=security` (3 credits on paid plan)
135
+ 2. Returns geolocation (country, city, coordinates) plus security flags (is_vpn, vpn_provider_names, threat_score)
136
+ 3. The AI responds with the location and whether the IP is behind a VPN
137
+
138
+ **Cost optimization:** If you only need the VPN check without geolocation, the AI can call `check_security` instead (2 credits).
139
+
140
+ </details>
141
+
142
+ <details>
143
+ <summary><strong>Example 2: Convert time between airports</strong></summary>
144
+
145
+ **User prompt:** "What time is it at JFK airport right now, and what would that be in Tokyo Narita?"
146
+
147
+ **What happens:**
148
+ 1. The AI calls `convert_timezone` with `iata_from=JFK` and `iata_to=NRT`
149
+ 2. Returns the current time at JFK, the equivalent time at NRT, and the hour/minute difference
150
+ 3. Also returns airport details (name, city, elevation) for both airports
151
+
152
+ **Works on the free plan.** 1 credit.
153
+
154
+ </details>
155
+
156
+ <details>
157
+ <summary><strong>Example 3: Get sunrise times for the next week</strong></summary>
158
+
159
+ **User prompt:** "When will the sun rise in San Francisco each day this week?"
160
+
161
+ **What happens:**
162
+ 1. The AI calls `get_astronomy_time_series` with `location=San Francisco, CA`, `dateStart=2026-03-04`, and `dateEnd=2026-03-10`
163
+ 2. Returns daily astronomy data including sunrise, sunset, moonrise, moonset, twilight, and moon phases for each day
164
+ 3. The AI formats the sunrise times into a readable list
165
+
166
+ **Works on the free plan.** 1 credit for the entire range (up to 90 days).
167
+
168
+ </details>
169
+
170
+ <details>
171
+ <summary><strong>Example 4: Identify the company behind an IP</strong></summary>
172
+
173
+ **User prompt:** "Who operates 1.1.1.1?"
174
+
175
+ **What happens:**
176
+ 1. The AI calls `lookup_company` with `ip=1.1.1.1`
177
+ 2. Returns the company using the IP (APNIC Research and Development) and the ASN holder (Cloudflare, Inc.)
178
+ 3. The AI explains the difference: Cloudflare routes the IP block, but APNIC holds the allocation
179
+
180
+ **Paid plans only.** 1 credit.
181
+
182
+ </details>
183
+
184
+ <details>
185
+ <summary><strong>Example 5: Bulk security scan</strong></summary>
186
+
187
+ **User prompt:** "Check these IPs for threats: 1.2.3.4, 5.6.7.8, 9.10.11.12"
188
+
189
+ **What happens:**
190
+ 1. The AI calls `bulk_security_check` with all three IPs in a single request
191
+ 2. Returns threat scores, VPN/proxy/Tor flags, bot detection, and provider names for each IP
192
+ 3. The AI summarizes which IPs are clean and which have security concerns
193
+
194
+ **Paid plans only.** 2 credits per IP (6 credits total).
195
+
196
+ </details>
197
+
198
+ ---
199
+
200
+ ## Tools
201
+
202
+ ### Free Plan (1,000 credits/day)
203
+
204
+ | Tool | Description | Credits |
205
+ |------|-------------|---------|
206
+ | `lookup_ip` | IP geolocation, country metadata, currency, timezone, basic ASN | 1 |
207
+ | `get_my_ip` | Returns the caller's public IP address (no API key needed) | 0 |
208
+ | `lookup_currency` | Currency code/name/symbol and country metadata for any IP | 1 |
209
+ | `get_timezone` | Timezone details by IANA name, coordinates, IP, IATA/ICAO code, or UN/LOCODE | 1 |
210
+ | `convert_timezone` | Convert time between two locations using timezone names, coordinates, or airports | 1 |
211
+ | `get_astronomy` | Sunrise, sunset, moonrise, moonset, twilight, golden hour, moon phases | 1 |
212
+ | `get_astronomy_time_series` | Daily astronomy data for a date range (up to 90 days) | 1 |
213
+
214
+ ### Paid Plans
215
+
216
+ | Tool | Description | Credits |
217
+ |------|-------------|---------|
218
+ | `bulk_lookup_ip` | Geolocation for up to 50,000 IPs in one request | 1/IP |
219
+ | `check_security` | VPN, proxy, Tor, bot detection with confidence scores and provider names | 2 |
220
+ | `bulk_security_check` | Security check for up to 50,000 IPs in one request | 2/IP |
221
+ | `lookup_company` | Organization using an IP vs. ASN holder comparison (detects subleasing) | 1 |
222
+ | `lookup_network` | BGP route prefix, connection type, anycast detection | 1 |
223
+ | `parse_user_agent` | Parse any user-agent string into device, browser, OS, engine details | 1 |
224
+ | `bulk_parse_user_agent` | Parse up to 50,000 user-agent strings in one request | 1/UA |
225
+ | `lookup_asn` | ASN details with peers, upstreams, downstreams, routes, WHOIS data | 1 |
226
+ | `get_abuse_contact` | Abuse contact email, phone, address, and organization for any IP | 1 |
227
+
228
+ Paid plans also add network, company, and extended ASN fields to `lookup_ip`, plus the `include` parameter for security (+2), abuse (+1), hostname, user-agent, geo-accuracy, DMA code, or all modules at once (4 credits total).
229
+
230
+ ---
231
+
232
+ ## Tool Details
233
+
234
+ <details>
235
+ <summary><strong>lookup_ip</strong> - IP geolocation lookup</summary>
236
+
237
+ Geolocation data for any IPv4/IPv6 address or domain. Uses GET `/v3/ipgeo`. Costs 1 credit.
238
+
239
+ **Free plan returns:** IP, location (continent, country, state, district, city, zipcode, coordinates, is_eu, country_flag, country_emoji, geoname_id), country_metadata (calling_code, tld, languages), currency (code, name, symbol), timezone (name, offset, DST info, current_time), basic ASN (as_number, organization, country).
240
+
241
+ **Paid plans add:** network (connection_type, route, is_anycast), company (name, type, domain), extended ASN (type, domain, date_allocated, rir). The ASN object is the organization holding the IP block allocation from a registry. The company object is the organization actually using that IP. They match when the ASN holder uses the IPs directly, and differ when IPs are subleased.
242
+
243
+ | Parameter | Required | Description |
244
+ |-----------|----------|-------------|
245
+ | `ip` | No | IP address or domain. Domain lookups require a paid plan. Omit to look up the caller's IP |
246
+ | `lang` | No | Response language (en, de, ru, ja, fr, cn, es, cs, it, ko, fa, pt). Paid only |
247
+ | `include` | No | Extra modules: `security` (+2), `abuse` (+1), `hostname`, `user_agent`, `geo_accuracy`, `dma_code`, or `*` for all (4 total). Paid only |
248
+ | `fields` | No | Comma-separated fields to return. Works on all plans |
249
+ | `excludes` | No | Comma-separated fields to exclude. Works on all plans |
250
+
251
+ **Cost optimization:** Use `include=security&fields=security` to get only security data for 2 credits instead of 3. Use `include=abuse&fields=abuse` for abuse data at 1 credit instead of 2.
252
+
253
+ </details>
254
+
255
+ <details>
256
+ <summary><strong>bulk_lookup_ip</strong> - Bulk IP geolocation</summary>
257
+
258
+ Geolocation data for up to 50,000 IPs in one POST request. Uses POST `/v3/ipgeo-bulk`. Paid plans only.
259
+
260
+ | Parameter | Required | Description |
261
+ |-----------|----------|-------------|
262
+ | `ips` | Yes | Array of IP addresses or domains (1 to 50,000) |
263
+ | `lang` | No | Response language. Defaults to en |
264
+ | `include` | No | Extra modules per IP: `security` (+2/IP), `abuse` (+1/IP), `hostname`, `user_agent`, `geo_accuracy`, `dma_code`, or `*` (4/IP total) |
265
+ | `fields` | No | Comma-separated fields to return per IP |
266
+ | `excludes` | No | Comma-separated fields to exclude per IP |
267
+
268
+ </details>
269
+
270
+ <details>
271
+ <summary><strong>get_my_ip</strong> - Get caller's public IP</summary>
272
+
273
+ Returns the public IP of the machine running this server. No parameters, no API key needed, no credits charged.
274
+
275
+ </details>
276
+
277
+ <details>
278
+ <summary><strong>check_security</strong> - VPN/proxy/threat detection</summary>
279
+
280
+ Check any IP against our threat intelligence database. Uses GET `/v3/security`. Paid plans only, 2 credits.
281
+
282
+ | Parameter | Required | Description |
283
+ |-----------|----------|-------------|
284
+ | `ip` | No | IP to check. Omit to check caller's IP |
285
+ | `fields` | No | Specific fields to return |
286
+ | `excludes` | No | Fields to exclude |
287
+
288
+ **Returns:** threat_score (0-100), is_tor, is_proxy, proxy_provider_names, proxy_confidence_score, proxy_last_seen, is_residential_proxy, is_vpn, vpn_provider_names, vpn_confidence_score, vpn_last_seen, is_relay, relay_provider_name, is_anonymous, is_known_attacker, is_bot, is_spam, is_cloud_provider, cloud_provider_name.
289
+
290
+ This returns the same data as `lookup_ip` with `include=security`, but costs 2 credits instead of 3 because it skips the base geolocation.
291
+
292
+ </details>
293
+
294
+ <details>
295
+ <summary><strong>bulk_security_check</strong> - Bulk security check</summary>
296
+
297
+ Same as `check_security` but for up to 50,000 IPs. Paid plans only, 2 credits per valid IP.
298
+
299
+ | Parameter | Required | Description |
300
+ |-----------|----------|-------------|
301
+ | `ips` | Yes | Array of IP addresses (1 to 50,000) |
302
+ | `fields` | No | Comma-separated fields to return per IP |
303
+ | `excludes` | No | Comma-separated fields to exclude per IP |
304
+
305
+ </details>
306
+
307
+ <details>
308
+ <summary><strong>get_timezone</strong> - Timezone lookup</summary>
309
+
310
+ Timezone information for any location. Uses GET `/v3/timezone`. Works on all plans, 1 credit.
311
+
312
+ Look up by timezone name, coordinates, city, IP, airport code, or UN/LOCODE. All lookup modes work on free and paid plans.
313
+
314
+ | Parameter | Required | Description |
315
+ |-----------|----------|-------------|
316
+ | `tz` | No | IANA timezone name (e.g. `America/New_York`) |
317
+ | `lat` + `long` | No | Coordinates |
318
+ | `location` | No | City or address (e.g. `London, UK`) |
319
+ | `ip` | No | IP address |
320
+ | `iata_code` | No | 3-letter IATA airport code (e.g. `JFK`). Also returns airport details |
321
+ | `icao_code` | No | 4-letter ICAO airport code (e.g. `KJFK`). Also returns airport details |
322
+ | `lo_code` | No | 5-character UN/LOCODE (e.g. `USNYC`) |
323
+ | `lang` | No | Response language for IP lookups. Paid only |
324
+
325
+ **Returns:** Timezone name, UTC offset, current time in multiple formats, DST status, DST transition dates. Airport lookups also return airport name, city, elevation, and coordinates.
326
+
327
+ </details>
328
+
329
+ <details>
330
+ <summary><strong>convert_timezone</strong> - Timezone conversion</summary>
331
+
332
+ Convert a time from one location to another. Uses GET `/v3/timezone/convert`. Works on all plans, 1 credit.
333
+
334
+ Both source and destination can be timezone names, coordinates, cities, airport codes, or UN/LOCODEs.
335
+
336
+ | Parameter | Required | Description |
337
+ |-----------|----------|-------------|
338
+ | `time` | No | Time to convert (`yyyy-MM-dd HH:mm`). Defaults to now |
339
+ | `tz_from` / `tz_to` | No | IANA timezone names |
340
+ | `lat_from` + `long_from` / `lat_to` + `long_to` | No | Coordinates |
341
+ | `location_from` / `location_to` | No | City or address strings |
342
+ | `iata_from` / `iata_to` | No | IATA airport codes |
343
+ | `icao_from` / `icao_to` | No | ICAO airport codes |
344
+ | `locode_from` / `locode_to` | No | UN/LOCODEs |
345
+
346
+ **Returns:** Original time, converted time, diff_hour, and diff_min.
347
+
348
+ </details>
349
+
350
+ <details>
351
+ <summary><strong>get_astronomy</strong> - Astronomy data</summary>
352
+
353
+ Astronomical data for any location on any date. Uses GET `/v3/astronomy`. Works on all plans, 1 credit.
354
+
355
+ | Parameter | Required | Description |
356
+ |-----------|----------|-------------|
357
+ | `lat` + `long` | No | Coordinates (highest priority) |
358
+ | `location` | No | City or address |
359
+ | `ip` | No | IP address |
360
+ | `date` | No | Date in `YYYY-MM-DD` format. Defaults to today |
361
+ | `elevation` | No | Meters above sea level (0-10000) |
362
+ | `time_zone` | No | IANA timezone to express times in |
363
+ | `lang` | No | Response language for IP lookups. Paid only |
364
+
365
+ **Returns:** Sunrise/sunset, moonrise/moonset, all twilight phases (civil, nautical, astronomical), golden hour, blue hour, solar noon, day length, sun and moon altitude/azimuth/distance, moon phase and illumination percentage.
366
+
367
+ </details>
368
+
369
+ <details>
370
+ <summary><strong>get_astronomy_time_series</strong> - Astronomy time series</summary>
371
+
372
+ Daily astronomical data for a date range in a single request. Uses GET `/v3/astronomy/timeSeries`. Works on all plans, 1 credit per request regardless of range length.
373
+
374
+ | Parameter | Required | Description |
375
+ |-----------|----------|-------------|
376
+ | `lat` + `long` | No | Coordinates (highest priority) |
377
+ | `location` | No | City or address |
378
+ | `ip` | No | IP address |
379
+ | `dateStart` | Yes | Start date in `YYYY-MM-DD` format |
380
+ | `dateEnd` | Yes | End date in `YYYY-MM-DD` format. Maximum span is 90 days |
381
+ | `elevation` | No | Meters above sea level (0-10000) |
382
+ | `time_zone` | No | IANA timezone to express times in |
383
+ | `lang` | No | Response language for IP lookups. Paid only |
384
+
385
+ Does not include real-time positional data (sun/moon altitude, azimuth, distance). For that, use `get_astronomy` with a specific date.
386
+
387
+ </details>
388
+
389
+ <details>
390
+ <summary><strong>parse_user_agent</strong> - User-agent parsing</summary>
391
+
392
+ Parse any user-agent string into structured device, browser, OS, and engine details. Uses POST `/v3/user-agent`. Paid plans only, 1 credit.
393
+
394
+ | Parameter | Required | Description |
395
+ |-----------|----------|-------------|
396
+ | `uaString` | Yes | The user-agent string to parse |
397
+
398
+ **Returns:** user_agent_string, name (browser/bot name), type (Browser, Crawler, etc.), version, version_major, device (name, type, brand, cpu), engine (name, type, version, version_major), operating_system (name, type, version, version_major, build).
399
+
400
+ </details>
401
+
402
+ <details>
403
+ <summary><strong>bulk_parse_user_agent</strong> - Bulk user-agent parsing</summary>
404
+
405
+ Parse up to 50,000 user-agent strings in a single request. Uses POST `/v3/user-agent-bulk`. Paid plans only, 1 credit per UA string.
406
+
407
+ | Parameter | Required | Description |
408
+ |-----------|----------|-------------|
409
+ | `uaStrings` | Yes | Array of user-agent strings (1 to 50,000) |
410
+
411
+ </details>
412
+
413
+ <details>
414
+ <summary><strong>lookup_company</strong> - Company/organization lookup</summary>
415
+
416
+ Identify which organization is using a specific IP address. Uses GET `/v3/ipgeo` with fields filtered to company and ASN data. Paid plans only, 1 credit.
417
+
418
+ Returns two objects: the company using the IP and the ASN holder. They match when the ASN holder uses the IPs directly, and differ when IPs are subleased. For example, 1.1.1.1 has ASN "Cloudflare, Inc." (who routes it) but company "APNIC Research and Development" (who owns the block).
419
+
420
+ | Parameter | Required | Description |
421
+ |-----------|----------|-------------|
422
+ | `ip` | No | IP address to look up. Omit to check the caller's IP |
423
+
424
+ **Returns:** company (name, type, domain) and asn (as_number, organization, country, type, domain, date_allocated, rir).
425
+
426
+ </details>
427
+
428
+ <details>
429
+ <summary><strong>lookup_currency</strong> - Currency and country metadata</summary>
430
+
431
+ Local currency and country metadata for any IP address. Uses GET `/v3/ipgeo` with fields filtered to currency and country_metadata. Works on all plans, 1 credit.
432
+
433
+ | Parameter | Required | Description |
434
+ |-----------|----------|-------------|
435
+ | `ip` | No | IP address to look up. Omit to check the caller's IP |
436
+
437
+ **Returns:** currency (code, name, symbol) and country_metadata (calling_code, tld, languages). For example, a Japanese IP returns currency code "JPY", name "Japanese Yen", symbol "¥", calling code "+81", TLD ".jp", and languages ["ja"].
438
+
439
+ </details>
440
+
441
+ <details>
442
+ <summary><strong>lookup_network</strong> - Network/routing info</summary>
443
+
444
+ Network routing information and anycast detection. Uses GET `/v3/ipgeo` with fields filtered to network data. Paid plans only, 1 credit.
445
+
446
+ | Parameter | Required | Description |
447
+ |-----------|----------|-------------|
448
+ | `ip` | No | IP address to look up. Omit to check the caller's IP |
449
+
450
+ **Returns:** network (connection_type, route, is_anycast). The route field shows the announced BGP prefix (e.g. "1.1.1.0/24"). The is_anycast field indicates whether the IP is served from multiple geographic locations via anycast routing.
451
+
452
+ </details>
453
+
454
+ <details>
455
+ <summary><strong>lookup_asn</strong> - ASN details</summary>
456
+
457
+ Detailed ASN information. Uses GET `/v3/asn`. Paid plans only, 1 credit.
458
+
459
+ Basic ASN data (as_number, organization, country) is already included in every `lookup_ip` response on all plans. This dedicated endpoint adds asn_name, allocation_status, route counts, and optional peers/downstreams/upstreams/routes/whois data.
460
+
461
+ | Parameter | Required | Description |
462
+ |-----------|----------|-------------|
463
+ | `asn` | No | AS number (e.g. `AS13335` or `13335`) |
464
+ | `ip` | No | IP address to find its ASN |
465
+ | `include` | No | Extra data: `peers`, `downstreams`, `upstreams`, `routes`, `whois_response` |
466
+ | `fields` | No | Specific fields to return |
467
+ | `excludes` | No | Fields to exclude |
468
+
469
+ **Returns:** AS number, asn_name, organization, country, type (ISP/Business/Hosting/etc), domain, RIR, allocation date, allocation status, IPv4 and IPv6 route counts. Optionally: peer/upstream/downstream ASNs, announced routes, raw WHOIS text.
470
+
471
+ </details>
472
+
473
+ <details>
474
+ <summary><strong>get_abuse_contact</strong> - Abuse contact lookup</summary>
475
+
476
+ Find who to contact about abuse from a given IP. Uses GET `/v3/abuse`. Paid plans only, 1 credit.
477
+
478
+ Abuse data is also available through `lookup_ip` with `include=abuse` (2 credits total). This dedicated endpoint is cheaper at 1 credit when you only need the abuse contact without geolocation.
479
+
480
+ | Parameter | Required | Description |
481
+ |-----------|----------|-------------|
482
+ | `ip` | No | IP address. Omit to use caller's IP |
483
+ | `fields` | No | Comma-separated fields to return |
484
+ | `excludes` | No | Comma-separated fields to exclude |
485
+
486
+ **Returns:** Organization name, abuse email addresses, phone numbers, mailing address, network route, country, and kind.
487
+
488
+ </details>
489
+
490
+ ---
491
+
492
+ ## Credit Costs
493
+
494
+ Each API call uses credits from your ipgeolocation.io account:
495
+
496
+ | Action | Credits | Free Plan |
497
+ |--------|---------|-----------|
498
+ | IP geolocation lookup (base) | 1 | Yes |
499
+ | + security module (`include=security`) | +2 (3 total) | No |
500
+ | + abuse module (`include=abuse`) | +1 (2 total) | No |
501
+ | + all modules (`include=*`) | 4 total | No |
502
+ | Security-only via fields trick | 2 | No |
503
+ | Abuse-only via fields trick | 1 | No |
504
+ | Bulk IP geolocation | 1 per IP | No |
505
+ | Security check (single) | 2 | No |
506
+ | Security check (bulk) | 2 per IP | No |
507
+ | Timezone lookup | 1 | Yes |
508
+ | Timezone conversion | 1 | Yes |
509
+ | Astronomy lookup | 1 | Yes |
510
+ | Astronomy time series | 1 | Yes |
511
+ | User-agent parse (single) | 1 | No |
512
+ | User-agent parse (bulk) | 1 per UA | No |
513
+ | ASN lookup | 1 | No |
514
+ | Abuse contact lookup | 1 | No |
515
+ | Company lookup | 1 | No |
516
+ | Currency/country metadata | 1 | Yes |
517
+ | Network/anycast lookup | 1 | No |
518
+ | Get my IP | 0 | Yes |
519
+
520
+ ---
521
+
522
+ ## Error Handling
523
+
524
+ All tools return structured error messages instead of crashing the server.
525
+
526
+ | Code | Meaning |
527
+ |------|---------|
528
+ | 401 | Invalid or missing API key, free plan calling a paid-only endpoint, domain lookup on free plan, or non-English `lang` on free plan |
529
+ | 423 | Bogon or private IP address (192.168.x.x, 10.x.x.x, etc.) |
530
+ | 429 | Rate limit or daily credit limit exceeded |
531
+
532
+ ---
533
+
534
+ ## Pricing
535
+
536
+ > As of February 2026. See [ipgeolocation.io/pricing](https://ipgeolocation.io/pricing.html) for current rates.
537
+
538
+ | Plan | Credits | Price |
539
+ |------|---------|-------|
540
+ | Free / Developer | 1,000/day | $0 forever |
541
+ | Starter | 150,000/month | $19/month |
542
+ | Core | 250,000/month | $29/month |
543
+ | Plus | 500,000/month | $49/month |
544
+ | Pro | 1,000,000/month | $79/month |
545
+ | Business | 2,000,000/month | $129/month |
546
+ | Premium | 5,000,000/month | $249/month |
547
+
548
+ No per-second rate limits on any plan.
549
+
550
+ ---
551
+
552
+ ## Building from Source
553
+
554
+ ```bash
555
+ git clone https://github.com/IPGeolocation/ipgeolocation-io-mcp.git
556
+ cd ipgeolocation-io-mcp
557
+ npm install
558
+ npm run build
559
+ ```
560
+
561
+ Run directly:
562
+
563
+ ```bash
564
+ IPGEOLOCATION_API_KEY=your-key node dist/index.js
565
+ ```
566
+
567
+ Test with the MCP inspector:
568
+
569
+ ```bash
570
+ IPGEOLOCATION_API_KEY=your-key npx @modelcontextprotocol/inspector node dist/index.js
571
+ ```
572
+
573
+ ---
574
+
575
+ ## How It Works
576
+
577
+ This is a stdio-based MCP server that wraps our REST API (v3). When an AI client starts it, the server communicates over stdin/stdout using the Model Context Protocol. The client sees the available tools, and when the AI needs IP geolocation data, VPN detection, timezone info, or any other supported lookup, it calls the appropriate tool. The server makes the API request and returns the result.
578
+
579
+ All 16 tools map to our v3 API endpoints. Three tools (`lookup_company`, `lookup_currency`, `lookup_network`) are convenience wrappers around `/v3/ipgeo` that pre-filter fields for specific use cases, making them easier for AI assistants to discover and select.
580
+
581
+ ---
582
+
583
+ ## Environment Variables
584
+
585
+ | Variable | Required | Description |
586
+ |----------|----------|-------------|
587
+ | `IPGEOLOCATION_API_KEY` | Yes (for most tools) | Your ipgeolocation.io API key |
588
+
589
+ `get_my_ip` works without any API key.
590
+
591
+ ---
592
+
593
+ ## License
594
+
595
+ MIT
596
+
597
+ ## Privacy Policy
598
+
599
+ See our [Privacy Policy](https://ipgeolocation.io/privacy.html) for details on how we handle data.
600
+
601
+ ## Links
602
+
603
+ - [ipgeolocation.io](https://ipgeolocation.io) - IP geolocation, security, timezone, astronomy, user-agent, and ASN APIs
604
+ - [API Documentation](https://ipgeolocation.io/documentation.html) - Full API reference
605
+ - [Pricing](https://ipgeolocation.io/pricing.html) - Free and paid plan details
606
+ - [Sign Up](https://app.ipgeolocation.io/signup) - Get your free API key