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

alibabacloud-pricing-mcp

v0.3.2

Published

MCP server for Alibaba Cloud International (alibabacloud.com) pricing: no-credential web calculator pricing, optional BSS OpenAPI, estimates, xlsx/html export

Readme

alibabacloud-pricing-mcp

阿里雲國際站(alibabacloud.com,USD 計價)的查價與估價單 MCP server,Node.js 版,用 npx 就能執行。

不需要任何憑證也能用:calc_* 工具直接呼叫 alibabacloud.com 官方 Pricing Calculator 背後的查價 API,用法跟 AWS 的 sample-aws-pricing-calculator-mcp 一樣,不需要 AK/SK。有 AK 的話,可以另外啟用 BSS 工具,查更多產品,也能查帳號折扣價。

在 NAVI(或任何不能放憑證的平台)上使用

| 欄位 | 值 | |---|---| | 傳輸協定 | stdio | | 指令 | npx | | 參數 | -yalibabacloud-pricing-mcp@latest | | 環境變數 | 不用填 | | OAuth | 不用勾 |

  • 不用憑證時可以用的工具:calculator_products、calculator_get_schema、calc_ecs_price、calc_rds_price、calculator_price_custom、model_studio_price、全部 estimate_*。涵蓋的產品有 ECS(包年包月 / 隨用隨付,含 GPU)、RDS 包年包月、WAF 3.0、Security Center、CLB、ALB、NAT Gateway、NLB。
  • 其他產品(OSS、CDN、Redis、PolarDB…)可以用 estimate_add_manual_item 手動加進估價單。
  • Runner 必須能連到 buy-api.alibabacloud.com:443。如果平台有 egress 白名單,要把這個網域加進去。
  • 估價單存在 runner 的沙箱裡。estimate_export 預設 inline=true,會把 xlsx / html 直接放在工具的回傳結果裡,並附上一個 Markdown 表格,所以不用去 runner 的檔案系統拿檔案。
  • 驗證連線:npx -y alibabacloud-pricing-mcp@latest --selftest

⚠️ 計算機的查價 API 不是阿里雲公開文件記載的 API,是從計算機網頁分析出來的(AWS 那套也是同樣做法)。阿里雲改版時可能會壞,發現後再更新套件。

  • 所有 API 都打國際站端點(BSS:business.ap-southeast-1.aliyuncs.com),不會碰到中國站
  • 不依賴阿里雲 SDK,RPC 簽章 v1 用 Node 內建的 crypto 實作,已用官方文件的範例驗證
  • 估價單存在本機 ~/.alibabacloud-pricing-mcp,可以匯出 .xlsx 和單一檔案的 .html 報告

快速開始

需要 Node.js 18.17 以上的版本。

{
  "mcpServers": {
    "alibabacloud-pricing": {
      "command": "npx",
      "args": ["-y", "alibabacloud-pricing-mcp@latest"],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "LTAI...",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "...",
        "ALIBABA_PRICING_EXPORT_DIR": "~/Documents/AlibabaCloud-Estimates"
      }
    }
  }
}

Claude Code:

claude mcp add alibabacloud-pricing \
  -e ALIBABA_CLOUD_ACCESS_KEY_ID=LTAI... -e ALIBABA_CLOUD_ACCESS_KEY_SECRET=... \
  -- npx -y alibabacloud-pricing-mcp@latest

Cursor、Kiro、VS Code、Cline 等 MCP host 的寫法也一樣:command: npx、args: ["-y", "alibabacloud-pricing-mcp@latest"]。

Claude Desktop 在 macOS 上找不到 npx 時(出現 spawn npx ENOENT),把 command 改成完整路徑。完整路徑可以用 which npx 查,例如 /opt/homebrew/bin/npx,用 nvm 的話會是 ~/.nvm/versions/node/v22.x/bin/npx。

國際站 RAM 使用者(唯讀)

在國際站 RAM console 建立一個只用於程式存取的使用者,並授權以下系統政策:

  • AliyunBSSReadOnlyAccess
  • AliyunECSReadOnlyAccess
  • AliyunRDSReadOnlyAccess
  • AliyunKvstoreReadOnlyAccess

沒有設定環境變數時,會改讀 aliyun CLI 的 ~/.aliyun/config.json,可以用 ALIBABA_CLOUD_PROFILE 指定 profile。

