{
  "markdown": "# Sri Lanka Salary Calculator and Payslip Reference\n\n[![sri-lanka-salary-calculator MCP server](https://glama.ai/mcp/servers/Buddhima-JD3/sri-lanka-salary-calculator/badges/score.svg)](https://glama.ai/mcp/servers/Buddhima-JD3/sri-lanka-salary-calculator)\n\nAn inspectable reference implementation for estimating a regular primary\nemployment payslip in Sri Lanka. It calculates monthly APIT (PAYE), employee\nEPF, employer EPF, employer ETF, stamp duty, net pay, and employer cost.\n\nThe current reference is maintained by\n[MyPayslip.lk](https://mypayslip.lk/?utm_source=github&utm_medium=reference-repo)\nfor the Sri Lanka 2026/27 year of assessment. The latest regular-employment\nAPIT table published by the Inland Revenue Department is labelled 2025/26;\nthe relief and rates effective from 1 April 2025 remain the basis used for\n2026/27.\n\n## Try the calculator\n\n- [Developer reference](https://buddhima-jd3.github.io/sri-lanka-salary-calculator/)\n- [Sri Lanka salary calculator](https://mypayslip.lk/)\n- [Embeddable salary calculator widget](https://mypayslip.lk/salary-calculator-widget/)\n- [Payslip generator](https://mypayslip.lk/payslip-generator/)\n- [How to read and check a Sri Lankan payslip](https://mypayslip.lk/how-to-read-payslip/)\n- [Calculation methodology](https://mypayslip.lk/methodology/)\n\nNo account is required. The hosted calculator runs in the browser, and the\npublic calculation API does not store salary inputs.\n\n## Verified example\n\nFor a monthly gross salary and EPF/ETF contribution base of LKR 200,000:\n\n| Item | Monthly amount |\n| --- | ---: |\n| Gross salary | LKR 200,000 |\n| APIT / PAYE | LKR 3,000 |\n| Employee EPF (8%) | LKR 16,000 |\n| Stamp duty | LKR 25 |\n| **Estimated net pay** | **LKR 180,975** |\n| Employer EPF (12%) | LKR 24,000 |\n| Employer ETF (3%) | LKR 6,000 |\n\nRun the same case locally:\n\n```bash\nnode examples/calculate.mjs 200000\n```\n\nOr call the hosted read-only API:\n\n```bash\ncurl \"https://mypayslip.lk/api/calc?salary=200000\"\n```\n\n## Reference implementation\n\n[`calculator.mjs`](./calculator.mjs) is intentionally dependency-free. It\naccepts a gross monthly salary and an optional EPF/ETF eligible earnings base.\nThe contribution base should come from payroll records when excluded or\nunusual payments make it different from gross salary.\n\nInstall the package from npm after its first registry release, or directly\nfrom this public repository now:\n\n```bash\nnpm install github:Buddhima-JD3/sri-lanka-salary-calculator\n```\n\n```js\nimport { calculateSalary } from \"sri-lanka-salary-calculator\";\n\nconst result = calculateSalary({\n  grossSalary: 200000,\n  epfEtfEarningsBase: 200000,\n});\n\nconsole.log(result.netPay); // 180975\n```\n\nVerify the published examples:\n\n```bash\nnpm test\n```\n\n## Use with an AI assistant\n\nThis repository includes a local\n[Model Context Protocol](https://modelcontextprotocol.io/) server built with\nthe official MCP SDK. It gives compatible AI assistants three read-only tools:\n\n| Tool | Purpose |\n| --- | --- |\n| `calculate_sri_lanka_payslip` | Calculate APIT/PAYE, EPF, ETF, stamp duty, net pay, and employer cost |\n| `get_sri_lanka_payroll_reference` | Retrieve maintained assumptions, scope limits, and official sources |\n| `get_sri_lanka_payslip_checklist` | Prepare or review the required payslip fields and arithmetic checks |\n\nUse the no-auth Streamable HTTP endpoint when the client supports remote MCP\nservers:\n\n```text\nhttps://mypayslip.lk/api/mcp\n```\n\nThe same tools can run locally over stdio. In that mode, salary inputs are not\nsent to MyPayslip.lk or another external service.\n\nOfficial MCP Registry:\n[`io.github.Buddhima-JD3/sri-lanka-payslip`](https://registry.modelcontextprotocol.io/?q=io.github.Buddhima-JD3%2Fsri-lanka-payslip)\n\nAgent-oriented installation instructions are available in\n[`llms-install.md`](./llms-install.md).\n\nThe Registry package is a public AMD64/ARM64 container:\n\n```bash\ndocker run -i --rm ghcr.io/buddhima-jd3/sri-lanka-payslip-mcp:2026.27.2\n```\n\nAdd it to an MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"sri-lanka-payslip\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"github:Buddhima-JD3/sri-lanka-salary-calculator\"\n      ]\n    }\n  }\n}\n```\n\nOr start it from this repository:\n\n```bash\nnpm install\nnpm run mcp\n```\n\n## Machine-readable references\n\n- [OpenAPI 3.1 specification](./reference/openapi.json)\n- [Calculation methodology and test cases](./reference/methodology.json)\n- [Archived v2026.27.2 source](https://archive.softwareheritage.org/swh:1:rev:a5b7e4f57beae3cfab9418e2b425dfac7dabbbff/)\n- Live OpenAPI: https://mypayslip.lk/openapi.json\n- Live methodology: https://mypayslip.lk/calculation-methodology.json\n- Agent guidance: https://mypayslip.lk/llms.txt\n\n## Primary sources\n\n- [Inland Revenue Department APIT tax tables](https://www.ird.gov.lk/en/publications/sitepages/apit_tax_tables.aspx?menuid=1502)\n- [Inland Revenue Department income tax](https://www.ird.gov.lk/en/type%20of%20taxes/sitepages/income%20tax.aspx?menuid=1201)\n- [Central Bank of Sri Lanka Employees' Provident Fund](https://www.cbsl.gov.lk/en/employees-provident-fund)\n- [Employees' Trust Fund Board employer guidance](https://etfb.lk/employer-details/)\n- [Inland Revenue Department stamp duty](https://www.ird.gov.lk/en/type%20of%20taxes/sitepages/stampduty.aspx)\n\n## Scope\n\nThis reference covers regular profits from primary employment. Bonus,\nterminal-benefit, secondary-employment, non-resident, and unusual payroll cases\nmay require a different APIT table or professional review. Results are\nestimates, not payroll, tax, or legal advice.\n\nWhen citing a result, use:\n\n> MyPayslip.lk, Sri Lanka 2026/27 payslip calculation methodology, verified\n> 17 July 2026.\n",
  "bytes": 5694,
  "sha": "5758fdacf4ee9314a415de7971591f65426efa9de603f7c744ffdd4ed08abc6b",
  "repo_slug": "buddhima-jd3/sri-lanka-salary-calculator",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_buddhima_jd3_sri_lanka_payslip_aa19190c/readme"
}