Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

IP Geolocation MCP Server

PyPI CI License: MIT

A Model Context Protocol server that exposes the ipinfo.io API to AI agents. Geolocate IPv4 and IPv6 addresses, identify ISPs and ASNs, detect VPN/proxy/Tor exit nodes, and generate interactive maps for sets of IPs.

Installation

Sign up for a free IPInfo API token at https://ipinfo.io/signup if you don't have one. The server runs with no token (free Lite tier — country and ASN basics) but most fields require a token.

Most MCP clients accept the following values:

Field Value
Command uvx
Arguments mcp-server-ipinfo
Environment IPINFO_API_TOKEN = <YOUR TOKEN>

Development Version

To run the latest from main:

Field Value
Command uvx
Arguments --from, git+https://github.com/briandconnelly/mcp-server-ipinfo, mcp-server-ipinfo
Environment IPINFO_API_TOKEN = <YOUR TOKEN>

Tools

  • ipinfo_lookup_my_ip() — Geolocate the calling client's own IP. Takes no arguments. On stdio transports the result reflects this server's outbound IP, not the end user's.
  • ipinfo_lookup_ips(ips, detail="full") — Geolocate one or more specified IPs. detail="summary" strips heavy nested blocks (continent, flags, currency, abuse, domains) for batch token savings while preserving shape parity. Capped at 500,000 IPs per call. Invalid or special-use addresses (private, loopback, etc.) are filtered with ctx.warning() and excluded from the result list — match returned IPDetails.ip values back to your input to detect what was dropped.
  • ipinfo_check_residential_proxy(ip) — Check whether an IP is a known residential-proxy exit node. Tagged enterprise — requires the IPInfo residential-proxy add-on.
  • ipinfo_generate_map_url(ips) — Build an interactive ipinfo.io map for a set of IPs. Returns a MapResult with the URL, the count that made the map, the IPs filtered out (with reasons, capped at 100), and a truncated flag.

Plan tiers

Tier Fields available
Free Lite (no token) country, country_code, continent, ASN basics
Core full geolocation, ASN details, privacy/VPN/proxy/Tor/hosting flags
Plus adds carrier and company data
Enterprise adds domains and abuse contacts
Residential-proxy add-on enables ipinfo_check_residential_proxy. Sold separately on top of Enterprise; not included by default.

Errors

Every tool raises a ToolError whose message is a JSON-encoded envelope with a stable code (invalid_ip_address, special_ip_unsupported, no_valid_ips, too_many_ips, auth_invalid, auth_insufficient_scope, quota_exceeded, timeout, api_error, unknown_error), a temporary flag, optional retry_after_ms, and a repair hint. Agents should parse the message as JSON and branch on code.

Deprecated tools

get_ip_details, get_residential_proxy_info, and get_map_url are forwarding aliases retained from 0.4.x. They are tagged deprecated and will be removed in 0.6.0. New code should call the ipinfo_* tools directly.

Configuration

Environment Variables

Variable Description Default
IPINFO_API_TOKEN IPInfo API token. Without it the server runs in free Lite mode. unset (Lite)
IPINFO_CACHE_TTL Per-IP cache TTL in seconds. Cached results retain their original ts_retrieved timestamp. 3600
IPINFO_CACHE_SIZE Maximum cache entries before oldest-first eviction. 4096

License

MIT License — see LICENSE. Release history in CHANGELOG.md.

Disclaimer

This project is not affiliated with IPInfo.

Metadata

Release files for mcp-server-ipinfo 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-ipinfo 0.5.0
File Size Uploaded Provenance Actions
mcp_server_ipinfo-0.5.0.tar.gz 137.8 kB Without provenance Details for mcp_server_ipinfo-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-ipinfo 0.5.0
File Interpreter ABI Platform Actions
mcp_server_ipinfo-0.5.0-py3-none-any.whl Python 3 none any Details for mcp_server_ipinfo-0.5.0-py3-none-any.whl

Total release size: 159.4 kB

Release files / mcp_server_ipinfo-0.5.0.tar.gz

Download URL mcp_server_ipinfo-0.5.0.tar.gz
Size 137.8 kB
Tags Source
SHA-256 checksum
How to use checksums
10d1170235d27251621131e09caf44e7c9c092661d311e3941cba3289e87b7de
BLAKE2b-256 checksum
How to use checksums
d201c574d919b70af5c276768ba7d6df8d17ee7c3974abec8dca88cef379ed81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mcp_server_ipinfo-0.5.0-py3-none-any.whl

Download URL mcp_server_ipinfo-0.5.0-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6256c87cb3f58ebe7c0e6045bed5482bc3e3ecdd4499fa929387caf88db777c
BLAKE2b-256 checksum
How to use checksums
6091d27905151d49b5cb23d222e767625fb3560eda7885ce42cfeaf41811b258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mcp-server-ipinfo 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page