Skip to main content
Glama
IP Geolocation MCP Server

IP Geolocation MCP Server

IP 地理位置 MCP 服务器

PyPI CI License: MIT

这是一个简单的 模型上下文协议 (Model Context Protocol) 服务器,它使用 ipinfo.io API 来获取有关 IP 地址的详细信息。 这可用于确定用户的大致位置以及他们正在使用的网络。

使用 mcp-server-ipinfo 的对话示例

安装

你需要创建一个令牌 (token) 才能使用 IPInfo API。 如果你还没有令牌,可以在 https://ipinfo.io/signup 注册一个免费账户。

虽然每个客户端指定方式不同,但通常你会使用以下值:

字段

值

命令

uvx

参数

mcp-server-ipinfo

环境变量

IPINFO_API_TOKEN = <YOUR TOKEN>

开发版本

如果你想使用最新版本,可以直接从 GitHub 拉取服务器。 只需添加一个额外的 --from 参数:

字段

值

命令

uvx

参数

--from, git+https://github.com/briandconnelly/mcp-server-ipinfo, mcp-server-ipinfo

环境变量

IPINFO_API_TOKEN = <YOUR TOKEN>

Related MCP server: GeoIP MCP Server

组件

工具

  • get_ip_details: 获取一个或多个 IP 地址的详细信息,包括位置、ISP 和网络详情。

    • 输入: ips (可选): 要分析的 IP 地址列表(IPv4 或 IPv6)。如果未提供,则分析请求客户端的 IP 地址。

    • 输出: 包含位置、组织、时区等的 IPDetails 列表。

    • 注意: 批量查询(多个 IP)需要 IPINFO_API_TOKEN。

  • get_residential_proxy_info: 检查 IP 地址是否与住宅代理服务相关联。

    • 输入: ip: 要检查住宅代理使用情况的 IP 地址。

    • 输出: 包含代理服务名称、最后可见日期和活动百分比的 ResidentialProxyDetails。

    • 注意: 需要具有住宅代理数据访问权限的 IPINFO_API_TOKEN。

  • get_map_url: 生成 IP 地址交互式地图可视化的 URL。

    • 输入: ips: 要可视化的 IP 地址列表(最多 500,000 个)。

    • 输出: 指向 ipinfo.io 上显示地理位置的交互式地图的 URL。

    • 注意: 对于可视化流量或用户的地理分布非常有用。

配置

环境变量

变量

描述

默认值

IPINFO_API_TOKEN

用于高级功能的 IPInfo API 令牌

无(仅限基础查询)

IPINFO_CACHE_TTL

缓存生存时间 (秒)

3600 (1 小时)

许可证

MIT 许可证 - 详情请参阅 LICENSE 文件。发布历史请参阅 CHANGELOG.md。

免责声明

本项目与 IPInfo 无关联。

Available Tools

5 tools
ipinfo_check_residential_proxyCheck Residential ProxyA
Read-onlyIdempotent

Classify whether an IP is a known residential-proxy exit node.

Returns ResidentialProxyDetails with is_residential_proxy (the canonical yes/no), and — when true — service, last_seen (YYYY-MM-DD), and percent_days_seen over a 7-day window. Useful for fraud, bot, and ad-fraud detection. This is distinct from the general privacy flags on ipinfo_lookup_ips (VPN / Tor / open web proxy / hosting): use this tool only to detect residential-proxy networks that route traffic through real residential IPs. Requires IPINFO_API_TOKEN with the Enterprise residential-proxy add-on; absence surfaces as auth_insufficient_scope (distinct from auth_invalid for a missing/wrong token).

Inputs: ip (required). Returns: Residential proxy detection information. Identifies whether an IP is part of a…

ipinfo_generate_map_urlGenerate IP Map URLA
Read-onlyIdempotent

Build an interactive ipinfo.io map for a set of IPs.

Returns MapResult{url, mapped_ip_count, skipped_ips, skipped_count, truncated}. skipped_ips is a list of {ip, reason} entries for filtered inputs, capped at 100; truncated flags overflow. skipped_count is the true total even when the list is capped, so mapped_ip_count + skipped_count equals the input length. Errors raise ToolError with a JSON-encoded envelope.

Inputs: ips (required). Returns: Structured response from ``ipinfo_generate_map_url``. Replaces the bare-URL str…

ipinfo_lookup_ipsLook Up IPsA
Read-onlyIdempotent

Geolocate one or more IPs and return ISP/ASN details.

Returns a list in input order (after dedup and invalid-IP filtering); match results back to your input via the ip field. IPs that fail upstream are omitted and logged; if the batch resolves no IPs at all the failure is raised rather than masked — auth_insufficient_scope when the upstream returned nothing (token tier likely lacks /batch access; look IPs up one at a time or upgrade to Core+), otherwise a retryable api_error. Defaults to detail="summary" (heavy nested blocks omitted); pass detail="full" for every field. Capped at 1,000 IPs per call (too_many_ips above that): this tool returns one record per IP, so for larger batches use ipinfo_summarize_ips (fixed-size aggregates) or ipinfo_generate_map_url. Higher plan tiers populate more fields; see the server instructions for the Lite/Core/Plus/Enterprise tier mapping. For VPN/Tor/open-proxy/hosting detection read the privacy flags on each record; for residential-proxy exit-node classification use the separate ipinfo_check_residential_proxy tool. Typically completes in seconds; bounded by a 120s tool timeout that surfaces as a timeout envelope. Errors raise ToolError with a JSON-encoded envelope.

Inputs: ips (required), detail. Returns: result

ipinfo_lookup_my_ipLook Up My IPA
Read-onlyIdempotent

Geolocate the calling client's own IP. No arguments.

On stdio transports the result is this server's outbound IP, not the end user's. Use ipinfo_lookup_ips when the caller already has a specific IP. Errors raise ToolError with a JSON-encoded envelope.

Inputs: no named parameters. Returns: Comprehensive IP address information including geolocation, network, and metada…

ipinfo_summarize_ipsSummarize IPsA
Read-onlyIdempotent

Aggregate one or more IP lookups into counts and percentages.

Uses the same validation, deduplication, cache, and upstream batch lookup path as ipinfo_lookup_ips, but returns fixed-size summary buckets instead of per-IP records. This is the preferred tool for large log-analysis tasks such as "where did visitors come from?" when the caller does not need the underlying records. Percentages are based on mapped_ip_count; filtered and failed IPs are counted separately. Errors raise ToolError with a JSON-encoded envelope.

Inputs: ips (required), group_by, top_n. Returns: Fixed-size aggregate summary for a batch of IP lookups.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool performs a distinct function: residential proxy detection, map generation, IP lookup (batch), own IP lookup, and summary aggregation. Their purposes are clearly separated with no overlap.

    Naming Consistency5/5

    All tools follow the consistent 'ipinfo_verb_noun' pattern (e.g., ipinfo_lookup_ips, ipinfo_summarize_ips), making the naming predictable and easy to understand.

    Tool Count5/5

    With 5 tools covering geolocation, map visualization, and specialized proxy detection, the count is well-scoped for an IP geolocation service without unnecessary bloat.

    Completeness4/5

    The set covers core operations (lookup, self-lookup, batch, summary, map) and residential proxy detection. Minor gaps like WHOIS or IP range queries are absent but reasonable for the domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP (Multi-Agent Conversation Protocol) server that enables natural language interaction with the AbstractAPI geolocation service, allowing users to retrieve geographic information about IP addresses.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides IP geolocation services using MaxMind's GeoIP2 databases, allowing users to retrieve geographical information for single or multiple IP addresses including country, city, coordinates, and ASN details.
      GPL 3.0
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides access to the Netdetective API for querying information about IP addresses. It enables users to retrieve metadata for a specified IP address or the connecting client's default IP address.
      1
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      MCP server for IP geolocation lookups using ipinfo.io, with single, own, and batch queries.
      1
      MIT