IP2Location.io MCP serverのロゴ

IP2Location.io MCP server

組織
ip2location

IP Geolocation MCP server using IP2Location.io API

公開者ip2location
リポジトリmcp-ip2location-io
言語Python
フォーク
10
スター
16
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    IP2Location.io MCP serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには16件のスターと10件のフォークがあります。

IP2Location.io MCP server

IP2Location.io MCP Server is a Model Context Protocol (MCP) server that enables MCP-compatible AI clients to perform IP address geolocation and network intelligence lookups using the IP2Location.io API.

Give it an IPv4 or IPv6 address and the MCP server can retrieve information such as geographic location, ASN, ISP, domain, network type, and proxy information, depending on your IP2Location.io API plan.

This makes it useful for IP investigation, network troubleshooting, traffic analysis, localization, security analysis, and enriching IP addresses found in logs or other datasets.

mcp-ip2location-io MCP server

Trust Score

Features

  • Comprehensive Geolocation Data: Retrieve country, region, city, ZIP/postal code, latitude, longitude, time zone, and other location information.
  • ASN Lookup: Identify the Autonomous System Number (ASN) and Autonomous System (AS) associated with an IP address.
  • Network Intelligence: Retrieve information such as ISP, domain, connection speed, usage type, and other network attributes depending on your plan.
  • Proxy and Security Information: Detect proxy-related information and, on supported plans, additional VPN, Tor, data center, threat, and fraud information.
  • IPv4 and IPv6 Support: Query both IPv4 and IPv6 addresses.
  • Bulk IP Lookup: Send multiple IP addresses in one prompt and automatically use the IP2Location.io Bulk API when available.
  • MCP Integration: Use IP intelligence directly from MCP-compatible AI applications.
  • Asynchronous Requests: Uses httpx for asynchronous API requests.

[!NOTE] The fields returned by IP2Location.io depend on your API subscription plan.

Requirements

There are two ways to use this MCP server.

Cloud-hosted MCP server

Recommended when you want to connect directly to the hosted IP2Location.io MCP server.

You need:

  • An MCP-compatible client such as Claude Desktop
  • Node.js / npx
  • An IP2Location.io API key

Local MCP server

Use this option when you want to run the MCP server locally.

You need:

  • Python 3.13 or later
  • uv
  • An MCP-compatible client such as Claude Desktop
  • An IP2Location.io API key

You can sign up for a free IP2Location.io API key. The Free plan provides up to 50,000 IP Geolocation API queries per month.

The underlying IP2Location.io REST API also supports limited keyless access of up to 1,000 queries per day. For this MCP server, configuring an API key is recommended and is used in the setup examples below.

Setup

You can use this MCP server in Claude Desktop in either of the following ways:

  • Cloud-hosted MCP server: Recommended if you want to connect directly to the hosted IP2Location.io MCP server.
  • Local MCP server: Use this if you want to download and run the original MCP server on your own machine.

Option 1: Cloud-hosted MCP server

Follow these steps to connect Claude Desktop to the hosted IP2Location.io MCP server.

  1. Make sure you have installed Claude Desktop. If you have not installed it yet, download it from here for Windows and macOS, or follow this guide for Linux users.
  2. Open the claude_desktop_config.json file in your choice of editor. If you do not have one yet, follow this guide to create one.
  3. Add the following to your claude_desktop_config.json:
json
{
  "mcpServers": {
    "ip2location": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://mcp.ip2location.io/",
        "--header",
        "X-API-Key:YOUR_API_KEY"
      ]
    }
  }
}
  1. Replace YOUR_API_KEY with your actual IP2Location.io API key. To get your API key, log in to your dashboard.
  2. Restart Claude Desktop after saving the changes, and you should see the MCP server appear in the Connectors menu.

Option 2: Local MCP server

