gajian-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
🤔 Why
PPh 21 changed in 2024: monthly withholding now uses TER (tarif efektif rata-rata) tables from PP 58/2023, December settles the year with Pasal 17, and BPJS has its own rates and wage caps that move by date. LLMs and many online calculators get this wrong:
Common mistake | What gajian does |
Picks the wrong TER row, or the wrong category for the PTKP status | All 125 monthly TER rows (A/B/C) + TER harian, transcribed from the PP 58/2023 Lampiran, every boundary tested |
Leaves employer-paid JKK, JKM and BPJS Kesehatan out of PPh 21 gross | Adds them, citing PMK 168/2023 Pasal 5 |
Uses an old JP wage cap | Caps are dated; the right one is picked by |
Applies annual Pasal 17 to a monthly salary | TER for January–November, Pasal 17 only in the December reconciliation |
Gives a number you can't check | Every result has a |
Related MCP server: Pasal — Indonesian Law
✨ What you get
A payslip, explained
payslip() for gaji pokok Rp10.000.000, status K/1, June 2025, office work (JKK class sangat rendah):
Line | Amount (Rp) |
Gaji pokok | 10.000.000 |
+ JKK, JKM, BPJS Kesehatan paid by employer | 454.000 |
Penghasilan bruto (TER base) | 10.454.000 |
− Employer contributions (taxed, not paid out) | −454.000 |
PPh 21: TER category B, 1,5% × 10.454.000 | −156.810 |
JHT 2% | −200.000 |
JP 1% | −100.000 |
BPJS Kesehatan 1% | −100.000 |
Take-home pay | 9.443.190 |
🚀 Use it
1. Library (Node >= 22, ESM, zero dependencies)
npm i gajianMonthly payslip (January-November):
import { payslip } from 'gajian';
const slip = payslip({
components: [{ label: 'Gaji pokok', amount: 10_000_000, fixed: true }],
status: 'K/1',
period: '2025-06',
jkkClass: 'sangatRendah',
});
slip.gross; // 10454000 (salary + employer JKK 24000 + JKM 30000 + BPJS Kesehatan 400000)
slip.pph21.tax; // 156810 (TER B 1,5%)
slip.takeHome; // 9443190 (minus PPh 21, JHT 200000, JP 100000, Kesehatan 100000)
slip.breakdown; // [{ label: 'Potongan PPh 21', amount: 156810, rule: 'PP 58/2023 Pasal 2 ayat (5); Lampiran ...' }, ...]December reconciliation for the same employee over 2025:
import { pph21December } from 'gajian';
pph21December({
annualGross: 125_448_000, // 12 x 10.454.000
annualEmployeeJhtJp: 3_600_000, // 12 x (200.000 + 100.000)
status: 'K/1',
year: 2025,
taxWithheldJanNov: 1_724_910, // 11 x 156.810
});
// { biayaJabatan: 6000000, netIncome: 115848000, ptkp: 63000000, pkp: 52848000,
// annualTax: 2642400, taxWithheldJanNov: 1724910, decemberTax: 917490, overpaid: 0, breakdown: [...] }2. MCP server
Claude Code:
claude mcp add gajian -- npx -y gajian-mcpClaude Desktop, Cursor and other MCP clients:
{ "mcpServers": { "gajian": { "command": "npx", "args": ["-y", "gajian-mcp"] } } }Tools: payslip, pph21_monthly, pph21_daily, pph21_december, bpjs_contributions, list_rules. Inputs match the library functions; bad input comes back as a tool error.
3. Agent Skill
Copy skills/gajian to ~/.claude/skills/ (or <project>/.claude/skills/). The skill tells the agent when to call gajian, what to ask before computing, and to never compute TER from memory.
📚 API
All money is integer rupiah. period is 'YYYY-MM'. status is 'TK/0'..'TK/3', 'K/0'..'K/3'. jkkClass is 'sangatRendah' | 'rendah' | 'sedang' | 'tinggi' | 'sangatTinggi'.
Function | Inputs | Returns |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| - | all loaded rule data with |
Rates are basis points (rateBp: 150 = 1,5%). Tax is rounded down to whole rupiah; each function's TSDoc states its rounding.
📜 Sources
Generated from the rule data in packages/gajian/src/rules/. primary = read from the regulation itself; secondary = no official primary document found.
Rule | Regulation | Effective from | Verification |
| PP 58/2023, Pasal 2 ayat (5); Lampiran huruf A (hlm. 1-5), B (hlm. 6-10), C (hlm. 10-14) | 2024-01-01 | primary |
| PP 58/2023, Pasal 2 ayat (6); Lampiran huruf D (hlm. 15) | 2024-01-01 | primary |
| PP 58/2023, Pasal 2 ayat (4) (hlm. 4) | 2024-01-01 | primary |
| PMK 101/PMK.010/2016, Pasal 1 huruf a, b, d (hlm. 2-3); Pasal 3 | 2016-01-01 | primary |
| UU 7/2021 (HPP), Pasal 3 angka 7: Pasal 17 ayat (1) huruf a UU PPh (hlm. 56) | 2022-01-01 | primary |
| PMK 168/2023, Pasal 10 ayat (2) (hlm. 12); Pasal 24 huruf a; Pasal 25 | 2024-01-01 | primary |
| PMK 168/2023, Pasal 10 ayat (1) huruf b (hlm. 11-12) | 2024-01-01 | primary |
| PP 46/2015, Pasal 16 ayat (1) (hlm. 11); Pasal 37 | 2015-07-01 | primary |
| PP 44/2015, Pasal 16 ayat (1) huruf a-e (hlm. 12); Pasal 63 | 2015-07-01 | primary |
| PP 44/2015, Pasal 18 ayat (1) (hlm. 13); Pasal 63 | 2015-07-01 | primary |
| PP 45/2015, Pasal 28 ayat (2)-(3) (hlm. 20-21) | 2015-07-01 | primary |
| PP 45/2015, Pasal 29 ayat (2) (hlm. 21) | 2015-07-01 | primary |
| BPJS Ketenagakerjaan, JP wage cap 2024 (letter as published by secondary sites) | 2024-03-01 | secondary |
| BPJS Ketenagakerjaan, JP wage cap 2025 (letter as published by secondary sites; Rp10.547.400 shown as current on bpjsketenagakerjaan.go.id, read 2026-11-02) | 2025-03-01 | secondary |
| Perpres 64/2020, Pasal I angka 3 (Pasal 30 ayat (1)) and angka 5 (Pasal 32) | 2020-05-06 | primary |
| Perpres 59/2024, Pasal I angka 7 (Pasal 32, hlm. 11-12) | 2024-05-08 | primary |
Note on the JP wage cap: the 2024 and 2025 values are secondary, and no 2026 value is loaded yet, so 2026 periods use the 2025 cap. The 2016-2023 adjustments are also missing (those periods fall back to the 2015 cap). If you have the BPJS Ketenagakerjaan letter for your period, pass it as jpWageCap. list_rules (MCP) and rules (library) show what is loaded.
🎯 Scope
Covered: PPh 21 for pegawai tetap (TER bulanan January-November, December reconciliation), pegawai tidak tetap (TER harian / Pasal 17, or TER bulanan if paid monthly), PTKP, BPJS Ketenagakerjaan (JHT, JKK, JKM, JP) and BPJS Kesehatan for peserta penerima upah. Periods from 2024-01.
Not covered:
Part-year employees in December (annualisation, biaya jabatan cap of Rp500.000 x months worked).
Zakat / sumbangan keagamaan wajib through the employer; other pension (DPLK) unless added to
annualEmployeeJhtJp.Higher rate for recipients without NPWP.
Gross-up / tunjangan pajak (PPh 21 borne by the employer).
Pensiunan and PNS rules, PPh 21 for non-pegawai.
THR and pesangon as separate rules.
UMK/UMP lookup (pass
kesehatanFloor), holidays, NPWP/NIK validation.JP wage caps for 2016-2023 (pass
jpWageCap).Storage of personal data: everything is pure functions.
🗺️ Roadmap
UMK/UMP dataset, with the SK Gubernur number cited per row.
Zakat via employer.
Part-year annualisation in December.
Gross-up (tunjangan pajak).
Higher rate without NPWP.
THR.
Pesangon.
⚠️ Disclaimer
This is not tax advice. gajian follows the cited regulations as closely as its tests can check, but check results against the regulation (and your tax consultant) before you rely on them.
📄 License
MIT. Contributions: see CONTRIBUTING.md.
🇮🇩 Bahasa Indonesia
gajian menghitung PPh 21 (TER PP 58/2023, rekonsiliasi Desember dengan Pasal 17) dan iuran BPJS (JHT, JKK, JKM, JP, Kesehatan) sebagai library TypeScript, server MCP, dan Agent Skill. Setiap tarif dan batas upah punya tanggal berlaku dan rujukan pasal + halaman regulasinya, dan setiap hasil punya breakdown baris per baris dengan dasar hukumnya.
Library:
npm i gajian, lalupayslip(...)untuk slip Januari-November danpph21December(...)untuk Desember (contoh di atas).MCP:
claude mcp add gajian -- npx -y gajian-mcp.Agent Skill: salin folder
skills/gajianke~/.claude/skills/.
Batas upah JP 2024 dan 2025 bersumber sekunder, dan nilai 2026 belum dimasukkan; isi jpWageCap kalau punya surat BPJS Ketenagakerjaan yang lebih baru. Belum mencakup THR, pesangon, UMK/UMP, karyawan yang masuk/keluar di tengah tahun, gross-up, dan tarif tanpa NPWP.
Bukan nasihat pajak. Cocokkan hasilnya dengan regulasi.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Exact French tax & payroll calculations for AI agents: income tax (impôt sur le revenu: parts, quotient familial, décote, TMI), micro-entrepreneur URSSAF contributions (ACRE, versement libératoire) with an optional VAT franchise check (franchise en base de TVA: must I charge VAT?), and gross-to-net salary with employer cost — CDI or CDD (prime de précarité, congés payés), full-time or part-time. Missing information? Your agent gets, for free, the exact questions to ask the user (in French, with types and allowed values) in a single round trip. Deterministic, no LLM: matches all 7,095 values of the official DGFiP tax tables, 60 cases from the official simulators and the official worked examples of the tax doctrine (BOFiP). Unsupported cases are refused for free; you pay $0.005 in USDC via x402 only when the calculation succeeds. Free catalogue tool: list_france_calculators.
Malaysian SME accounting, e-Invoice and payroll for your AI. 95 tools; writes are approved drafts.
Deterministic Japan statutory calculations with cited primary sources: net pay, social insurance, income walls, bonus, consumption tax, business days, overtime, retirement tax, payslip audit and crypto tax. x402 (USDC on Base), no API key; failed calls are never charged.
Jordan & GCC labour-law, tax and finance calculators for AI agents — 36 deterministic tools.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI clients to access official Indonesian statistical data from Badan Pusat Statistik (BPS) through natural language queries. It provides over 20 tools for retrieving demographic, economic, and trade data with support for bilingual responses and fuzzy domain matching.34773 npm7MIT
- AlicenseNot gradedqualityBmaintenanceSearch Indonesian regulations, resolve citations, read specific articles, and find Constitutional Court decisions with official-source links. Six research and feedback tools plus a health probe provide structured text, legal-status context, and amendment relationships. Hosted Streamable HTTP; free account with OAuth or a personal token.2AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to compute accurate Polish payroll figures, including net-to-gross salary conversions, hourly rates, and statutory tax/ZUS data, matching the results on kalkulatory-place.pl to the cent.68 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to compute exact Sri Lankan tax figures — APIT/salary tax, annual income tax, withholding tax, VAT and SSCL — under the official Inland Revenue Department rules in force on any given date since 1 January 2023. Every result is returned with precise decimal amounts and the dated IRD sources and rule versions used, so rates are never recalled from memory.29 PyPIMIT