What LeaveSheet: WH-347 payroll and PTO accrual does
LeaveSheet: WH-347 payroll and PTO accrual provides three calculation tools for payroll and leave data. The WH-347 functions cover the revised January 2025 form’s worker lines and fringe reconciliation. The PTO function calculates a leave balance at a specified date using an organization’s policy and supplied employee records.
The server is a JavaScript port of the open-source Go WH-347 and PTO engines used by LeaveSheet / TableTemplates. Its test suite compares results byte for byte with those engines across 28 golden cases. It does not call external services and does not retain submitted data.
How it works
The server communicates through MCP over stdio. A client sends JSON arguments to one of the tools and receives structured JSON in response.
wh347_payroll_lines accepts one worker entry for each worker-week on a project. It returns regular, overtime, and total hours; straight-time and overtime rates; fringe credit; cash in lieu; project and all-work gross amounts; deductions; net pay; and a sanity status. It also returns totals for the four fringe plans and the overall column 6B comparison. The output includes the equivalent CSV line number and can match the JSON produced by the wh347 command.
wh347_fringe_reconcile compares the sum of worker column 6B fringe credits with payments assigned to health and welfare, pension, vacation or holiday, and training plans. Its reconciles result is true when the difference is below 0.005.
pto_accrual uses a monthly or annual policy, hire date, as-of date, carryover, leave requests, and holiday data. It reports service time, effective accrual rate, capped accrual, capped carryover, approved and pending usage, remaining leave, and the workdays represented by each request. Requests can include half-day boundaries and pending, approved, denied, or cancelled statuses.
Setup and configuration
LeaveSheet: WH-347 payroll and PTO accrual requires Node.js 22 or newer. A stdio MCP configuration can launch it with npx:
{
"mcpServers": {
"leavesheet": {
"command": "npx",
"args": ["-y", "leavesheet-mcp"]
}
}
}
Payroll inputs use field names corresponding to the wh347 CSV columns, including worker type, base rate, daily regular and overtime hours, four fringe rates, cash-in-lieu rate, gross all-work pay, and deductions. Missing numeric values default to zero, while negative values are rejected. PTO dates use YYYY-MM-DD format. Federal holidays can be added by listing the relevant years; the server supplies the 11 U.S. federal holidays and observed dates for those years.
Tools and capabilities
- Calculate WH-347 worker lines and crew totals.
- Apply the overtime rate as base rate multiplied by 1.5.
- Reconcile column 6B against four fringe payment plans.
- Calculate PTO accrual with caps, carryover, tenure tiers, holidays, and half days.
- Return payroll amounts rounded to cents in output while leaving PTO values unrounded.
Limitations and notes
The calculations are not an official DOL tool and are not legal or payroll advice. The WH-347 functions do not look up prevailing wage rates, classify work, compute taxes, or derive the regular/overtime split; those values must be supplied. The output disclaimer identifies the results as calculator output.
PTO accrual is month-based, counts the hire month in full, restarts accrual on January 1, and calculates years of service as days divided by 365. The entered carryover is capped by policy. State paid-leave rules are not encoded, and the built-in holiday set is limited to U.S. federal holidays. WH-347 output rounding occurs only after calculation, while PTO values are not rounded.