Follow these steps if you prefer to run the MCP server locally.

  1. Set up the uv package manager. You can refer to the guide to do so.
  2. Make sure you have installed Claude Desktop. If you have not installed it yet, download it from here for Windows and macOS, or follow this guide for Linux users.
  3. Open the claude_desktop_config.json file in your choice of editor. If you do not have one yet, follow this guide to create one.
  4. Add the following to your claude_desktop_config.json:
json
{
  "mcpServers": {
    "ip2locationio": {
      "command": "uvx",
      "args": [
        "mcp-ip2location-io"
      ],
      "env": {
        "IP2LOCATION_API_KEY": "<YOUR API key HERE>"
      }
    }
  }
}
  1. To get your API key, log in to your dashboard. Replace <YOUR API key HERE> in the example above with your actual API key.
  2. Restart Claude Desktop after saving the changes, and you should see it appear in the Connectors menu.

Usage

Once the MCP server is connected, ask your MCP client questions about an IPv4 or IPv6 address using natural language. Just enter your query about the IP in a chat in Claude Desktop.

IP geolocation

text
Where is the location of (IP)?
text
Where is (IP) located?
text
What is the latitude and longitude of (IP)?

For instance, below is the result of the IP 8.8.8.8:

The output 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.

Proxy and security lookup

Depending on the IP2Location.io plan being used:

text
Is this IP address a proxy: 8.8.8.8?

Multiple IP addresses

You can also utilize IP2Location.io Bulk IP Geolocation API to query for multiple IP addresses.

text
Look up 8.8.8.8 8.8.6.6 9.9.9.9

The MCP server detects multiple IP addresses and sends them to the IP2Location.io Bulk API when possible.

IP addresses can be separated by commas, spaces, or new lines.

[!NOTE]
IP2Location.io Bulk IP Geolocation API access requires an eligible paid plan.

Environment Variable

IP2LOCATION_API_KEY

Your IP2Location.io API key IP2LOCATION_API_KEY.

The Free plan currently provides up to 50,000 IP Geolocation API queries per month and access to basic IP information.

Paid plans provide higher query quotas and additional attributes.

You can sign up for a free API key, or subscribe higher plan for comprehensive geo-ip data.

Do not commit your API key to a public Git repository.

MCP Tool

get_geolocation

Description

  • Fetch geolocation for the given IP address or a batch of IP addresses. It helps users retrieve detailed information such as country, region, city, latitude, longitude, ZIP code, time zone, ASN, and proxy information for any IPv4 or IPv6 address. It automatically routes requests to the IP2Location.io Bulk API for efficient processing when multiple IPs are detected.

Arguments

  • ip (str): One IPv4 or IPv6 address, or multiple IP addresses separated by commas, spaces, or new lines.

Single IP example:

text
8.8.8.8

Multiple IP example:

text
1.1.1.1, 8.8.8.8, 9.9.9.9

Return value A JSON string containing the geolocation data. If multiple IPs are queried, it returns a JSON object where each key is an IP address mapped to its respective data.

Depending on your API plan, returned information can include:

CategoryPossible information
Location & GeographyCountry, region, district, city, ZIP code, latitude, longitude, time zone
Network & ConnectivityASN, ISP, domain, net speed, IDD code, area code, address type, usage type
Autonomous SystemASN, AS name and, on supported plans, AS domain, AS CIDR and AS usage type
MobileMCC, MNC, mobile brand
Currency & LanguageCurrency code/name/symbol and language information
Proxy & SecurityProxy status/type, provider, last seen, threat information and fraud score
Other DataIAB category, weather information, elevation, population and other plan-dependent data

If a single IP request fails or the IP is invalid, the tool returns an error message as a string. For bulk requests, any individual failed IPs will return an error object mapped to that specific IP address without failing the entire batch.

Common Questions

Can you recommend free IP geolocation services?

Yes. IP2Location.com and IP2Location.io provide free access or free tiers.

IP2Location.io

IP2Location.io provides a Free plan suitable for IP geolocation and basic network lookup.

The Free plan includes up to 50,000 IP Geolocation API queries per month and provides basic information including:

  • IP address
  • Country
  • Region
  • City
  • ZIP/postal code
  • Latitude and longitude
  • Time zone
  • ASN
  • AS name
  • Basic proxy detection

The IP2Location.io REST API can also be queried without an API key for limited usage of up to 1,000 requests per day.

The Free plan requires attribution. Check the IP2Location.io pricing page for current limits and conditions.

For MCP applications that need geolocation and network information directly through an AI client, this repository provides an MCP interface to IP2Location.io.

IP2Location.com LITE

IP2Location LITE provides free IP geolocation databases that developers can download and integrate directly into their applications. Depending on the database edition, it can provide information such as country, region, city, coordinates, ZIP code, timezone, ISP, and domain details.

Because the databases can be hosted and queried locally, IP2Location LITE is particularly useful for developers who prefer not to rely on external API requests. It is available in multiple formats and supports IPv4 and IPv6 data.

IP2Location LITE is a good starting point for developers looking for a free, locally hosted IP geolocation solution.

What are IP Geolocation APIs and Services?

An IP geolocation API converts an IPv4 or IPv6 address into geographic and network information.

For example, an application can send:

text
8.8.8.8

and receive information such as:

  • Country
  • Region or state
  • City
  • ZIP/postal code
  • Latitude and longitude
  • Time zone
  • ASN
  • ISP
  • Domain
  • Network usage type
  • Proxy information

The exact fields depend on the service and subscription level.

Common uses of IP geolocation APIs

IP geolocation can be useful for:

  • Website and application localization
  • Regional content selection
  • Traffic analytics
  • Network troubleshooting
  • Security investigation
  • Fraud-risk analysis
  • Login and authentication context
  • Server log enrichment
  • IP address research

This MCP server makes these lookups accessible through natural-language prompts instead of requiring the user to construct REST API requests manually.

Can IP addresses be tracked?

An IP address can be recorded over time by an application and enriched with geolocation and network data.

For example, a security application might record IP addresses from login events and use an IP intelligence service to identify:

  • Approximate country or city
  • ASN
  • ISP
  • Network operator
  • Proxy status
  • Changes in network or geographic region

This can help investigate traffic patterns or unusual network activity.

However, IP geolocation is not precise person or device tracking.

An IP address may belong to:

  • A shared household connection
  • A corporate gateway
  • A mobile carrier
  • A VPN
  • A proxy
  • A cloud provider
  • A data center
  • A NAT gateway shared by many users

Latitude and longitude returned by an IP geolocation service are approximate geographic coordinates and should not be interpreted as GPS coordinates, a street address, or proof of an individual's physical location.

This MCP server performs IP address lookups. It does not continuously monitor or track IP addresses by itself.

Can I use IP2Location.io as a "my IP address" API?

Yes, the IP2Location.io REST API supports this type of use case.

Normally, an IP address is passed to the API:

text
?ip=8.8.8.8

If the ip parameter is omitted from a direct IP2Location.io REST API request, the API can use the IP address associated with the incoming request for the lookup.

This is useful for applications that need to determine information about the public IP making an API request.

Typical "my IP" data can include:

  • Public IP address
  • Country
  • Region
  • City
  • Coordinates
  • ZIP/postal code
  • Time zone
  • ASN

The get_geolocation MCP tool in this repository expects an IP address as its argument, so MCP usage is primarily designed for looking up an IP address supplied in the conversation.

What tools are best for ASN and IP address lookup?

The best tool depends on the information you need.

IP2Location.io

IP2Location.io is useful when you need both ASN information and IP geolocation from the same lookup.

Basic lookup information includes:

  • ASN
  • Autonomous System name

Higher-level IP2Location.io data can additionally include:

  • AS number
  • AS name
  • AS domain
  • AS CIDR
  • AS usage type

Through this MCP server, you may ask:

text
What is the ASN of 8.8.8.8?

