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 日志,可以查看详细的请求和响应信息。

Download files

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

Source Distribution

puhuo_mcp_server-0.1.5.tar.gz (91.6 kB view details)

Uploaded Source

Built Distribution

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

puhuo_mcp_server-0.1.5-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file puhuo_mcp_server-0.1.5.tar.gz.

File metadata

  • Download URL: puhuo_mcp_server-0.1.5.tar.gz
  • Upload date:
  • Size: 91.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for puhuo_mcp_server-0.1.5.tar.gz
Algorithm Hash digest
SHA256 fda02f6c46290ce14eb90da3fe8843b899283f16bc951674f06083951dd61201
MD5 95e385df8796048b296ad4c5b321ae7a
BLAKE2b-256 1591030e423b16366984a3999dc793db1008d8fab493fd8a8f6b60ac5c55c43f

See more details on using hashes here.

File details

Details for the file puhuo_mcp_server-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for puhuo_mcp_server-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ac528b00c7114ff16db4f0c9e0db849ddfba3a0e40ddbae1fdab028c97e72c63
MD5 ccfbcf89879d5422f8ecba9240e67f2f
BLAKE2b-256 1b5af9517902a6d595f8f8b3ac5855c2fd58366852159a6eb5addbdea083351f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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