- Home
- MCP servers
- IP2Location
IP2Location
- python
12
GitHub Stars
python
Language
6 months ago
First Indexed
2 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": {
"ip2location-mcp-ip2location-io": {
"command": "uv",
"args": [
"--directory",
"/path/to/ip2locationio/src",
"run",
"server.py"
],
"env": {
"IP2LOCATION_API_KEY": "<YOUR API key HERE>"
}
}
}
}You can run this MCP server to fetch detailed geolocation and networking information for any IPv4 or IPv6 address. It leverages IP2Location.io data and exposes a simple MCP interface that you can query from compatible clients to obtain location, ASN, ISP, proxy indicators, and related details without reaching for a separate API key (with rate limits) or a paid plan.
How to use
You will run the MCP server locally and connect to it using an MCP client. The server is started through a package manager and a small Python script. Once running, you can ask it questions like “Where is IP X located?” and you will receive a structured geolocation response containing location, network, and security data for the specified IP.
How to install
Prerequisites you need before starting are a supported package manager, Python, and a local setup that can run MCP servers.
-
Prepare your local environment by installing the required package manager.
-
Obtain the IP2Location MCP server files and place them on your local machine in a directory you can reference as /path/to/ip2locationio.
-
Create or edit your MCP client configuration to point to the local MCP server using the run command below.
{
"mcpServers": {
"ip2locationio": {
"command": "uv",
"args": [
"--directory",
"/path/to/ip2locationio/src",
"run",
"server.py"
],
"env": {
"IP2LOCATION_API_KEY": "<YOUR API key HERE>"
}
}
}
}
Additional setup and notes
-
The MCP server supports querying without an API key with a limit of 1,000 queries per day. You may also obtain a free API key to lift the limit up to 50,000 queries per month.
-
The server uses a local runtime via a stdio configuration. The recommended start command is the one shown in the setup snippet above, which runs the Python-based server from the specified directory.
-
Ensure the environment variable IP2LOCATION_API_KEY is set in the server configuration if you plan to use the higher query limit.
Environment variables
IP2LOCATION_API_KEY is required to access higher query limits and richer data. Use a valid API key string or a placeholder during setup.
Tool
get_geolocation fetches geolocation data for a given IP address and returns comprehensive details such as country, region, city, coordinates, ASN, ISP, domain, proxy information, and more.
Available tools
get_geolocation
Fetch geolocation data for the given IP address, returning comprehensive details such as country, region, city, coordinates, ASN, ISP, proxy info, and more.