mcp-ip2location-io
IP Geolocation MCP server using IP2Location.io API
claude mcp add --transport stdio ip2location-mcp-ip2location-io uv --directory /path/to/ip2locationio/src run server.py \ --env IP2LOCATION_API_KEY="<YOUR API key HERE>"
How to use
This MCP server exposes IP geolocation data by querying the IP2Location.io API. It runs as a FastMCP-compatible tool named get_geolocation, which takes a single parameter: ip (a string IPv4 or IPv6 address). When invoked, it returns a JSON string containing a wide range of geolocation, network, and security details such as country, region, city, latitude, longitude, ASN, ISP, proxy information, and more. It supports both unsigned queries (limited to 1,000 per day) and API-key authenticated queries (up to 50,000 per month) depending on whether you provide an API key. To use it, connect your MCP-enabled client (for example Claude Desktop) to the ip2locationio MCP server, then call get_geolocation with the target IP. The server will relay the request to IP2Location.io and return the resulting data.
Typical usage flow: install uv and connect to Claude Desktop (or your MCP client), configure the ip2locationio MCP server in your client configuration, and then run get_geolocation with an IP such as 8.8.8.8. The response will include location, network details, and proxy information as provided by IP2Location.io.
How to install
Prerequisites:
- A supported environment with Python and the uv package manager installed (per the MCP Quickstart guide).
- An IP2Location.io API key (optional if you want higher rate limits).
- Access to Claude Desktop (for using the provided Claude integration) or your preferred MCP client.
Installation steps:
-
Install uv according to the MCP quickstart guide
- Follow the guide at: https://modelcontextprotocol.io/quickstart/server#setup-your-environment
- Ensure the uv CLI is available in your PATH
-
Prepare the IP2Location MCP server files
- Clone or download the IP2Location MCP server repository and place it at a directory such as /path/to/ip2locationio/src
- Ensure server.py is in the src directory and is configured to use the IP2LOCATION_API_KEY if provided
-
Configure your environment (optional API key)
- If you have an API key, export or set it in the environment configuration for your MCP client or runtime:
- IP2LOCATION_API_KEY=<YOUR_API_KEY>
- If you have an API key, export or set it in the environment configuration for your MCP client or runtime:
-
Run the MCP server locally via uv
- Use the following command (adjust paths as needed): uv --directory /path/to/ip2locationio/src run server.py
-
Integrate with Claude Desktop or your MCP client
- Add the ip2locationio MCP server to your claude_desktop_config.json (as shown in the README example) and restart Claude Desktop.
-
Test the setup
- Call get_geolocation with an IP such as 8.8.8.8 and verify you receive a JSON payload containing location, ASN, ISP, proxy status, and other fields.
Additional notes
Notes and tips:
- If you omit an API key, IP2Location.io will allow up to 1,000 queries per day. Providing an API key increases the quota significantly.
- Ensure the IP2LOCATION_API_KEY is kept secret and not exposed in public configurations.
- The get_geolocation tool returns a JSON string; downstream clients should parse it accordingly to extract fields like country, city, latitude/longitude, ASN, ISP, proxy type, and threat indicators.
- If you encounter rate limiting, consider upgrading your IP2Location.io plan or caching common queries on the client side.
- Path placeholders like /path/to/ip2locationio/src should be replaced with your actual deployment path.
Related MCP Servers
Gitingest
mcp server for gitingest
ytt
MCP server to fetch YouTube transcripts
fegis
Define AI tools in YAML with natural language schemas. All tool usage is automatically stored in Qdrant vector database, enabling semantic search, filtering, and memory retrieval across sessions.
davinci -professional
An enterprise-grade MCP server that exposes the full functionality of DaVinci Resolve and DaVinci Resolve Studio (through version 20) to either Claude Desktop or Cursor MCP clients. Fully configured and tested as a Claude Desktop Extension making installation as easy as clicking a button. Supports both Windows and Macintosh.
openapi -proxy
An MCP server that provides tools for exploring large OpenAPI schemas
mcp-ip-geo
An MCP Server that provides IP geolocation lookup (country, region, city, etc.) via ip-api.com.