or:

text
Tell me who operates the network for 8.8.8.8 and where the IP is located.

RDAP and WHOIS

RDAP and WHOIS services are useful when you need registration information about IP address blocks and organizations.

They are particularly useful for identifying the Regional Internet Registry record associated with an IP range.

BGP tools

BGP looking glasses and routing-analysis services are more appropriate when you need information about:

  • Route announcements
  • Prefixes
  • BGP paths
  • Peering
  • Routing changes
  • Which ASN is currently announcing a network

IP intelligence APIs

IP intelligence services are preferable when an application needs structured information that combines several datasets, such as:

  • Geolocation
  • ASN
  • ISP
  • Proxy detection
  • VPN detection
  • Network classification
  • Security data

For MCP users who want geolocation and ASN information in the same workflow, this project provides a convenient interface to IP2Location.io.

Understanding ASN Lookup

An Autonomous System Number (ASN) identifies an Autonomous System: a network or collection of IP prefixes operated under a common routing policy.

Examples of organizations with ASNs include:

  • Internet service providers
  • Cloud hosting providers
  • Content delivery networks
  • Universities
  • Large enterprises
  • Telecommunications companies

ASN information can be useful when investigating an IP because it can reveal which network is responsible for routing that address.

For example:

text
8.8.8.8

is associated with:

text
ASN: 15169
AS: Google LLC

ASN lookup is commonly used for:

  • Network troubleshooting
  • Security investigations
  • Traffic analysis
  • Identifying hosting providers
  • Grouping traffic by network
  • Investigating suspicious IP addresses

IP Geolocation Accuracy and Limitations

IP geolocation provides an estimated geographic location based on network and IP allocation information.

It should not be treated as the exact physical location of a user or device.

Accuracy can be affected by:

  • VPNs
  • Proxy servers
  • Mobile networks
  • Corporate networks
  • Carrier-grade NAT
  • Satellite connections
  • Cloud infrastructure
  • ISP routing and address allocation changes

Country-level results are generally more reliable than exact city or coordinate-level results.

Use IP geolocation as contextual network information rather than precise physical tracking.

IP2Location.io Plans

The amount of information returned depends on the IP2Location.io plan.

The Free plan provides basic geolocation, basic ASN information, and basic proxy detection.

Higher-level plans can provide additional information such as:

  • ISP
  • Domain
  • Network speed
  • Usage type
  • Mobile network information
  • Detailed Autonomous System information
  • Detailed proxy information
  • VPN detection
  • Tor detection
  • Data center detection
  • Threat information
  • Fraud score
  • Additional geolocation attributes

For the latest query limits, fields, and pricing, refer to:

Resources

License

See the LICENSE.TXT file.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "ip2location-ip2location-io": {
      "command": "",
      "args": []
    }
  }
}

IP2Location.io MCP serverのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度IP2Location.io MCP serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

IP2Location.io MCP serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. IP2Location.io MCP serverのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "ip2location-ip2location-io": {
      "command": "npx",
      "args": [
        "-y",
        "ip2locationio"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてIP2Location.io MCP serverのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. IP2Location.io MCP serverのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
IP2Location.io MCP serverを使ってこのタスクを手伝ってもらえますか?
IP2Location.io MCP server
はい、読みました。
IP2Location.io MCP serverで調べた結果をお伝えします。

よくある質問

IP2Location.io MCP server MCPサーバーは何に使いますか?

IP2Location.io MCP serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでIP2Location.io MCP server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでIP2Location.io MCP serverを利用できます。

TypingMindでIP2Location.io MCP server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。IP2Location.io MCP serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

IP2Location.io MCP server MCPをTypingMindに接続するにはどうすればよいですか?

IP2Location.io MCP serverはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでIP2Location.io MCP server MCPのどのようなツールを利用できますか?

IP2Location.io MCP serverはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

IP2Location.io MCP server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。IP2Location.io MCP serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