The Model Context Protocol (MCP) server is a lightweight communication interface designed to manage and coordinate AI model execution within a structured runtime environment. It acts as a standardized interface connecting language models with external tools, plugins, or services, allowing for dynamic interaction and real-time context handling. An MCP server helps to improve the model performance in complex or multi-step tasks. This helps the developers in building an application that is intelligent, extensible and well integrated with various data sources.
IP2Location.io MCP server is designed to serve the geolocation information of an IP address in the MCP client. In this tutorial, we are going to show how to use the IP2Location.io MCP server in Claude Desktop to get the geolocation information of an IP address.
Prerequisites
This tutorial will use Claude Desktop for the demonstration. You can download it here if you haven’t installed it yet. For Linux user, kindly visit this guide for creating a custom client as Antrophic has yet to release for Linux.
The IP2location.io MCP server works in the Python environment with the uv
package manager, you can follow this guide to learn how to install it. The IP2location.io MCP server works best with an API key. You can sign up for a free API key to unlock a higher query limit and richer geolocation information.
Steps to setup the IP2Location.io MCP server in Claude Desktop
- Download the latest release of the IP2Location.io MCP server from the repo.
- Open the
claude_desktop_config.json
file in your favorite editor. If you do not have the file in your local, read this guide to learn how to create one in your local. - Add the following code to the file and save it.
{ "mcpServers": { "ip2locationio": { "command": "uv", "args": [ "--directory", "/path/to/ip2locationio", "run", "ip2locationio.py" ], "env": { "IP2LOCATION_API_KEY": "<YOUR API key HERE>" } } } }
- Restart the Claude Desktop after saving the changes, and you should see it appear in the
Search and tools
menu.

How to use the IP2Location.io MCP server in Claude Desktop?
To use the IP2Location.io MCP server, just ask for an IP address in the new chat. For instance, below is the screenshot of an example of querying the 8.8.8.8:

If you encountered the following dialog, kindly choose either Allow always or Allow once:
