IP2Location.io API integration to retrieve the geolocation information for an IP address.
This is a simple Model Context Protocol (MCP) server implementation for IP2Location.io API. It will return a detailed geolocation information for any given IPv4 or IPv6 address.
FastMCP
tool, allowing for easy integration into compatible systems.httpx
for non-blocking asynchronous API requests.This MCP server supports to query without an API key, with a limitation of 1,000 queries per day. You can also sign up for a free API key and enjoy up to 50,000 queries per month.
The setup also use uv
, which can be install by following the guide.
To use this MCP server with Claude Desktop, download the repository to your local, and add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"ip2locationio": {
"command": "uv",
"args": [
"--directory",
"/path/to/ip2locationio/src",
"run",
"server.py"
],
"env": {
"IP2LOCATION_API_KEY": "<YOUR API key HERE>"
}
}
}
}
To get your API key, just login to your dashboard and get it from there.
Restart the Claude Desktop after save the changes, and you shall see it pops out in the Search and tools
menu.
Just enter your query about the IP in a chat in Claude Desktop. Some of the example query will be:
For instance, below is the result of the IP 8.8.8.8:
In Claude Desktop, the model will automatically generate the output based on the result returned by IP2Location.io MCP server.
IP2LOCATION_API_KEY
The IP2Location.io API key, which allows you to query up to 50,000 per month and more details of the IP address. You can sign up for a free API key, or subscribe to a plan to enjoy more benefits.
get_geolocation
Description Fetch geolocation for the given IP address. It helps users to retrieve detailed information such as country, region, city, latitude, longitude, ZIP code, time zone, ASN, and proxy information for any IPv4 or IPv6 address.
Arguments ip (str): The IP address (IPv4 or IPv6) to analyze.
Returns A JSON string containing the geolocation data. The result may include the following fields, depending on your API plan:
If the request fails or the IP address is invalid, the tool will return an error message as a string.
See the LICENSE file.
Fetch, convert, and search AWS documentation pages, with recommendations for related content.
Search campgrounds around the world on campertunity, check availability, and provide booking links.
Lightning-Fast, High-Accuracy Deep Research Agent 👉 8–10x faster 👉 Greater depth & accuracy 👉 Unlimited parallel runs
Search Engine made for AIs by Exa
All-in-One SEO & Web Intelligence Toolkit API from FetchSERP.
RAG Search over your content powered by Inkeep
Search the web using Kagi's search API
Unlock geospatial intelligence through Mapbox APIs like geocoding, POI search, directions, isochrones and more.
Provides AI assistants with direct access to Mastra.ai's complete knowledge base.
Interact & query with Meilisearch (Full-text & semantic search API)