
LeaveSheet: WH-347 payroll and PTO accrual
io.github.tresor4k由 GitHub 帳號 tresor4k 發布v0.1.0更新於 Oct 24, 2026
WH-347 certified payroll columns 5-9, fringe 6B reconciliation and PTO accrual balances.
概覽
在本機計算美國 WH-347 認證薪資明細與 PTO 休假累積餘額,不連網、不儲存資料。
- 可以做什麼
- 提供三個本機計算工具:wh347_payroll_lines 回傳每位工人的正常/加班時數、6A 費率、6B 福利抵扣、6C 現金替代、7A/7B 總額、扣款與淨薪,以及班組彙總和合理性標記;wh347_fringe_reconcile 將 6B 欄與四個計畫的福利支出比對;pto_accrual 回傳已累積、結轉、已用、待核與剩餘天數,並列出每個申請的計薪工作日。輸出在 28 個黃金案例上與開源 Go 引擎逐位元組一致。
- 適用情境
- 適合需要為某個專案週編製或核對 WH-347 認證薪資資料、核對各計畫福利金額,或依月/年政策(含年資級距與結轉上限)估算員工 PTO 餘額的情境。
- 執行需求
- 需要 Node.js 22 或以上版本;以本機 stdio 程序執行,通常透過 npx leavesheet-mcp 啟動。未宣告任何帳號、API 金鑰、環境變數或標頭,README 說明不存取網路、不儲存資料。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 LeaveSheet: WH-347 payroll and PTO accrual,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
leavesheet-mcp
MCP server (stdio) for two payroll calculations used by LeaveSheet / TableTemplates:
- U.S. DOL WH-347 certified payroll form, revised version (Rev. January 2025): columns 2 and 5-9 for a crew week, fringe paid to each plan, column 6B reconciliation.
- PTO accrual: leave balance at a date, with hire date, annual cap, tenure tiers, carryover cap, approved and pending requests, holidays and half days.
The calculations are a line-by-line JavaScript port of the open-source Go packages
codeberg.org/tresor2k/tabletemplates-go/wh347, .../pto and the wh347 command
(.../cmd/wh347). The test suite checks the output byte for byte against those Go
engines on 28 golden cases. No network access, no data stored.
Install
Requires Node.js 22 or later.
Tools
Inputs
wh347_payroll_lines and wh347_fringe_reconcile take { "workers": [...] }, one entry
per worker-week on one project. Field names follow the CSV columns of the wh347
command: worker, type (J, RA or empty), base_rate, fringe_health_welfare,
fringe_pension, fringe_vacation, fringe_training, st_hours and ot_hours
(arrays of up to 7 daily values), cash_in_lieu_rate, gross_all_work (column 7B;
omit it to use 7A), fica, federal_tax, state_tax, other_deductions. Omitted
numbers are 0; negative numbers are rejected. csv_line in the output is the line
the worker would have in the equivalent CSV (header = line 1).
pto_accrual takes policy (period: monthly or annual, rate, annual_cap,
carryover_max, optional tier1_years/tier1_bonus, tier2_years/tier2_bonus),
hire_date, as_of, carryover, requests (start, end, start_half,
end_half, status: pending, approved, denied or cancelled), holidays
(dates) and us_federal_holidays_years (adds the 11 U.S. federal holidays, observed
dates, of the listed years). Dates are YYYY-MM-DD.
Example
wh347_payroll_lines input:
Output:
pto_accrual with a monthly policy of 1.25 days (+0.25 after 2 years, cap 15,
carryover cap 5), hired 2023-04-03, 9 days carried over, one approved request from
2026-06-29 to 2026-07-07 and the 2026 federal holidays, as of 2026-07-31:
(July 3, 2026 is the observed Independence Day, so the 7 weekdays of the request count as 6.)
Limits
- Not an official DOL tool, not legal or payroll advice. The WH-347 tool does not look up prevailing wage rates, classify work, or compute taxes: rates and deductions are entered. The ST/OT split is entered, not computed.
- WH-347 amounts are rounded to cents in the output only (halves toward +infinity), never inside the calculation. PTO values are not rounded.
- PTO: month-granular accrual (the hire month counts in full), years of service = days / 365, accrual restarts on January 1; the carryover is the value you enter, capped by the policy. State paid-leave laws are not encoded; the only built-in holidays are the U.S. federal ones.
Development
License: MIT.
來源:README.md,提交 0486eac
工具
0版本歷史
1- v0.1.0最新Oct 13, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分