IM

ip2location/mcp-ip2location-io

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

16 stars 10 forks 质量 84 趋势 41MIT

IP Geolocation MCP server using IP2Location.io API

概览

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. - : Retrieve country, region, city, ZIP/postal code, latitude, longitude, time zone, and other location information. - : Identify the Autonomous System Number (ASN) and Autonomous System (AS) associated with an IP address. - : Retrieve information such as ISP, domain, connection speed, usage type, and other network attributes depending on your plan.

README

以下为原文 README 节选,完整内容请查看原文。

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.

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 can connect in either of two ways:

  • Direct HTTP connection: Your MCP client supports remote (streamable HTTP) MCP servers. No extra software is required.
  • Via npx: Your MCP client only supports local (stdio) servers. This uses the mcp-remote package to bridge to the hosted server.

You need:

  • An MCP-compatible client such as Claude Desktop
  • An IP2Location.io API key
  • Node.js / npx (only for the npx connection method)

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
在 GitHub 查看完整 README

安装

npx -y mcp-remote@latest https://mcp.ip2location.io/ --header X-API-Key:YOUR_API_KEY
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "ip2location": { "type": "http", "url": "https://mcp.ip2location.io/", "headers": { "X-API-Key": "YOUR_API_KEY" } } } }