Skip to main content

Puhuo MCP Server

普货 MCP 服务器,提供运单号拦截和快递公司编码查询功能。

功能

  1. intercept_waybill - 拦截运单号检查

    • 参数:waybill_no (运单号)
    • 返回:是否拦截及原因
  2. suggest_cp_code - 查询快递公司编码

    • 参数:waybill_no (运单号)
    • 返回:快递公司编码(cpCode)

安装

从 PyPI 安装(推荐)

pip install puhuo-mcp-server

或使用 uv:

uv pip install puhuo-mcp-server

从源码安装(开发模式)

git clone <repository-url>
cd puhuo-mcp-server
pip install -e .

配置

方式一:在 Cursor MCP 配置中设置

在 Cursor 的 MCP 配置文件中添加:

配置文件路径: ~/.cursor/mcp.json

{
  "mcpServers": {
    "puhuo-tool": {
      "command": "uvx",
      "args": [
        "puhuo-mcp-server"
      ],
      "env": {
        "CAINIAO_TOKEN": "your_token_here"
      }
    }
  }
}

说明:

  • 使用 uvx 可以自动从 PyPI 下载并运行最新版本
  • 也可以指定版本:"puhuo-mcp-server==0.1.5"
  • 如果本地已安装,可以直接使用 "command": "puhuo-mcp-server"

方式二:系统环境变量

export CAINIAO_TOKEN="your_token_here"
puhuo-mcp-server

方式三:直接运行时设置

CAINIAO_TOKEN="your_token_here" puhuo-mcp-server

Token 配置

CAINIAO_TOKEN 需要设置为有效的认证 Token。

示例 Token(需要替换为实际的 Token):

**

开发

启动服务器

python -m puhuo_mcp_server.server

服务器将在 http://127.0.0.1:8000 上运行。

调试模式

服务器默认启用 DEBUG 日志,可以查看详细的请求和响应信息。

Metadata

Release files for puhuo-mcp-server 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for puhuo-mcp-server 0.1.5
File Size Uploaded
puhuo_mcp_server-0.1.5.tar.gz 91.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for puhuo-mcp-server 0.1.5
File Interpreter ABI Platform
puhuo_mcp_server-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 95.3 kB

Release files / puhuo_mcp_server-0.1.5.tar.gz

Download URL puhuo_mcp_server-0.1.5.tar.gz
Size 91.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fda02f6c46290ce14eb90da3fe8843b899283f16bc951674f06083951dd61201
BLAKE2b-256 checksum
How to use checksums
1591030e423b16366984a3999dc793db1008d8fab493fd8a8f6b60ac5c55c43f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / puhuo_mcp_server-0.1.5-py3-none-any.whl

Download URL puhuo_mcp_server-0.1.5-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac528b00c7114ff16db4f0c9e0db849ddfba3a0e40ddbae1fdab028c97e72c63
BLAKE2b-256 checksum
How to use checksums
1b5af9517902a6d595f8f8b3ac5855c2fd58366852159a6eb5addbdea083351f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page