lookup-holiday

io.github.encodi由 GitHub 帳號 encodi 發布v1.0.0更新於 Sep 30, 2026

Real public holiday lookup for 206 countries via a rule-based calendar engine. Paid via x402.

已驗證Streamable HTTP可網頁執行位置與生活效率與工作流

概覽

AI 產生的概覽

遠端 MCP 伺服器,提供一個工具,依國家、行政區與年份查詢 206 個國家的真實國定假日,並按次以 USDC 計費。

可以做什麼
  • 依國家查詢國定假日,可再指定州/行政區與地區,並指定年份
  • 取得由規則式行事曆引擎計算出的假日名稱與日期,包含復活節、農曆等浮動假日
  • 呼叫未付款時,於錯誤回應中回傳付款要求,用戶端付款後可重試
適用情境
適合助理需要準確假日日期來安排行程、規劃截止期限,或回答某國某年國定假日問題的情境,尤其是近期年份。
執行需求
遠端 streamable HTTP 端點;未宣告帳號或 API 金鑰。每次工具呼叫需透過 x402 在 Base 主網支付 0.01 USDC,用戶端需具備付款並重試的能力。需要網路存取。
安裝前請注意
呼叫會產生真實費用:每次查詢 0.01 USDC,在 Base 主網透過 JSON-RPC 內的 x402 流程支付,用戶端需要已儲值的錢包與付款能力。假日資料來自 date-holidays 專案,採 CC BY-SA 3.0 授權,使用時應標註出處。規則會套用到任何請求年份,歷史準確性沒有保證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 lookup-holiday,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.encodi%2Flookup-holiday/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "lookup-holiday": {
      "type": "http",
      "url": "https://lookup-holiday.encodari.workers.dev/mcp"
    }
  }
}

README

lookup-holiday

[lookup-holiday MCP server]

Remote MCP server (Cloudflare Workers) with one tool that looks up real public holidays:

  • lookup_holiday — real holidays for a country (and optionally a state/subdivision and region) and year, from a rule-based calendar engine covering 206 countries. Moveable holidays (Easter, lunar calendars, "nth weekday of month" rules, etc.) are computed with real date arithmetic, not guessed by the model.

No database, no persistent state: each call builds a fresh McpServer (see createServer() in src/index.ts). The calendar engine is date-holidays, bundled directly into the Worker.

Data attribution

The holiday data (which dates are holidays, their names) comes from the date-holidays project and is licensed CC BY-SA 3.0, since it's compiled from Wikipedia articles — see NOTICE and their LICENSE file for the full per-country attribution list. Only the code in this repository is MIT; see LICENSE.

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.

ToolPrice
lookup_holiday$0.01 USDC

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

src/  index.ts          # registers the tool in the McpServer and exposes the MCP HTTP handler  payments.ts       # x402 billing on Base mainnet via the CDP facilitator  tools/    holiday.ts         # pure logic for lookup_holiday (testable without Workers)    holiday.test.tsscripts/  dev-node.ts       # dev server that runs the handler in plain Node, no wrangler

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

bash
npm install

2. Run the unit tests

bash
npm test

3a. If your wrangler dev works (macOS 13.5+, Linux, Windows)

bash
npm run dev

3b. If wrangler dev fails because of the macOS version

bash
npm run dev:node

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

bash
# 1) initializecurl -s -X POST http://localhost:8787/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}'
# 2) tools/listcurl -s -X POST http://localhost:8787/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
# 3) tools/call — lookup_holidaycurl -s -X POST http://localhost:8787/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"lookup_holiday","arguments":{"country":"US","state":"TX","year":2026}}}'

Responses come as Server-Sent Events (event: message + data: {...}); the data: line is the usual JSON-RPC response.

Deploy and listings

Deployed at https://lookup-holiday.encodari.workers.dev/mcp (Cloudflare Workers). Published on the official MCP registry, Smithery, mcp.so, Glama, 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, change NETWORK in src/payments.ts.
  • No database or persistent state between calls (beyond the billing config, cached in memory per isolate — see src/payments.ts).
  • Doesn't model when a holiday was first introduced — a rule like "3rd Monday in January" is applied to any requested year even if the holiday didn't exist yet historically. Fine for scheduling near-term years; not a historical record.

來源:README.md,提交 7f7163f

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式必需10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分