Skip to main content
Glama
IPGeolocation

IP Geolocation MCP Server

IPGeolocation.io MCP 服务器

SafeSkill 89/100

npm version GitHub release MCP Registry Glama Node.js License

IPGeolocation.io 的官方 MCP 服务器。包含 16 个 MCP 工具:IP 地理位置、威胁/VPN/代理检测、时区查询与转换、日出/日落/月相数据、ASN 详情、滥用联系人以及用户代理解析。其中 7 个工具可在免费计划(每天 1,000 次积分)下使用。付费计划可解锁全部 16 个工具以及批量端点(每次调用最多 1,000 项)。

适用于 Claude Desktop、Cursor、Windsurf、VS Code、Codex、Cline、Glama 以及任何其他 MCP 客户端。

项目

软件包

ipgeolocation-io-mcp

版本

1.0.13

传输方式

stdio

Node.js

>=18

快速入门

  1. 创建免费的 IPGeolocation API 密钥

  2. Cursor 用户可以一键安装:

    Add to Cursor

  3. 将此配置添加到您的 MCP 客户端配置中(请参阅下方的 按客户端安装 以获取您客户端的确切配置文件路径):

{
  "mcpServers": {
    "ipgeolocation": {
      "command": "npx",
      "args": ["-y", "ipgeolocation-io-mcp"],
      "env": {
        "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
  1. 重启您的客户端。

  2. 测试它:询问 "Where is 8.8.8.8 located?"

目录

按客户端安装

要求

  • Node.js 18 或更高版本

  • 终端中可用 npx

  • 大多数工具需要 IPGeolocation.io API 密钥

get_my_ip 无需 API 密钥即可工作。其他所有工具都需要密钥。

注册免费的 IPGeolocation API 密钥

Codex CLI

codex mcp add ipgeolocation --env IPGEOLOCATION_API_KEY=<YOUR_API_KEY> -- npx -y ipgeolocation-io-mcp
codex mcp list

添加服务器后启动一个新的 Codex 会话。

Claude Desktop

添加到 claude_desktop_config.json

{
  "mcpServers": {
    "ipgeolocation": {
      "command": "npx",
      "args": ["-y", "ipgeolocation-io-mcp"],
      "env": {
        "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

保存后重启 Claude Desktop。我们还为支持 MCP Bundles 的客户端提供了 manifest.json

Cline

打开 MCP Servers 面板 > Configure > Advanced MCP Settings。添加到 cline_mcp_settings.json

{
  "mcpServers": {
    "ipgeolocation": {
      "command": "npx",
      "args": ["-y", "ipgeolocation-io-mcp"],
      "env": {
        "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

保存后重启 Cline。

Cursor

一键安装:

Add to Cursor

或者手动添加到 .cursor/mcp.json

{
  "mcpServers": {
    "ipgeolocation": {
      "command": "npx",
      "args": ["-y", "ipgeolocation-io-mcp"],
      "env": {
        "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

保存后重启 Cursor。

Windsurf

添加到 ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "ipgeolocation": {
      "command": "npx",
      "args": ["-y", "ipgeolocation-io-mcp"],
      "env": {
        "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

保存后重启 Windsurf。

VS Code / GitHub Copilot

添加到您的 VS Code settings.json

{
  "mcp": {
    "servers": {
      "ipgeolocation": {
        "command": "npx",
        "args": ["-y", "ipgeolocation-io-mcp"],
        "env": {
          "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
        }
      }
    }
  }
}

保存后重启 VS Code。

Glama

您可以直接在 Glama 上试用该服务器。仅需 IPGEOLOCATION_API_KEY。除非您想更改缓存、超时或输出限制,否则请将其他环境变量字段留空。

如果您还没有密钥,请 创建免费的 IPGeolocation API 密钥

任何其他 MCP 客户端

使用此配置:

{
  "command": "npx",
  "args": ["-y", "ipgeolocation-io-mcp"],
  "env": {
    "IPGEOLOCATION_API_KEY": "<YOUR_API_KEY>"
  }
}

验证是否有效

设置完成后尝试以下操作:

提示词

预期工具

Where is 8.8.8.8 located?

lookup_ip

For IP 49.12.212.42, give me security verdict, company, ASN, and city.

lookup_ip (带 fieldsinclude=security)

Is 2.56.12.11 safe to allow and what is the abuse contact email?

lookup_ip (带 include=security,abuse)

For AS1, list upstream ASN numbers only.

lookup_asn (带 include=upstreams)

Convert 2026-03-07 09:30 from New York to Tokyo time.

convert_timezone

Give sunrise times for Karachi from 2026-03-10 to 2026-03-15.

get_astronomy_time_series

Parse this user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

parse_user_agent

按计划划分的工具

免费计划

每天 1,000 次积分。提供以下 7 个工具:

工具

积分

功能

lookup_ip

1

单个 IP 的位置、时区、货币、ASN

get_my_ip

0

运行服务器的机器的公网 IP

lookup_currency

1

单个 IP 的货币和国家元数据

get_timezone

1

按名称、位置、IP、机场代码或 UN/LOCODE 查询时区

convert_timezone

1

两个位置之间的时区转换

get_astronomy

1

单个日期的日出、日落、月出、月落、暮光、月相

get_astronomy_time_series

1

日期范围内的每日天文数据(最多 90 天)

付费计划

包含全部 16 个工具。付费计划还为 lookup_ip 增加了 networkcompany 和扩展的 asn 字段,以及用于 securityabusehostnameliveHostnamehostnameFallbackLiveuser_agentgeo_accuracydma_code*include 参数。

工具

积分

功能

bulk_lookup_ip

每个 IP 1 点

最多 1,000 个 IP 的批量地理位置查询

check_security

2

VPN、代理、Tor、机器人、垃圾邮件和威胁标记

bulk_security_check

每个 IP 2 点

批量威胁检查

lookup_company

1

单个 IP 的公司名称和 ASN 持有者

lookup_network

1

路由前缀、连接类型、任播状态

parse_user_agent

1

将单个 UA 字符串解析为浏览器、设备、操作系统、引擎

bulk_parse_user_agent

每个 UA 1 点

最多 1,000 个字符串的批量 UA 解析

lookup_asn

1

ASN 详情、对等方、上游、下游、路由、WHOIS

get_abuse_contact

1

滥用联系人电子邮件、电话、地址、路由

include 参数的 lookup_ip 积分计算:

组合

总积分

基础查询

1

include=security

3

include=abuse

2

include=*

4

include=security&fields=security

2

include=abuse&fields=abuse

1

有关当前计划详情和定价,请参阅 IPGeolocation 定价页面

工具参考

lookup_ip

单个 IP 或域名查询。免费和付费。1 积分。

当您需要单个 IP 地址的位置、时区、货币或 ASN 时使用。在付费计划中,您可以添加 include 模块以在同一次调用中获取安全、滥用或主机名数据,从而避免额外的请求。

免费计划返回基础位置、国家元数据、货币、时区和基础 ASN。付费计划增加了 networkcompany、扩展 ASN 和 include 参数。请注意,域名查询需要付费计划。

参数

必需

描述

ip

IPv4、IPv6 或域名。域名查询需要付费计划。

lang

响应语言。非英语需要付费计划。

include

额外模块:securityabusehostnameliveHostnamehostnameFallbackLiveuser_agentgeo_accuracydma_code*

fields

要返回的逗号分隔字段

excludes

要排除的逗号分隔字段

force_refresh

跳过缓存并直接访问 API

提示:将 includefields 结合使用可以降低积分成本。例如,include=security&fields=security 仅需 2 积分而不是 3 积分,因为您跳过了基础地理位置响应。同样,include=abuse&fields=abuse 仅需 1 积分而不是 2 积分。

bulk_lookup_ip

批量 IP 查询。付费。每个 IP 1 积分。

接收一组 IP 或域名(默认最多 1,000 个,可通过 IPGEOLOCATION_MCP_MAX_BULK_ITEMS 配置)。支持与 lookup_ip 相同的 includefieldsexcludes 选项。

参数

必需

描述

ips

IP 地址或域名数组

lang

响应语言

include

每个 IP 的额外模块

fields

每个 IP 要返回的逗号分隔字段

excludes

每个 IP 要排除的逗号分隔字段

force_refresh

跳过缓存

get_my_ip

返回运行服务器的机器的公网 IP。免费。0 积分。无需 API 密钥。

不带参数。始终访问网络(不缓存)。作为确认服务器进程是否运行的快速检查非常有用。

check_security

单个 IP 的威胁和匿名数据。付费。2 积分。

返回威胁评分、VPN/代理/Tor 标记、提供商名称、置信度评分、机器人/垃圾邮件指标、匿名标记和云服务提供商状态。

如果同一个提示词也要求位置、ASN 或滥用数据,最好使用带 include=securitylookup_ip,因为它将所有内容捆绑在一次调用中(总共 3 积分,而不是分别调用 2 + 1 积分)。

参数

必需

描述

ip

要检查的 IP 地址

fields

要返回的逗号分隔字段

excludes

要排除的逗号分隔字段

force_refresh

跳过缓存

bulk_security_check

check_security 的批量版本。付费。每个 IP 2 积分。

参数

必需

描述

ips

IP 地址数组

fields

每个 IP 要返回的逗号分隔字段

excludes

每个 IP 要排除的逗号分隔字段

force_refresh

跳过缓存

get_timezone

位置的当前时间和时区详情。免费和付费。1 积分。

接受 IANA 时区名称、坐标、IP 地址、机场代码 (IATA/ICAO) 或 UN/LOCODE。响应包括时区偏移、日期/日期时间变体、current_timecurrent_time_unixtime_24time_12weekmonthyear、时区缩写和夏令时转换详情。

始终访问网络(不缓存),因为它返回当前时间。

| 参数 | 必需 | 描述 | |

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IPGeolocation/ipgeolocation-io-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server