PayrollToolsPricingBlog
Blog/Payroll

Ask AI Malaysian Payroll Questions: The Free HavaHR MCP for Cursor, Claude & ChatGPT

One npx command gives your AI assistant ten statutory calculators that stop it guessing EPF, SOCSO, and PCB numbers

Published: 15 July 2026β€’8 min read

Ask a general AI chatbot to calculate EPF on RM4,000 and you will often get a confident answer built on outdated rates, the wrong wage band, or a made-up rounding rule. Large language models are good at explaining payroll concepts and bad at looking up the KWSP Third Schedule. The fix is not a smarter prompt β€” it is giving the model a real calculator to call.

That is what the HavaHR Malaysia Payroll MCP does. It is a free, MIT-licensed npm package that plugs ten Malaysian payroll and HR calculators into Cursor, Claude, ChatGPT desktop, VS Code, Windsurf, or Zed. It runs locally, sends nothing over the network, and uses the same calculation engine that powers the free HavaHR web calculators.

Key takeaways

  • β€’ AI chatbots frequently miscalculate Malaysian statutory contributions because they guess instead of computing.
  • β€’ An MCP server gives the AI real tools: the model decides what to calculate, the tool does the arithmetic.
  • β€’ Install is one npx config β€” no repo, no API key, Node.js 20+ is the only requirement.
  • β€’ Results are planning estimates. Statutory filings still belong in the official portals or your payroll software.

Why AI gets Malaysian payroll wrong

Malaysian statutory deductions are table-driven, not formula-driven. SOCSO and EIS use PERKESO wage brackets, EPF follows the KWSP Third Schedule with special rates for employees aged 60 and above, and PCB is a multi-step MTD computation with reliefs and category codes. A language model reproducing these from memory will interpolate β€” and interpolation looks exactly like a correct answer until you compare it against the official table.

This matters most for the people most likely to ask an AI: a founder budgeting their first hire, an admin double-checking a payslip, an accountant sanity-checking an offer letter. A wrong SOCSO band or an outdated minimum wage assumption quietly propagates into real decisions.

What an MCP server is (in one paragraph)

The Model Context Protocol (MCP) is an open standard that lets AI applications call external tools. An MCP server exposes functions β€” here, payroll calculators β€” with typed inputs and outputs. When you ask β€œwhat is the employer cost of a RM5,000 hire?”, the AI recognises it should call calculate_employer_cost, passes the salary, and presents the structured result. The model handles language; the calculator handles arithmetic. Each does what it is actually good at.

The ten calculators you get

Version 0.2.0 of @havahr/mcp-calculatorsships ten tools, all running the shared engine behind HavaHR's web calculators:

ToolWhat it does
calculate_malaysia_payrollFull net pay: EPF, SOCSO, EIS, PCB, and employer contributions in one call
calculate_epfKWSP contributions, including age 60+ Part C rates
calculate_socsoPERKESO Category 1 and 2 from the official wage table
calculate_eisSIP contributions with citizen and PR eligibility
calculate_pcbMonthly tax deduction (MTD) estimate
calculate_employer_costTrue cost of hire: gross plus employer statutory outlay
calculate_overtimeEA 1955 overtime and public holiday pay at 1.5x / 2x / 3x
calculate_leave_prorationAnnual leave proration for mid-year joiners and leavers
check_employment_act_coverageEmployment Act 1955 coverage check (RM4,000 threshold)
calculate_hrd_corp_levyHRD Corp (HRDF) levy: mandatory 1% or voluntary 0.5%

The four newest tools go beyond monthly contributions: overtime and public holiday pay under the Employment Act 1955 (including the 104-hour monthly OT cap check), annual leave proration for mid-year joiners, the RM4,000 EA coverage test, and the HRD Corp levy with its mandatory-versus-voluntary registration rules.

Install in two minutes

Every host uses the same one-liner. For Cursor or Claude Desktop, add this to your MCP config:

{
  "mcpServers": {
    "havahr-calculators": {
      "command": "npx",
      "args": ["-y", "@havahr/mcp-calculators"]
    }
  }
}

Claude Code and Codex have CLI shortcuts (claude mcp add / codex mcp add), and VS Code, Windsurf, and Zed each take the equivalent config in their own settings file. The install guide has copy-paste snippets for all seven hosts, plus a note on why chatgpt.com in the browser is the one place this does not work.

Requirements

  • Node.js 20 or newer on your machine.
  • An MCP host that supports local stdio servers.
  • Nothing else β€” no account, no API key, no repository checkout.

Prompts to try

Once installed, ask naturally β€” the AI picks the right tool:

  • β€œWhat is the take-home pay on RM4,500 for a single Malaysian employee?”
  • β€œHow much does a RM5,000 hire actually cost the company per month?”
  • β€œHow much overtime pay for 10 OT hours on a RM2,600 salary?”
  • β€œProrate 12 days annual leave for someone who joined on 1 July.”
  • β€œIs a RM4,200 supervisor covered by the Employment Act?”
  • β€œWhat is the HRD Corp levy for 20 staff with RM80,000 total wages?”

What it is (and is not) for

The MCP is built for estimates: budgeting a hire, sanity-checking a payslip, comparing offers, or answering an employee's β€œwhy is my PCB this amount?” question with real numbers. It is deliberately not a filing tool β€” statutory submissions still happen in the KWSP, PERKESO, and LHDN portals, and monthly payroll for a real team needs per-employee records, payslips, and an audit trail.

That second half is what HavaHR does: the same statutory engine, applied automatically to every employee, every month, with payslips and Borang EA generated from one record.

Give your AI real payroll numbers

Free, local, MIT-licensed. Ten Malaysian calculators in one npx install.

Final takeaway

You do not need to stop asking AI about Malaysian payroll β€” you need to stop letting it guess. Install @havahr/mcp-calculators once, and every EPF, SOCSO, EIS, PCB, overtime, leave, and HRD Corp question your assistant answers is computed, not remembered. Start at the Malaysia Payroll MCP install guide, or try the same calculators in the browser at payroll calculator Malaysia.

Frequently Asked Questions

What is the HavaHR Malaysia Payroll MCP?

It is a free, open MCP (Model Context Protocol) server that gives AI assistants ten Malaysian payroll and HR calculators: net pay, EPF, SOCSO, EIS, PCB, employer cost, overtime, leave proration, Employment Act coverage, and HRD Corp levy. It runs locally on your machine and uses the same calculation engine as the free HavaHR web calculators.

Which AI tools does it work with?

Any MCP host that supports local stdio servers: Cursor, Claude Desktop, Claude Code, ChatGPT desktop and Codex CLI, VS Code, Windsurf, and Zed. chatgpt.com in the browser is not supported because it only accepts remote HTTP connectors.

How do I install it?

Add a short config that runs npx -y @havahr/mcp-calculators, or use a one-line CLI command such as claude mcp add or codex mcp add. Node.js 20+ is the only requirement β€” no repository checkout or API key needed.

Is it accurate enough for real payroll?

The calculators follow the KWSP Third Schedule, PERKESO contribution tables, LHDN MTD formula, and Employment Act 1955 rules, and the results are estimates for planning and sanity-checking. For statutory filings, always confirm against the official portals, or use payroll software like HavaHR that applies the tables per employee record.

Does it send my salary data anywhere?

No. The MCP server runs entirely on your machine and performs pure calculations. Nothing is uploaded to HavaHR or anyone else; the package has no analytics or network calls.

Is it free?

Yes. The package is published under the MIT licence on npm as @havahr/mcp-calculators. It is built and maintained by HavaHR, the Malaysian payroll and HR software for SMEs.