- Home
- MCP servers
- IPInfo
IPInfo
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nimblebraininc-mcp-ipinfo": {
"command": "uv",
"args": [
"run",
"mcp-ipinfo"
],
"env": {
"IPINFO_API_TOKEN": "your_ipinfo_api_token_here"
}
}
}
}You can deploy the IPInfo MCP Server to access a comprehensive, strongly-typed interface for IP information through MCP clients. It implements the complete IPInfo OpenAPI, exposes a wide set of tools for IP data, privacy checks, and WHOIS lookups, and includes a built-in skill to guide tool usage and context reuse for LLMs.
How to use
Power your MCP client with the IPInfo MCP Server to perform lookups, privacy checks, WHOIS, and domain/IP analytics. Use the available tools to fetch current IP data, batch results, or domain-related information. Take advantage of the built-in skill to optimize tool selection and context reuse across follow-up questions.
How to install
Prerequisites: you need Python 3.13 or later and the following libraries installed in your environment: aiohttp, fastmcp, pydantic, and mcp.
# Using uv (recommended)
uv pip install -e .
# Or with pip
pip install -e .
Additional sections
Configuration is simple: you must provide your IPInfo API token as an environment variable to enable all IPInfo endpoints.
export IPINFO_API_TOKEN=your_token_here
Testing
After installation, verify the implementation by running the test client to ensure all IPInfo endpoints respond as expected.
python test_client.py
API client usage
You can also directly use the Python API client within your code to interact with the server. The example demonstrates retrieving current IP information, specific IP lookups, and privacy results via the Plus API.
import asyncio
from mcp_ipinfo.api_client import IPInfoClient
async def main():
async with IPInfoClient() as client:
info = await client.get_current_info()
print(f"Current IP: {info.ip}")
print(f"Location: {info.city}, {info.country}")
google = await client.get_info_by_ip("8.8.8.8")
print(f"Google DNS: {google.org}")
plus_info = await client.get_plus_info("1.1.1.1")
print(f"VPN detected: {plus_info.anonymous.is_vpn}")
print(f"ASN: {plus_info.as_info.asn}")
asyncio.run(main())
Type safety
All models are strongly typed using Pydantic to ensure reliable, predictable data handling across all API responses.
Available tools
get_ip_info
Retrieve comprehensive information for a single IP, including geo, ASN, and basic network details.
get_plus_ip_info
Fetch full IP intelligence via the Plus API, including privacy and advanced data.
get_account_info
Return API account limits and features available to your token.
batch_lookup
Lookup multiple IPs in a single call and return aggregated results.
summarize_ips
Provide summary statistics for a list of IPs.
map_ips
Create a visual map of IP locations from a set of IPs.
get_company_info
Obtain company details associated with an IP.
get_carrier_info
Retrieve mobile carrier information for an IP.
get_residential_proxy_info
Detect residential proxy services for an IP.
get_abuse_contact
Fetch the abuse contact information for an IP.
get_hosted_domains
List domains hosted by the given IP.
get_ip_ranges
Return IP ranges tied to a domain.
whois_lookup_by_ip
Perform a WHOIS lookup for a specific IP address.
whois_lookup_by_domain
Perform a WHOIS lookup for a specific domain.
whois_lookup_by_asn
Perform a WHOIS lookup for a specific ASN.
get_ip_city
Return only the city for a given IP.
get_ip_country
Return only the country code for a given IP.
get_ip_region
Return only the region/state for a given IP.
get_ip_location
Return only the geographic coordinates for a given IP.
get_ip_postal
Return only the postal code for a given IP.
get_ip_timezone
Return only the timezone for a given IP.
get_ip_hostname
Return only the hostname for a given IP.
get_ip_org
Return only the organization/ASN for a given IP.