← 返回 Skills 市场
marc-chen

Ip Geo Location Skill

作者 Marc Chen · GitHub ↗ · v0.1.3 · MIT-0
cross-platform ✓ 安全检测通过
293
总下载
0
收藏
1
当前安装
4
版本数
在 OpenClaw 中安装
/install ip-geo-location-skill
功能描述
IP geolocation lookup via MCP. Use when users ask IP location, IP geolocation, where an IP is from, IP lookup, ASN, IP to country/city, IP 地理位置查询, IP 归属地, 批量...
使用说明 (SKILL.md)

IP Geolocation Skill

Use this skill to query geographic and ASN information from IP addresses through the mcp-geoip-server MCP service.

This skill is designed for:

  • Single IP lookup
  • Multi-IP batch lookup
  • Domain-to-IP then geolocation workflow
  • Structured result output for quick user reading

MCP Server

  • Name: mcp-geoip-server
  • URL: https://ip.api4claw.com/mcp
  • Transport: Streamable HTTP

VS Code MCP Configuration

Add to .vscode/mcp.json (workspace) or user MCP settings:

{
  "servers": {
    "mcp-geoip-server": {
      "type": "http",
      "url": "https://ip.api4claw.com/mcp"
    }
  }
}

Tools

get_ip_geolocation

Look up geolocation information for one IP.

Input:

Name Type Required Description
ip_address string Yes IPv4 or IPv6 address to look up (e.g. 8.8.8.8 or 2001:4860:4860::8888)

Output fields:

Field Description
ip The queried IP address
country Country name
country_code ISO country code (e.g. US, CN)
province Province or state
city City name
asn Autonomous System Number
asn_org ASN organization name

Detailed tool schema and protocol notes: API reference

Execution Workflow

  1. Extract query targets from user input.
  2. Classify each target as IPv4, IPv6, or domain.
  3. If target is a domain, resolve to IP first using resolve script.
  4. Call get_ip_geolocation for each IP.
  5. Return concise and structured results.
  6. If multiple IPs are provided, present results in a table for easy comparison.

Input Handling Rules

  • Trim whitespace and punctuation around candidate IPs.
  • Keep duplicates out during batch lookup.
  • Support both IPv4 and IPv6.
  • If input is neither valid IP nor resolvable domain, return a clear validation error.
  • For script-based calls, only valid IP literals are sent to remote MCP (invalid inputs are rejected locally).
  • Private/reserved IP ranges (for example 127.0.0.1, 10.x.x.x, 192.168.x.x, fc00::/7) must not be sent to external MCP.

