
LeaveSheet: WH-347 payroll and PTO accrual
io.github.tresor4kPublished by GitHub account tresor4kv0.1.0Updated Oct 24, 2026
WH-347 certified payroll columns 5-9, fringe 6B reconciliation and PTO accrual balances.
Overview
Calculates U.S. WH-347 certified payroll lines and PTO accrual balances locally, with no network access or stored data.
- What you can do
- Runs three local calculators: wh347_payroll_lines returns per-worker ST/OT hours, 6A rates, 6B fringe credit, 6C cash in lieu, 7A/7B gross, deductions and net pay plus crew totals and a sanity flag; wh347_fringe_reconcile compares column 6B against fringe paid to four plans; pto_accrual returns accrued, carryover, taken, pending and remaining leave days with the workdays of each request. Output matches the open-source Go engines byte for byte on 28 golden cases.
- When to use it
- Useful when an assistant needs to prepare or check WH-347 certified payroll figures for a crew week, reconcile fringe amounts across plans, or estimate an employee's PTO balance under a monthly or annual policy with tenure tiers and carryover caps.
- Requirements
- Node.js 22 or later; runs as a local stdio process, typically via npx leavesheet-mcp. No accounts, API keys, environment variables or headers are declared, and the README states there is no network access and no data stored.
Installation
In SourceWeft
- Open LeaveSheet: WH-347 payroll and PTO accrual in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 0486eac
Tools
0Version history
1- v0.1.0LatestOct 13, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts