Skip to main content
Glama
Sri Lanka Payslip

Sri Lanka Payslip

Sri Lanka Salary Calculator and Payslip Reference

sri-lanka-salary-calculator MCP server

An inspectable reference implementation for estimating a regular primary employment payslip in Sri Lanka. It calculates monthly APIT (PAYE), employee EPF, employer EPF, employer ETF, stamp duty, net pay, and employer cost.

The current reference is maintained by MyPayslip.lk for the Sri Lanka 2026/27 year of assessment. The latest regular-employment APIT table published by the Inland Revenue Department is labelled 2025/26; the relief and rates effective from 1 April 2025 remain the basis used for 2026/27.

Try the calculator

No account is required. The hosted calculator runs in the browser, and the public calculation API does not store salary inputs.

Related MCP server: io.github.CSOAI-ORG/tax-calculator-ai-mcp

Verified example

For a monthly gross salary and EPF/ETF contribution base of LKR 200,000:

Item

Monthly amount

Gross salary

LKR 200,000

APIT / PAYE

LKR 3,000

Employee EPF (8%)

LKR 16,000

Stamp duty

LKR 25

Estimated net pay

LKR 180,975

Employer EPF (12%)

LKR 24,000

Employer ETF (3%)

LKR 6,000

Run the same case locally:

node examples/calculate.mjs 200000

Or call the hosted read-only API:

curl "https://mypayslip.lk/api/calc?salary=200000"

Reference implementation

calculator.mjs is intentionally dependency-free. It accepts a gross monthly salary and an optional EPF/ETF eligible earnings base. The contribution base should come from payroll records when excluded or unusual payments make it different from gross salary.

Install the package from npm after its first registry release, or directly from this public repository now:

npm install github:Buddhima-JD3/sri-lanka-salary-calculator
import { calculateSalary } from "sri-lanka-salary-calculator";

const result = calculateSalary({
  grossSalary: 200000,
  epfEtfEarningsBase: 200000,
});

console.log(result.netPay); // 180975

Verify the published examples:

npm test

Use with an AI assistant

This repository includes a local Model Context Protocol server built with the official MCP SDK. It gives compatible AI assistants three read-only tools:

Tool

Purpose

calculate_sri_lanka_payslip

Calculate APIT/PAYE, EPF, ETF, stamp duty, net pay, and employer cost

get_sri_lanka_payroll_reference

Retrieve maintained assumptions, scope limits, and official sources

get_sri_lanka_payslip_checklist

Prepare or review the required payslip fields and arithmetic checks

Use the no-auth Streamable HTTP endpoint when the client supports remote MCP servers:

https://mypayslip.lk/api/mcp

The same tools can run locally over stdio. In that mode, salary inputs are not sent to MyPayslip.lk or another external service.

Official MCP Registry: io.github.Buddhima-JD3/sri-lanka-payslip

Agent-oriented installation instructions are available in llms-install.md.

The Registry package is a public AMD64/ARM64 container:

docker run -i --rm ghcr.io/buddhima-jd3/sri-lanka-payslip-mcp:2026.27.2

Add it to an MCP client configuration:

{
  "mcpServers": {
    "sri-lanka-payslip": {
      "command": "npx",
      "args": [
        "-y",
        "github:Buddhima-JD3/sri-lanka-salary-calculator"
      ]
    }
  }
}

Or start it from this repository:

npm install
npm run mcp

Machine-readable references

Primary sources

Scope

This reference covers regular profits from primary employment. Bonus, terminal-benefit, secondary-employment, non-resident, and unusual payroll cases may require a different APIT table or professional review. Results are estimates, not payroll, tax, or legal advice.

When citing a result, use:

MyPayslip.lk, Sri Lanka 2026/27 payslip calculation methodology, verified 17 July 2026.

Available Tools

3 tools
calculate_sri_lanka_payslipCalculate a Sri Lanka payslipA
Read-onlyIdempotent
Inspect

Estimate monthly APIT/PAYE, employee and employer EPF, ETF, stamp duty, net pay, and employer cost for regular primary employment in Sri Lanka.

Inputs: grossSalary (required), epfEtfEarningsBase, otherEmployeeDeductions. Returns: apit, netPay, caution, sources, +14 more

get_sri_lanka_payroll_referenceGet the Sri Lanka payroll referenceA
Read-onlyIdempotent
Inspect

Return the maintained APIT, EPF, ETF, and stamp-duty assumptions with official Sri Lankan sources and scope limits.

Inputs: no named parameters. Returns: scope, period, sources, citation, +15 more

get_sri_lanka_payslip_checklistGet a Sri Lanka payslip checklistA
Read-onlyIdempotent
Inspect

Return the fields and checks needed to prepare or review a Sri Lankan employee payslip.

Inputs: no named parameters. Returns: sources, earnings, guideUrl, evidenceNote, +5 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: calculation, reference data, and checklist. No overlap or ambiguity exists.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (calculate_..., get_...) with clear, descriptive nouns. No mixed conventions.

    Tool Count4/5

    Three tools is a reasonable scope for a niche payslip server, covering calculation, reference, and checklist. It is not overly thin or excessive.

    Completeness4/5

    The server covers the core needs: calculation, assumptions, and checklist. Minor gaps like an update endpoint for assumptions are not critical for a calculation-focused tool.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Taiwan statutory payroll calculation — labor & health insurance, labor pension, 2nd-gen NHI supplementary premium, income-tax withholding, and old-age benefits. Sourced from official gazettes, verified against official sample data.
      9
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Calculate income tax (UK/US brackets), EU VAT, UK corporation tax, and capital gains tax. Provides estimates only - not professional tax advice.
      3 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI tools to normalize messy payroll spreadsheets (xlsx/xls/csv) into a standardized 10-column template for social insurance calculation, with automatic column detection, net-to-gross conversion, and cross-entity/month merging.
      4
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Russian payroll calculator (2025-2026 rules): net/gross salary with progressive 13-22% income tax, employer contributions incl. SME/IT tariffs, vacation pay, sick pay and unused-vacation compensation. Fully local, no API key.
      7
      MIT