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.0.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.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ip_acquirer_mcp-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c149e2c1d635404ef7ba73e1aefb410462366b268a5502105234b20b0a771b9e
MD5 6192b28f0a6e1acd607767a816747ee5
BLAKE2b-256 2ef46dc09feed839bb57fa443fb88e1f4a11903bc19b940d9f95fa42bc6ba69b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ip_acquirer_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6baf4851bd81ef2d881f767ebc73a4c5d7d3b31d3809413a9bac6c0fd2bac4b1
MD5 8eb7e4c69b8c3b3888c179f37d9fdb46
BLAKE2b-256 faad73732aed35b58112395b9b6dfaed023452f68eacd170873a240359a51c37

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