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

@meishijian/hsq-mcp-server

v1.0.1

Published

Hsq MCP server with payment service

Readme

@meishijian/hsq-mcp-server

基于 Model Context Protocol (MCP) 的慧收钱支付服务,支持主扫下单、查询支付、申请退款、退款查询。可通过 npx 一键拉起,适配 Cursor 等 MCP 客户端。

特性

  • STDIO 传输,开箱即用
  • 四个工具:
    • create-hsq-dynamic-pay(主扫下单,返回链接需转二维码)
    • query-hsq-pay(查询支付结果,orderStatus = INIT/PROCESSING/SUCCESS/FAIL)
    • refund-hsq-pay(申请退款,refundType 固定 2)
    • query-hsq-refund(退款查询,orderStatus = INIT/PROCESSING/SUCCESS/FAIL)
  • 环境变量前缀统一为 HSQ_
  • 可通过 HSQ_SELECT_TOOLS 按需暴露工具,默认 ALL(全部)
  • 日志默认开启(HSQ_LOG_ENABLED=true),输出到 ~/mcp-server-hsqpay.log

快速开始(npx 方式)

export HSQ_MERCHANT_NO="your-merchant-no"
export HSQ_PRIVATE_KEY="your-private-key"
export HSQ_PUBLIC_KEY="your-public-key"
export HSQ_MERCHANT_KEY="your-merchant-key"
export HSQ_RETURN_URL="https://your.domain/hsq/notify"   # 可选
export HSQ_PAGE_URL="https://your.domain/hsq/page"       # 可选
export HSQ_LOG_ENABLED=true                                # 默认已开启
export HSQ_SELECT_TOOLS=ALL                                # 或 create-hsq-dynamic-pay,query-hsq-pay

npx -y @meishijian/[email protected]

在 Cursor 的 ~/.cursor/mcp.json 中也可配置:

{
  "mcpServers": {
    "hsq-mcp-server": {
      "command": "npx",
      "args": ["-y", "@meishijian/[email protected]"],
      "env": {
        "HSQ_MERCHANT_NO": "your-merchant-no",
        "HSQ_PRIVATE_KEY": "your-private-key",
        "HSQ_PUBLIC_KEY": "your-public-key",
        "HSQ_MERCHANT_KEY": "your-merchant-key",
        "HSQ_RETURN_URL": "https://your.domain/hsq/notify",
        "HSQ_PAGE_URL": "https://your.domain/hsq/page",
        "HSQ_LOG_ENABLED": "true",
        "HSQ_SELECT_TOOLS": "ALL"
      }
    }
  }
}

工具与参数

通用规则:所有“单号”字段请勿包含 -_ 等符号。

  • create-hsq-dynamic-pay

    • 入参:transNoorderAmt(单位:元;1=1分,100=1元)、goodsInfo
    • 说明:返回的链接需转换为二维码,用户可使用支付宝/微信/云闪付扫码支付
  • query-hsq-pay

    • 入参:transNo
    • 返回:result.orderStatus ∈ { INIT, PROCESSING, SUCCESS, FAIL }
  • refund-hsq-pay

    • 入参:transNoorigTransNoorigOrderAmt(分)、orderAmt(分)、refundReason
  • query-hsq-refund

    • 入参:transNo(退款申请时的商户订单号)
    • 返回:result.orderStatus ∈ { INIT, PROCESSING, SUCCESS, FAIL }

环境变量

  • 必填:HSQ_MERCHANT_NOHSQ_PRIVATE_KEYHSQ_PUBLIC_KEYHSQ_MERCHANT_KEY
  • 可选:HSQ_RETURN_URLHSQ_PAGE_URL
  • 日志:HSQ_LOG_ENABLED(默认 true
  • 工具选择:HSQ_SELECT_TOOLS,默认 ALL;示例:create-hsq-dynamic-pay,query-hsq-pay

本地开发

npm ci
npm run build
npm start

建议在 package.json 中添加:

{
  "files": ["build/**", "package.json", "README.md", "LICENSE"],
  "scripts": {
    "prepublishOnly": "npm run build"
  }
}

发布到 npm(可选)

npm version patch   # or minor / major
npm publish --access public

许可

MIT