
validar-semver
io.github.encodiv1.0.1更新於 Sep 30, 2026
Resolves real semver range satisfaction (^1.2.3, ~2.0) against a version. Paid via x402/USDC.
概覽
一個遠端 MCP 工具,使用 npm 所用的同一套 semver 引擎判斷版本是否符合版本範圍,並依每次呼叫以 USDC 收費。
- 功能
- 只提供一個工具 validate_semver,用來把某個版本(例如 1.2.3)與一組範圍(例如 ^1.2.3、~2.0、2.x、>=1.0.0 <2.0.0)進行比對判斷。它採用 npm 所用的 semver 引擎,而不是讓模型猜測是否相符。每次呼叫都是獨立的,呼叫之間沒有資料庫或持久狀態。
- 適用情境
- 適合需要可靠、確定性 semver 範圍判斷的情境,例如檢查相依套件更新、驗證版本限制,或回答某個發行版本是否符合某個範圍。如果只是偶爾做一次自己能判斷的檢查,就不一定要加入。
- 執行需求
- 透過 streamable HTTP 連線的遠端 MCP 端點,不需要本機執行環境或安裝套件。每次呼叫都需付費:透過 x402 在 Base 主網支付 0.01 USDC,付款資訊放在 MCP JSON-RPC 的 _meta 中,而非 HTTP 標頭。未付款的呼叫會回傳錯誤,並附上付款與重試所需的網路、金額與 payTo 資訊。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 validar-semver,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"validar-semver": {
"type": "http",
"url": "https://validar-semver.encodari.workers.dev/mcp"
}
}
}README
validar-semver
Remote MCP server (Cloudflare Workers) with one tool that resolves real semver range satisfaction:
validate_semver— evaluates a version (e.g.1.2.3) against a list of ranges (^1.2.3,~2.0,2.x,>=1.0.0 <2.0.0, ...) using the same semver engine npm uses (semver), not a model guess about what should match.
No database, no persistent state: each call builds a fresh McpServer (see createServer() in src/index.ts) and is self-contained.
Billing (x402)
Charges per call via x402 — real USDC payment on Base mainnet, against the Coinbase Developer Platform (CDP) facilitator. The payment travels inside the MCP JSON-RPC itself (_meta), not as an HTTP header; see src/payments.ts.
An unpaid tools/call returns isError: true with the accepts (network, amount, payTo) the client needs to pay and retry — not an unexplained exception.
Structure
Running it locally
⚠️ Note on wrangler dev: the real Cloudflare Workers runtime (workerd) requires macOS 13.5+. If your Mac has an older version, wrangler dev (and npm run dev) will fail. This project includes a plain-Node shim that runs the exact same fetch() handler without needing workerd.
1. Install dependencies
2. Run the unit tests
3a. If your wrangler dev works (macOS 13.5+, Linux, Windows)
3b. If wrangler dev fails because of the macOS version
Starts at http://localhost:8787/mcp, reading CDP credentials from ~/.mcp-tools-factory-credentials.env (shared across all tools in this factory).
4. Test with curl
Responses come as Server-Sent Events (event: message + data: {...}); the data: line is the usual JSON-RPC response.
Deploy and listings
Deployed at https://validar-semver.encodari.workers.dev/mcp (Cloudflare Workers). Published on the official MCP registry, Smithery, mcp.so, and with an open PR to awesome-mcp-servers.
What it doesn't do (yet)
- Charges on Base mainnet with real money. To switch back to testnet (Base Sepolia,
eip155:84532) during development, changeNETWORKinsrc/payments.ts. - No database or persistent state between calls (beyond the billing config, cached in memory per isolate — see
src/payments.ts).
來源:README.md,提交 cba3724
工具
0版本歷史
1- v1.0.1最新Sep 16, 2026

