Skip to main content

A lightweight diagnostic MCP server for AI developers to verify network environment compatibility and IP reputation for LLM API access.

Project description

ip_check

A lightweight diagnostic tool for AI developers to verify network environment compatibility and IP reputation for LLM API access.

screenshot

English | 中文


English

Why

To ensure AI tools like Claude Code, OpenAI API, and Cursor run smoothly and reliably, a properly configured network environment is essential. Common issues that may affect performance:

  • IPv6 leaking real location — Most proxies only handle IPv4; IPv6 can expose your actual geographic location
  • DNS leakage — Local DNS servers can reveal your true location to AI services
  • High-risk IP — Datacenter IPs or abused IPs may affect connection quality
  • Timezone mismatch — Inconsistency between local timezone and IP geolocation

ip_check detects all these issues in one run, ensuring your AI tools run smoothly and stably.

Features

Check Item Description
LAN IP / IPv6 Detect local IP, verify if IPv6 is disabled
DNS Servers Identify DNS origin (domestic/foreign), label known DNS providers
Public IP Info Exit IP, country, region, ISP, organization
Proxy Detection Env proxy settings, whether IP is flagged as proxy
IP Type Residential vs. datacenter IP identification
IP Risk Score Risk scoring via proxycheck.io
Abuse Records IP abuse lookup via StopForumSpam
Timezone Consistency Compare local CLI timezone with public IP geolocation timezone

Quick Start

python ip_check.py

Dependencies (requests, etc.) will be auto-detected and installed on first run.

Requirements

  • Python 3.7+
  • macOS / Linux / Windows

Understanding the Results

LAN & DNS — Disable IPv6 if possible. Most proxies don't handle IPv6 traffic, which may expose two IPs from different regions simultaneously. If a domestic DNS is detected, adjust DNS settings in your proxy software.

Public IP Info — Shows your exit IP after proxy, including country/region, ISP, and timezone. These directly affect how AI services evaluate your request origin.

IP Risk Assessment — Identifies whether your IP is residential or datacenter. Datacenter IPs aren't necessarily problematic, but the tool will query risk scores and abuse records. Switch nodes if your risk score is high.

Timezone Consistency — Compares your local $TZ environment variable (or system timezone) with the public IP's timezone. Keeping them consistent ensures a better service experience. Set TZ in your shell config to match your IP's IANA timezone (e.g., America/Los_Angeles).

MCP Server

ip_check is also available as an MCP server, allowing Claude Code and Claude Desktop to call diagnostic tools directly.

Install

pip install ip-check-mcp

Add to Claude Code

claude mcp add --transport stdio ip-check -- ip-check-mcp

Add to Claude Desktop

Add the following to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "ip-check": {
      "command": "ip-check-mcp"
    }
  }
}

Available Tools

Tool Description
check_all Full diagnostic — IP, DNS, proxy, risk, timezone
check_ip_risk Check risk score for a specific IP address
check_dns Check DNS server configuration

中文

为什么需要这个工具

想让 Claude Code、OpenAI API、Cursor 等 AI 工具流畅稳定运行,网络环境配置至关重要。以下问题可能影响使用体验:

  • IPv6 泄露真实地址 — 代理通常只处理 IPv4,IPv6 会暴露你的实际位置
  • DNS 泄露 — 使用国内 DNS 会暴露真实地理位置
  • IP 风险过高 — 机房 IP 或被滥用的 IP 可能影响连接质量
  • 时区不一致 — 本地时区配置与 IP 所在地不匹配

ip_check 一键检测这些问题,确保你的 AI 工具流畅稳定运行。

功能

检测项 说明
局域网 IP / IPv6 检测本机 IP,确认 IPv6 是否已禁用
DNS 服务器 识别 DNS 来源(国内/国外),标注已知 DNS 服务商
公网 IP 信息 出口 IP、国家、地区、ISP、运营商
代理检测 环境变量代理配置、IP 是否被标记为代理
IP 类型 住宅 IP / 机房 IP 识别
IP 风险评分 通过 proxycheck.io 查询风险分数
滥用记录 通过 StopForumSpam 查询 IP 是否被举报
时区一致性 对比本地 CLI 时区与公网 IP 所在时区是否匹配

快速开始

python ip_check.py

首次运行会自动检测并提示安装缺少的依赖(requests 等)。

环境要求

  • Python 3.7+
  • 支持 macOS / Linux / Windows

结果说明

局域网 & DNS — IPv6 建议禁用,大部分代理不处理 IPv6 流量,开启后可能同时暴露两个不同地区的 IP 地址。如果检测到国内 DNS,需要在代理软件中调整 DNS 设置。

公网 IP 信息 — 显示经过代理后的出口 IP、所在国家/地区、ISP 和时区。这些信息直接影响 AI 服务对你请求来源的判断。

IP 风险评估 — 检测 IP 是住宅还是机房类型。机房 IP 不一定有问题,但会进一步查询风险评分和滥用记录。如果风险评分偏高,建议更换节点。

时区一致性 — 对比本地 $TZ 环境变量(或系统时区)与公网 IP 所在时区。保持一致可以获得更好的服务体验。建议在 shell 配置中设置 TZ 为与 IP 所在地匹配的 IANA 时区(如 America/Los_Angeles)。

MCP Server

ip_check 同时提供 MCP server,可以让 Claude Code 和 Claude Desktop 直接调用诊断工具。

安装

pip install ip-check-mcp

添加到 Claude Code

claude mcp add --transport stdio ip-check -- ip-check-mcp

添加到 Claude Desktop

在 Claude Desktop 配置文件中添加(macOS 路径:~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "ip-check": {
      "command": "ip-check-mcp"
    }
  }
}

可用工具

工具 说明
check_all 全量检测 — IP、DNS、代理、风险、时区
check_ip_risk 查询指定 IP 的风险评分
check_dns 检测 DNS 服务器配置

AI-Native Development

This MCP integration was built using Claude Code. From protocol definition to server implementation, the entire workflow was AI-augmented, demonstrating the power of the Model Context Protocol.

License

MIT © 2026 stormzhang

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ip_check_mcp-0.1.0.tar.gz (138.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ip_check_mcp-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file ip_check_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: ip_check_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 138.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ip_check_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 108960c1a86639f45206d97e770a3bdbd39e94c908426338d676222d6ded4432
MD5 724762d8da0d23c739b5afa385d6c1bf
BLAKE2b-256 bd42179945ec7c8311673963bcc4a7b1dba4fca26cbcc3528ab9bcd6f99b48c9

See more details on using hashes here.

File details

Details for the file ip_check_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ip_check_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ip_check_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9525e0913bb9b5b5b2dae0b1c8b917128f82521d765f875ecd2f8e0185ccbc73
MD5 63a8f3a579a89d8b5bdf98c0991acd70
BLAKE2b-256 16b48d27a77026f2a46d2a58f50f2b1ca533c1f8325df665707d3abe8bf61132

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page