0.3 新增

  • calculator_products:列出 35 項國際站產品,以及每項是否已驗證可查價、要用哪個工具
  • 新工具:calc_redis_price(包年包月 / 隨用隨付)、calc_polardb_price(隨用隨付 / 包年包月)、calc_oss_price
  • calc_rds_price 支援 billing: "payg"
  • npx -y alibabacloud-pricing-mcp@latest --survey:一次檢查所有產品能不能查價

工具(24 個)

| 類別 | Tool | 說明 | |---|---|---| | 計算機(不用憑證) | calculator_products / calculator_get_schema | 支援的產品、元件代碼與合法值 | | | calc_ecs_price / calc_rds_price | ECS / RDS 牌價 | | | calculator_price_custom | WAF、SAS、CLB、ALB、NAT、NLB 等任一計算機產品 | | 探索 | pricing_recipes | 各產品要用哪個 tool,以及 BSS 的搜尋關鍵字 | | | bss_list_products | 用 BSS QueryProductList 查 ProductCode / ProductType | | | bss_get_pricing_modules | 用 BSS DescribePricingModule 查計價模組與合法的屬性值 | | 通用計價 | bss_price_payg / bss_price_subscription | 任何產品的隨用隨付價或包年包月價 | | 產品專屬 | ecs_price | ECS(含 GPU 規格),包含系統碟、資料碟與固定頻寬 | | | rds_price | RDS(自動帶入國際站的 CommodityCode) | | | redis_price | Tair / Redis | | | model_studio_price | Qwen API 的靜態價目表(src/data/model_studio_prices.json) | | 估價單 | estimate_create / get / list / add_manual_item / update_item / remove_item / export | 匯出 xlsx / html(basis=list|account) |

list 是牌價,trade 是呼叫帳號拿到的折扣價。用夥伴帳號的 AK 時,給客戶的檔案請用 basis="list"(預設值)匯出。

環境變數

| 變數 | 用途 | |---|---| | ALIBABA_CLOUD_ACCESS_KEY_ID / _SECRET / _SECURITY_TOKEN | 認證(支援 STS) | | ALIBABA_PRICING_HOME | 資料目錄,預設 ~/.alibabacloud-pricing-mcp | | ALIBABA_PRICING_EXPORT_DIR | 匯出的資料夾 | | ALIBABA_PRICING_MODEL_CATALOG | 自訂的 Model Studio 價目表 JSON | | ALIBABA_PRICING_ENDPOINT_ECS / _BSS / _RDS / _R_KVSTORE | 覆寫 API 端點 |

開發

npm install
npm test                          # 10 個測試,包含用 stdio 啟動 server 的端到端測試
node src/cli.js                   # 直接以 stdio 啟動
node src/cli.js --selftest        # 實際打一次計算機查價 API

發佈到 npm(讓任何地方都能 npx -y alibabacloud-pricing-mcp@latest)

npm login                        # 用公司或個人的 npm 帳號登入(建議開啟 2FA)
npm publish --access public      # 第一次發佈
# 之後要改版時:
npm version patch                # 0.1.0 -> 0.1.1,同時會建立 git tag
npm publish

@latest 指向的是最後一次 npm publish 的版本,npx -y 每次啟動都會檢查。

  • 套件名稱:目前 npm 上 alibabacloud-pricing-mcp 還沒有人用。如果想掛在公司名下,可以把 package.json 的 name 改成 @gaiatechs/alibabacloud-pricing-mcp(要先在 npm 建立 gaiatechs 這個 organization),使用時改成 npx -y @gaiatechs/alibabacloud-pricing-mcp@latest。
  • 自動發佈:.github/workflows/publish.yml 會在 push v* tag 時自動發佈。要先在 GitHub repo 的 Secrets 加入 NPM_TOKEN(npm 的 Automation token)。
  • 每週自動更新:.github/workflows/weekly-update.yml 每週三 01:00 UTC(台北 09:00)執行,也可以在 Actions 頁面手動觸發:
    • 更新相依套件(同一個 major 內的 minor / patch),測試通過後自動 bump patch 版號、更新 CHANGELOG、commit 和 tag 推回 main,並發佈到 npm。沒有更新就不發版。
    • 跑一次 --survey,如果原本 verified 的產品查不到價(阿里雲改了計算機 API),自動開一個 issue。這類改版需要人工改 code,不會自動發版。
    • 需要 Secrets 裡的 NPM_TOKEN;如果 main 有 branch protection,要允許 github-actions[bot] 直接 push。
  • 不想公開的話:
    • 放在 GitHub repo,使用 npx -y github:<org>/alibabacloud-pricing-mcp(private repo 需要使用者有 git 權限)
    • 或發佈到 GitHub Packages / 公司內部的 npm registry