Skip to main content

一个通过 MCP 协议获取本机详细内网IP信息和公网IP的工具

Project description

IP Acquirer MCP

一个通过 MCP 协议获取本机详细内网IP信息和公网IP的工具。

功能

  • 遍历所有网络接口,获取详细的 IP 配置 (IPv4/IPv6)。
  • 区分 IP 地址类型(私有、公网、回环等)。
  • 通过外部服务查询公网 IP 地址。
  • 提供一个 MCP 工具 get_ip_info 以便其他程序调用。
  • 提供一个命令行入口 ip-acquirer 直接启动服务。

安装

您可以从 PyPI 安装此工具:

pip install ip-acquirer-mcp

使用方法

作为命令行工具

安装后,您可以直接在终端中运行以下命令来启动 MCP 服务:

ip-acquirer

服务将通过标准输入/输出 (stdio) 进行通信。

作为库

您也可以在自己的 Python 代码中导入并使用 get_ip_info 工具,但这通常在 MCP 客户端的上下文中进行。

核心函数位于 ip_acquirer_mcp/__init__.py 中。

开发

  1. 克隆仓库
  2. 创建虚拟环境: python -m venv .venv
  3. 激活虚拟环境
  4. 安装依赖: pip install -e .

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_acquirer_mcp-0.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

ip_acquirer_mcp-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file ip_acquirer_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: ip_acquirer_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for ip_acquirer_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 181d9c33d23193273cbb0de41b243a41557f4a645a498ec5963e8fef73d622d0
MD5 345c497379a9ccd62760f38a138eb0bf
BLAKE2b-256 a4171f0bcf83188121c39e91cef6fd71b903f277ca30ffd040e02eba2eb5d0c6

See more details on using hashes here.

File details

Details for the file ip_acquirer_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ip_acquirer_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9745769604fa42c1787ae6773b25870ee9b10dfed91c7e9e3951707ec1bc70f
MD5 1b17b5bdc7d82987630327527b680663
BLAKE2b-256 3b524913eb4858d98d2251bad5dd4361246b3d818a518a620886f498cbc84376

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