Malaysia Payroll

v0.3.0
io.github.davidyapcc/malaysia-payroll-mcp Checked 10 hours ago Published 9 days ago

Statutory deductions and employer contributions in Malaysia (EPF, SOCSO, SKBBK, EIS, MTD/PCB), cited

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

calculate_epf Calculate EPF (KWSP) contributions

Works out the monthly EPF (KWSP) employee and employer contributions for one employee in Malaysia, from the EPF Third Schedule in effect for the pay period, and cites the band used. Fixed monthly salaries only. Include the result's disclaimer in the answer to the user.

ParameterTypeDescription
age *integerThe employee's age in whole years.
citizenship *stringmalaysian, permanent_resident, or non_malaysian (a foreign worker without PR).
monthlySalary *numberMonthly salary in RM, at most 2 decimal places: basic pay plus fixed allowances. Excludes overtime, commission, bonuses and arrears.
payPeriodstringThe calendar month the salary is paid for, as YYYY-MM. It decides which rate tables apply. Defaults to the current month in Malaysia.
registeredWithEpfBefore1Aug1998booleanOnly for non_malaysian: true if the employee registered with EPF before 1 Aug 1998, which puts them on the Malaysian rates. Defaults to false.

calculate_socso_eis Calculate SOCSO, SKBBK and EIS contributions

Works out the monthly SOCSO (PERKESO, Act 4), SKBBK (Lindung 24 Jam) and EIS (Act 800) contributions for one employee in Malaysia, from the PERKESO tables in effect for the pay period, and cites the row used for each. Fixed monthly salaries only. Include the result's disclaimer in the answer to the user.

ParameterTypeDescription
age *integerThe employee's age in whole years.
citizenship *stringmalaysian, permanent_resident, or non_malaysian (a foreign worker without PR).
monthlySalary *numberMonthly salary in RM, at most 2 decimal places: basic pay plus fixed allowances. Excludes overtime, commission, bonuses and arrears.
eisPayableBefore57booleanRequired for employees aged 57 to 59: true if EIS contributions were payable for them before they turned 57 (even if never paid). Can't be worked out from age.
payPeriodstringThe calendar month the salary is paid for, as YYYY-MM. It decides which rate tables apply. Defaults to the current month in Malaysia.
skbbkStatusstringSOCSO's 24-hour protection scheme (SKBBK, Lindung 24 Jam). Everyone is covered by default; opted_out only if PERKESO approved the employee's opt-out, which foreign workers can't do. Defaults to covere…

calculate_mtd Calculate MTD (PCB) income tax deduction

Works out the monthly tax deduction (MTD, also called PCB) for one employee in Malaysia. For a tax resident it uses LHDN's computerised formula, from the schedule in effect for the pay period, and shows the working; for a non-resident it applies the flat 30%. Fixed monthly salaries and standard reliefs only (individual, spouse, children, EPF, plus a TP1 total); no bonuses or zakat. Include the result's disclaimer in the answer to the user.

ParameterTypeDescription
epfEmployee *numberThe employee's EPF contribution this month in RM (the employee share from calculate_epf). 0 if none.
monthlySalary *numberMonthly salary in RM, at most 2 decimal places: basic pay plus fixed allowances. Excludes overtime, commission, bonuses and arrears.
childrenintegerQualifying children at RM2,000 relief each: unmarried and under 18, or 18 and over in full-time education below diploma level. Must be 0 in category 1. Defaults to 0. Children in higher education or w…
payPeriodstringThe calendar month the salary is paid for, as YYYY-MM. It decides which rate tables apply. Defaults to the current month in Malaysia.
taxCategoryRequired for a tax resident. LHDN tax category. 1: single. 2: married and the spouse has no income (or is jointly assessed). 3: married with a working spouse, or divorced, widowed, or single with an a…
taxResidentbooleanDefaults to true. false if the employee is not resident, or not known to be resident, in Malaysia for tax (usually under 182 days in the calendar year): MTD is then a flat 30% of the salary, with no r…
tp1ReliefsnumberOther reliefs the employee claimed through payroll this month on form TP1 (LP1), in RM. Defaults to 0.
yearToDateRequired from February. Totals from earlier months of the same calendar year, including any previous employer's (all 0 for someone with no earlier income this year). Or "same_salary_all_year" if every…

calculate_net_pay Calculate net pay (payslip)

Works out one month's payslip for one employee in Malaysia: EPF, SOCSO, SKBBK, EIS and MTD (PCB) deductions, net pay, and the employer's contributions and total cost. Runs the same calculations as calculate_epf, calculate_socso_eis and calculate_mtd, feeding the employee EPF into MTD, and cites the source of every line. For a non_malaysian employee, say whether they are tax resident (taxResident). Fixed monthly salaries and standard reliefs only; no bonuses or zakat. Include the result's disclaimer in the answer to the user.

ParameterTypeDescription
age *integerThe employee's age in whole years.
citizenship *stringmalaysian, permanent_resident, or non_malaysian (a foreign worker without PR).
monthlySalary *numberMonthly salary in RM, at most 2 decimal places: basic pay plus fixed allowances. Excludes overtime, commission, bonuses and arrears.
childrenintegerQualifying children at RM2,000 relief each: unmarried and under 18, or 18 and over in full-time education below diploma level. Must be 0 in category 1. Defaults to 0. Children in higher education or w…
eisPayableBefore57booleanRequired for employees aged 57 to 59: true if EIS contributions were payable for them before they turned 57 (even if never paid). Can't be worked out from age.
payPeriodstringThe calendar month the salary is paid for, as YYYY-MM. It decides which rate tables apply. Defaults to the current month in Malaysia.
registeredWithEpfBefore1Aug1998booleanOnly for non_malaysian: true if the employee registered with EPF before 1 Aug 1998, which puts them on the Malaysian rates. Defaults to false.
skbbkStatusstringSOCSO's 24-hour protection scheme (SKBBK, Lindung 24 Jam). Everyone is covered by default; opted_out only if PERKESO approved the employee's opt-out, which foreign workers can't do. Defaults to covere…
taxCategoryRequired for a tax resident. LHDN tax category. 1: single. 2: married and the spouse has no income (or is jointly assessed). 3: married with a working spouse, or divorced, widowed, or single with an a…
taxResidentbooleanRequired for a non_malaysian employee; defaults to true otherwise. true if tax resident in Malaysia (usually 182 days or more in the calendar year). false for the flat 30% non-resident MTD, with no re…
tp1ReliefsnumberOther reliefs the employee claimed through payroll this month on form TP1 (LP1), in RM. Defaults to 0.
yearToDateRequired from February. Totals from earlier months of the same calendar year, including any previous employer's (all 0 for someone with no earlier income this year). Or "same_salary_all_year" if every…