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 中。
开发
- 克隆仓库
- 创建虚拟环境:
python -m venv .venv - 激活虚拟环境
- 安装依赖:
pip install -e .
Metadata
Release files for ip-acquirer-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ip_acquirer_mcp-0.1.1.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ip_acquirer_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / ip_acquirer_mcp-0.1.1.tar.gz
| Download URL | ip_acquirer_mcp-0.1.1.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
181d9c33d23193273cbb0de41b243a41557f4a645a498ec5963e8fef73d622d0
|
|
BLAKE2b-256 checksum How to use checksums |
a4171f0bcf83188121c39e91cef6fd71b903f277ca30ffd040e02eba2eb5d0c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / ip_acquirer_mcp-0.1.1-py3-none-any.whl
| Download URL | ip_acquirer_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9745769604fa42c1787ae6773b25870ee9b10dfed91c7e9e3951707ec1bc70f
|
|
BLAKE2b-256 checksum How to use checksums |
3b524913eb4858d98d2251bad5dd4361246b3d818a518a620886f498cbc84376
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|