Security and Privacy

  • This skill sends queried IP addresses to an external MCP service (ip.api4claw.com).
  • The default endpoint uses HTTPS transport to encrypt traffic in transit.
  • The script implementation is restricted to a fixed HTTPS endpoint (https://ip.api4claw.com/mcp) to reduce misuse risk.
  • Private/internal IPs are blocked in the script implementation to reduce privacy leakage risk.

Output Format

Use this format by default:

IP Country Province/State City Country Code ASN ASN Org
8.8.8.8 United States - - US 15169 Google LLC

If a field is empty, display -.

Error Handling

  • MCP unavailable/timeout: explain temporary service issue and suggest retry.
  • Invalid IP format: ask user to confirm/correct the IP.
  • Private or reserved IP: explain that local/private addresses are intentionally blocked from external lookup.
  • Empty/unknown location fields: keep response transparent and do not fabricate values.
  • Encoding anomalies (for example garbled country text): include country_code and raw value.
  • Session timeout/invalid session ID: re-run MCP initialize to get a new Mcp-Session-Id, then retry the failed tool call once.

Domain-to-IP Flow

When user asks for a domain location (for example example.com):

  1. Resolve A/AAAA records with resolve script.
  2. Query each resolved IP using get_ip_geolocation.
  3. Summarize domain-level findings and list per-IP differences.

Implementation Scripts

  • invoke MCP lookup: includes initialize before calls and auto re-initialize on session expiration.
  • resolve domain: resolves domain to unique A/AAAA addresses.

Example: Single IP

User: 8.8.8.8 在哪里?

Call:

get_ip_geolocation({ "ip_address": "8.8.8.8" })

Response (example):

{
  "ip": "8.8.8.8",
  "country": "美国",
  "country_code": "US",
  "province": "",
  "city": "",
  "asn": 15169,
  "asn_org": "Google LLC"
}

Example: Batch IPs

User: 帮我查 8.8.8.8 和 1.1.1.1 的地理位置

Execution:

  1. Call get_ip_geolocation with 8.8.8.8
  2. Call get_ip_geolocation with 1.1.1.1
  3. Return merged table with both records

Success Criteria

  • Every valid input IP returns one result row.
  • Invalid targets are explicitly marked with reason.
  • No inferred or fabricated geographic values.
  • Response is readable for both Chinese and English users.
安全使用建议
This skill appears to do exactly what it claims: resolve domains (locally), validate IPs, block private/reserved addresses, and send public IPs to the fixed MCP endpoint https://ip.api4claw.com/mcp. Before installing, consider: (1) privacy — any IPs you query will be sent to a third-party service (no credentials required), so avoid submitting sensitive internal addresses (the code blocks common private ranges but you should still be cautious); (2) review/trust the external endpoint (ip.api4claw.com) and its privacy policy; (3) runtime compatibility — the scripts assume a modern Node runtime (fetch, AbortController, etc.) and use a net.BlockList API that may not exist in all Node versions, so test in a sandbox first; (4) if you need to avoid network calls, do not install or run the skill. If you want higher assurance, verify the MCP service's operator and run the scripts in a restricted environment with non-sensitive test queries.
功能分析
Type: OpenClaw Skill Name: ip-geo-location-skill Version: 0.1.3 The skill bundle provides IP geolocation services by querying a specific external MCP server (ip.api4claw.com). The implementation in 'invoke-geoip-mcp.js' includes a robust private/reserved IP blocklist to prevent internal network scanning or data leakage, and the 'resolve-domain.js' script uses standard DNS resolution. No evidence of malicious intent, obfuscation, or unauthorized data exfiltration was found.
能力评估
Purpose & Capability
Name/description match the implementation: the skill implements domain resolution and IP geolocation via a fixed MCP endpoint. The only runtime dependency is node, which is reasonable for the provided JS scripts.
Instruction Scope
SKILL.md limits scope to resolving domains, validating IPs, blocking private/reserved ranges, and calling the MCP. The scripts implement this flow. Note: domain resolution happens locally (dns.resolve4/6) and resolved IPs are then sent to the external MCP (subject to the private-IP block) — this is expected but worth noting for privacy.
Install Mechanism
Instruction-only skill with no install spec and only Node scripts included. No downloads or extract/install steps that would write arbitrary code to disk at install time.
Credentials
No environment variables, credentials, or config paths are requested. The absence of credentials is coherent with the fixed public MCP endpoint usage.
Persistence & Privilege
The skill does not request permanent presence or special privileges (always is false). It does not modify other skills or system settings; scripts only write to stdout.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ip-geo-location-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ip-geo-location-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.3
- Blocked private and reserved IP ranges from being sent to the external MCP service. - Updated documentation to clarify handling and rejection of private/reserved IP addresses. - Enhanced privacy protections by ensuring internal IPs are never queried externally.
v0.1.2
- MCP endpoint configuration via environment variable (`MCP_URL`) removed; script now always targets fixed HTTPS endpoint. - Security section and implementation notes updated to reflect restricted endpoint and reduced misuse risk. - README.md removed; SKILL.md is now primary documentation. - No changes to user-facing API or output format.
v0.1.1
- Added OpenClaw metadata including environment (`MCP_URL`), required binaries, and HTTPS as default. - Updated MCP endpoint to use `https://ip.api4claw.com/mcp` by default for improved security. - Clarified that insecure HTTP usage requires explicit opt-in via `MCP_ALLOW_INSECURE_HTTP=1`. - Improved input validation rules: invalid IPs are locally rejected on script-based calls. - Added a dedicated "Security and Privacy" section to documentation.
v0.1.0
- Initial release of IP Geo Location Skill. - Supports single and batch IP geolocation lookup via MCP server. - Resolves domains to IP addresses, then provides geographic and ASN data. - Returns structured, table-formatted results; handles both IPv4 and IPv6. - Robust input validation and error handling, including session management and clear user feedback for errors. - Designed for both English and Chinese users.
元数据
Slug ip-geo-location-skill
版本 0.1.3
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 4
常见问题

Ip Geo Location Skill 是什么?

IP geolocation lookup via MCP. Use when users ask IP location, IP geolocation, where an IP is from, IP lookup, ASN, IP to country/city, IP 地理位置查询, IP 归属地, 批量... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 293 次。

如何安装 Ip Geo Location Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ip-geo-location-skill」即可一键安装,无需额外配置。

Ip Geo Location Skill 是免费的吗?

是的,Ip Geo Location Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Ip Geo Location Skill 支持哪些平台?

Ip Geo Location Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Ip Geo Location Skill?

由 Marc Chen(@marc-chen)开发并维护,当前版本 v0.1.3。

💬 留言讨论