Integrating IP2Location.io with MCP Server

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 helps to improve the model performance in complex or multi-step tasks. The IP2Location.io MCP Server integration allows 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 directly from a chatbot.

How to use IP2Location.io MCP Server

  1. Download the latest release from IP2Location.io MCP Server GitHub repository.
  2. If you haven't installed the uv package manager before, kindly follow >this guide to install it.
  3. If you haven't installed the Claude Desktop application before, kindly download from >Claude website and install it.
  4. Open the claude_desktop_config.json file in your local. If you do not have the file, kindly following the steps in this guide to create one.
  5. Add the following content to you claude_desktop_config.json file:
    {
      "mcpServers": {
        "ip2locationio": {
          "command": "uv",
          "args": [
            "--directory",
            "/path/to/ip2locationio/src",
            "run",
            "server.py"
          ],
          "env": {
            "IP2LOCATION_API_KEY": "<YOUR API key HERE>"
          }
        }
      }
    }
    
    Remember to substitute the value of the /path/to/ip2locationio to the actual path of the IP2Location.io MCP server repository in your local.
  6. IP2Location.io MCP Server supports lookup with and without an API key. To use your API key in lookup, replace the value of the IP2LOCATION_API_KEY field in the above JSON. If you don't have one, please register for a free IP2Location.io API key. Once you have the API key, replaced the <YOUR API key HERE> in the above code with your actual API key.
  7. Restart your Claude Desktop application, and you should see it appear in the Search and tools menu. You shall able to lookup for an IP address using IP2Location.io by now.
  8. IP2Location.io MCP server in search and tools menu
  9. You will get the IP geolocation result as below. This is an example result for the IP address 8.8.8.8. IP2Location.io MCP server Result

Discover the World with IP Geolocation

Supercharge your business with Geolocation data.