npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dingjiansoft168/customer-mcp

v0.2.1

Published

Yonglitong Badatong (八达通) ERP customer MCP server — list/followup/accounts/freight/follow notes

Readme

八达通客户查询 MCP Server

基于第三方签名鉴权,查询永利通八达通 ERP 客户信息、结算账户、货量趋势与跟进记录。

支持通过 npx @dingjiansoft168/customer-mcp 一键启动(Node 启动器 + Python MCP 实现)。

功能

| Tool | 说明 | |------|------| | list_my_customers | 分页拉取私海/成交客户列表(粗筛) | | build_followup_list | 基于列表字段打分,生成多维跟进清单 | | get_customer_by_number | 按客户编号查客户摘要 | | get_customer_accounts | 按编号或客户 ID 查各业务结算账户 / 余额 | | get_customer_overview | 一次返回客户摘要 + 结算账户 | | get_customer_freight_trend | 按日期区间查客户货量/出库趋势 | | save_customer_follow | 给客户写跟进记录 |

快速开始(npx)

前提:本机有 Node.js ≥ 18,以及 uv 或 Python 3.10+(启动器会自动准备依赖)。

发布到 npm 后

npx -y @dingjiansoft168/customer-mcp

Cursor mcp.json:

{
  "mcpServers": {
    "bdt-customer": {
      "command": "npx",
      "args": ["-y", "@dingjiansoft168/customer-mcp"],
      "env": {
        "BDT_ERP_BASE_URL": "https://erptestdev.8dt.com/supply/",
        "BDT_ERP_SECRET": "your-secret",
        "BDT_ERP_CLIENT_ID": "your-client-id",
        "BDT_ERP_CU_ID": "your-cu-id",
        "BDT_ERP_USER_ID": "your-user-id",
        "BDT_ERP_DC": "your-dc"
      }
    }
  }
}

当前 npm 包名:@dingjiansoft168/customer-mcp。

本地未发布时

npx -y /absolute/path/to/bdt_silks/mcp/bdt-customer

环境变量

可在 Cursor MCP 配置页 / mcp.json 的 env 中设置(推荐),也可使用 .env。

| 变量 | 对应第三方参数 | 说明 | |------|----------------|------| | BDT_ERP_BASE_URL | - | 默认测试环境 https://erptestdev.8dt.com/supply/ | | BDT_ERP_SECRET | secret | 第三方 secret | | BDT_ERP_CLIENT_ID | thirdClientId | 客户端 ID | | BDT_ERP_CU_ID | thirdCuId | 控制单元 | | BDT_ERP_USER_ID | thirdUserId | 用户 | | BDT_ERP_DC | thirdDc | 数据中心 |

发布 npm(维护者)

cd mcp/bdt-customer
npm login --registry https://registry.npmjs.org/
npm publish --access public

发布后用户即可:

npx -y @dingjiansoft168/customer-mcp

本地开发(Python)

cd mcp/bdt-customer
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
bdt-customer-mcp

或用 uv:

uv sync --extra dev
uv run bdt-customer-mcp

鉴权说明

签名算法对齐 demo.java:

  1. 将 secret, thirdClientId, thirdtimestamp, thirdCuId, thirdUserId, thirdDc, apiPath 字典序排序
  2. 拼接后做 SHA1 hex,写入请求头 djthirdsign
  3. apiPath 不含 host 与 query(例如 crm/dealCustomer/listData)

接口

  • POST crm/dealCustomer/listData?djrqformat=pcjson
  • POST crm/dealCustomer/getViewInfo?djrqformat=pcjson
  • POST oms/order/freightTrendData?djrqformat=pcjson
  • POST crm/customerFollow/save?djrqformat=pcjson

返回已脱敏,不含身份证号、apiToken、工商 businessInfo 原文等敏感字段。