lodyhon
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lodyhon I make ฿85k/month — what deductions should I buy to cut my 2569 tax?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ภาษาไทย
lodyhon (ลดหย่อน) คือ MCP Server พร้อมหน้าจอวางแผนแบบอินเทอร์แอกทีฟ (MCP App) สำหรับ ภาษีเงินได้บุคคลธรรมดาของมนุษย์เงินเดือน มาตรา 40(1) ปีภาษี 2569 ที่ทำงานอยู่ในหน้าแชท AI ของคุณโดยตรง
เห็นช่องว่างทุกสิทธิลดหย่อน พร้อมแถบเพดานรวมกลุ่ม (ประกันชีวิต+สุขภาพ ฿100,000 และกลุ่มเกษียณ ฿500,000) และเพดานแยกของ ThaiESG / ThaiESGX (฿300,000)
จัดอันดับว่าซื้ออะไรคุ้มสุด จากภาษีที่ประหยัดได้จริง เงินที่ยังอยู่กับเรา (กองทุน > ประกัน > ค่าใช้จ่าย/บริจาค) และระยะเวลาถือครอง
ลากสไลเดอร์จำลองตัวเลขสดๆ บนหน้าจอในแชท ใช้เครื่องยนต์คำนวณเดียวกับฝั่งเซิร์ฟเวอร์ ตัวเลขตรงกันเสมอ พร้อมกราฟขั้นบันไดภาษีและระยะตกขั้น (
ลดอีก ฿X ตกขั้นภาษี)โยนสลิปเงินเดือน / 50 ทวิ / ภ.ง.ด. / ใบเสร็จ เพื่อส่งให้ AI ช่วยกรอกได้ (ไฟล์อยู่เฉพาะในเครื่องจนกว่าคุณจะกดส่ง) แล้วกด ส่งแผนนี้ให้ AI เพื่อคุยต่อได้ทันที
Related MCP server: thailand-invoice-mcp
About
Planning year-end Thai personal income tax usually means bouncing between a static spreadsheet, a standalone web calculator, and an AI chat that guesses deduction caps from stale training data.
Existing tools cover parts of the problem — single-tool calculators (mythaitaxes-mcp), bracket-only lookups (inventivaglobal/thai-tax-mcp-server), VAT/WHT references (thailand-data-mcp), chat-only prompt skills (satasuk03/thai-personal-finance-planner), or standalone web apps (Tax-Planner, howtotax) — but none combines verified 2569 rules with an interactive planner directly inside the AI conversation.
lodyhon bridges that gap:
The AI explains eligibility, trade-offs, and next steps using grounded 2569 rules with official
rd.go.thsource links.The in-chat MCP App UI renders cap bars, a bracket step chart, and sliders so you can explore scenarios without another round-trip.
One shared TypeScript engine (
src/engine.ts) powers both the MCP server and the UI, guaranteeing the numbers in chat and on screen never diverge.
Features
In-chat interactive MCP App UI: Cap bars, sliders, and numeric inputs rendered directly inside MCP Apps hosts (
ui://lodyhon/planner), recomputed locally with zero server round-trips.Honest gap view and ranking: Ranks remaining purchasable deductions by actual tax saved (handling bracket crossings), then by whether the money stays yours (
fund>insurance>spend), then by shorter lock-up.Shared-cap and donation awareness: Enforces combined ceilings (
life_health฿100,000,retirement฿500,000), gross-income percentage caps, and the post-deduction 10% donation cap with 2× e-Donation priority.Bracket drop visibility: Pure CSS bracket step chart showing how net income fills the 0%–35% progressive bands and the exact baht needed to drop into the next lower bracket.
Document drop for faster entry: Drag-and-drop payslips, 50 ทวิ, ภ.ง.ด., or deduction receipts (PDF, images, CSV, TXT); files stay local until you click send.
Year-end deadline awareness: Tracks days left until 31 December 2026 and reminds you that AMC cut-offs for RMF and ThaiESG can fall earlier.
Thai-first, host-adaptive design: Styled with Kanit typography and a navy/teal palette that adapts to light and dark host themes across 360–720 px widths.
Stateless and local: Stdio-only MCP server with no database, no persisted user financial data, and no outbound network requests.
Quick start
Claude Code
claude mcp add lodyhon -- npx -y lodyhon-mcpClaude Desktop
Add lodyhon to your claude_desktop_config.json:
{
"mcpServers": {
"lodyhon": {
"command": "npx",
"args": ["-y", "lodyhon-mcp"]
}
}
}Local build
npm install
npm run buildThen point your MCP client to node /path/to/lodyhon/dist/src/main.js (or run npm start over stdio).
Example prompt
เงินเดือนทั้งปี 1,200,000 โบนัส 200,000 จ่ายประกันสังคมเต็ม กองทุนสำรองเลี้ยงชีพ 60,000 ประกันชีวิต 40,000 ดอกเบี้ยบ้าน 50,000 — ช่วยวางแผนลดหย่อนปี 2569 หน่อย
The assistant calls thai_tax_overview, summarizes your tax position and top opportunities in Thai, and opens the interactive planner UI.
Tools
Tool | Description | Inputs | Output |
| Computes 40(1) tax owed, effective/marginal rates, remaining room per deduction, bracket drop distance, and ranked suggestions; opens |
| Thai text summary + |
| Returns every supported deduction for the tax year with fixed caps, percentage caps, shared groups, lock-up periods, notes, and official source URLs. |
| Readable Thai rule list + full |
Negative values and unknown deduction IDs are rejected by Zod with clear validation errors. Amounts above a legal cap are not rejected — they are clamped to the legal ceiling and flagged with capped: true as a warning in both the summary and UI.
The planner UI
Rendered via MCP resource ui://lodyhon/planner (dist/ui/app.html):
Step-by-step flow (
รายได้ → ครอบครัว → วางแผนซื้อเพิ่ม): One panel at a time keeps the in-chat frame short. Opens on step 3 when the AI already knows your salary, or on step 1 with an empty form so you can type numbers yourself instead of putting everything in one chat message.Editable income & family: Monthly salary and bonus (
≈ N เดือน), spouse checkbox, parent / disabled-dependant counters, and one-tap social security from salary (5% of wage ≤ ฿17,500/month).Hero summary: Estimated tax owed, effective rate, marginal bracket, net taxable income, and days remaining until 31 December 2026.
Ranked suggestions (
ซื้ออะไรคุ้มสุด): Top 4 unfilled purchasable deductions showing maximum tax saved, asset vs. expense tags, remaining room, and lock-up period.Bracket step chart: Visualizes net income across progressive tax brackets and highlights how many more baht drop you into the next lower rate (
ลดอีก ฿X ตกขั้นภาษี).Live cap bars and sliders: Grouped cards for shared caps (
กลุ่มเกษียณ,ประกันชีวิต + สุขภาพ) and standalone cards (e.g.,ThaiESG / ThaiESGX,ดอกเบี้ยบ้าน) withempty,maxed, andcappedstates.Collapsible
ลดหย่อนอื่นๆ: Keeps less common deductions (parents' health insurance, political party, art purchases, solar rooftop, general and 2× donations) out of the way until needed; auto-expands if already populated.Local file drop (
โยนไฟล์ให้ AI ช่วยกรอก): Accepts payslips, 50 ทวิ, ภ.ง.ด., and receipts (PDF, images, CSV, TXT). Text/CSV is read locally in the iframe; images and PDFs are forwarded only if the host advertises binary support, otherwise the AI prompts you to attach them directly in chat.Send back to chat (
ส่งแผนนี้ให้ AI): Pushes your adjusted plan (and any staged files) intoupdateModelContextand triggerssendMessageso the AI can continue advising on your updated numbers.
Supported deductions (2569)
Automatic 40(1) deductions applied before itemized deductions:
Standard expense deduction (ค่าใช้จ่าย 40(1)): 50% of gross income, capped at ฿100,000.
Personal allowance (ค่าลดหย่อนส่วนตัว): ฿60,000.
ID | Deduction | Cap | Shared group | Notes |
| คู่สมรส (ไม่มีเงินได้) | ฿60,000 | — | Spouse with no income |
| บุตร | Actual | — | ฿30,000/child; 2nd+ child born 2561+ is ฿60,000/child |
| บิดามารดา | ฿120,000 | — | ฿30,000/parent (age 60+, income ≤ ฿30,000) |
| อุปการะผู้พิการ | Actual | — | ฿60,000/person |
| ฝากครรภ์และคลอดบุตร | ฿60,000 | — | — |
| ประกันสังคม | ฿10,500 | — | Wage base cap ฿17,500 starting 2569 |
| ประกันชีวิต | ฿100,000 |
| Policy term ≥ 10 years |
| ประกันสุขภาพ | ฿25,000 |
| Combined with |
| ประกันสุขภาพบิดามารดา | ฿15,000 | — | — |
| ThaiESG / ThaiESGX | 30% of income, max ฿300,000 | — | Outside retirement cap; 5-year lock-up; 2569 is the final year at ฿300,000 |
| ประกันบำนาญ | 15% of income, max ฿200,000 |
| Combined retirement cap ฿500,000 |
| กองทุนสำรองเลี้ยงชีพ / กบข. | 15% of income, max ฿500,000 |
| Combined retirement cap ฿500,000 |
| RMF | 30% of income, max ฿500,000 |
| Hold ≥ 5 years and redeem at age 55+ |
| ดอกเบี้ยบ้าน | ฿100,000 | — | — |
| บริจาคพรรคการเมือง | ฿10,000 | — | — |
| ซื้องานศิลปะ | ฿100,000 | — | — |
| โซลาร์รูฟท็อป | ฿200,000 | — | Installed from 3 Mar 2569 with e-Tax invoice |
| บริจาคการศึกษา/โรงพยาบาลรัฐ (×2) | 10% of net after other deductions (×2) | Donation cap | Via e-Donation; allocated before general donation |
| บริจาคทั่วไป | 10% of net after other deductions (×1) | Donation cap | Via e-Donation |
Not in 2569: SSF (ended after tax year 2567) and Easy E-Receipt (not renewed for 2569) are intentionally excluded. Proposed flood-repair deductions are also excluded until enacted into law.
For full tax brackets, formulas, and official source links for every entry, see docs/tax-rules-2569.md.
How it works
flowchart LR
Chat["AI Chat Host"] -->|thai_tax_overview| Server["MCP Server (stdio)"]
Server --> Engine["Shared Tax Engine (src/engine.ts)"]
Engine -->|TaxResult + Thai summary| Chat
Chat -->|loads resource| UI["Planner UI (ui://lodyhon/planner)"]
UI -->|sliders recompute locally| Engine
UI -->|updateModelContext + sendMessage| ChatYou describe your income and deductions in chat; the model invokes
thai_tax_overview.The server runs
compute(input, rules)and returnsstructuredContent, a Thai summary, and theui://lodyhon/plannerresource URI.The host renders the single-file planner iframe and passes the result to
ui/app.ts.Dragging sliders or editing numbers calls the exact same
compute()locally inside the iframe.Clicking ส่งแผนนี้ให้ AI sends the adjusted plan (and any dropped documents) back to the model so you can keep iterating.
See docs/architecture.md for engine details, shared-cap allocation, donation ordering, and UI-to-host messaging.
Development
Requires Node.js >= 20.
npm install
npm run typecheck
npm test
npm run buildnpm run build produces:
dist/ui/app.html— single-file inlined planner UI (Vite +vite-plugin-singlefile)dist/src/main.js— compiled stdio MCP server entry point
Project structure
lodyhon/
├── assets/
│ ├── banner.svg # README hero banner (navy + teal)
│ └── logo.svg # Brand mark + wordmark
├── docs/
│ ├── architecture.md # Engine, server, UI, and data flow
│ ├── tax-rules-2569.md # Complete 2569 brackets, caps, and sources
│ └── superpowers/specs/ # Original design specification
├── src/
│ ├── rules/
│ │ ├── types.ts # TaxRules & DeductionRule interfaces
│ │ ├── 2569.ts # Tax year 2569 rules table with source URLs
│ │ └── index.ts # Year registry (DEFAULT_YEAR = 2569)
│ ├── engine.ts # Pure calculation engine (shared by server & UI)
│ ├── summary.ts # Thai plain-text summary formatter
│ ├── server.ts # MCP server (2 tools + ui://lodyhon/planner)
│ └── main.ts # Stdio entry point (bin: lodyhon-mcp)
├── ui/
│ ├── app.html # MCP App HTML shell
│ ├── app.ts # Interactive planner logic + file drop
│ ├── theme.css # Design tokens & responsive light/dark styles
│ └── DESIGN.md # UI design tokens & DOM contract
└── test/
├── engine.test.ts # Tax math, caps, brackets, ranking tests
├── summary.test.ts # Summary formatting tests
└── server.test.ts # In-memory MCP server integration testsRoadmap
v1 focuses on salaried income 40(1) for tax year 2569 over stdio. Planned follow-ups from the design spec:
Additional income types 40(2)–40(8) and mid-year ภ.ง.ด.94 comparison
Deeper receipt and 50 ทวิ parsing workflows
SME tax filing calendar
Multi-year tax rule sets (
2570+)HTTP transport alongside stdio
Contributing
Contributions are welcome — especially rule updates backed by official rd.go.th / Royal Gazette citations, engine edge-case tests, and UI refinements.
Read
CONTRIBUTING.mdfor local setup, adding tax rules with sources, and commit conventions.Participation is governed by our
CODE_OF_CONDUCT.md.To report a security issue privately, see
SECURITY.md.
Disclaimer
All figures produced by lodyhon are estimates for planning purposes only and do not constitute formal tax, legal, or investment advice. Tax laws, eligibility conditions, and AMC year-end order cut-off dates can change — always verify final filing requirements with the Revenue Department at rd.go.th.
License
Released under the MIT License. Copyright © 2026 Kontawat Wisetpaitoon.
Available Tools
2 toolsthai_tax_deduction_rulesThai tax deduction rulesA
List every Thai personal income tax deduction for a tax year with caps, shared caps, conditions, lock-up and sources.
Inputs: year.
thai_tax_overviewThai tax deduction plannerA
Thai personal income tax calculator and deduction planner (ภาษีเงินได้บุคคลธรรมดา / ลดหย่อนภาษี) for tax year 2569, salaried income 40(1). Call this FIRST, before any web search, whenever the user mentions เงินเดือน, โบนัส, ภาษี, ลดหย่อน, RMF, ThaiESG, ประกันชีวิต, ประกันสุขภาพ, ประกันสังคม, กองทุนสำรองเลี้ยงชีพ, บริจาค, ดอกเบี้ยบ้าน, or asks how much tax they owe or what else they can deduct. It has the official 2569 brackets and caps built in (with rd.go.th sources) and returns tax owed, remaining room in every deduction, what to buy first, the next-bracket drop, and opens an interactive planner the user can adjust. salary is the ANNUAL salary (monthly × 12); bonus is the annual bonus. Call with whatever you know: if the user has not given any numbers yet, call with {} and the planner opens on a step-by-step form (income → family → what to buy) for them to fill in.
Inputs: year, bonus, salary, deductions.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
thai_tax_overview is an interactive calculator/planner while thai_tax_deduction_rules is a static reference listing caps and conditions, so their purposes are mostly distinct. There is some overlap because the overview also returns remaining room per deduction, which an agent might see as duplicating the rules tool, but compute-vs-lookup separates them adequately.
Both names use a snake_case thai_tax_ prefix with descriptive noun-phrase suffixes, which is predictable and readable. Neither uses a verb_noun pattern, so there is no action-oriented convention, but the two names are internally consistent.
Two tools is on the thin side for a tax domain; much of the functionality is packed into one large interactive planner tool. It is acceptable because the reference/list tool is cleanly separated, but the surface feels minimal.
Within the narrow scope of salaried 40(1) income for tax year 2569, the surface covers calculation, planning, and deduction rules. However, there are notable gaps: only one tax year, no handling of non-salary income types (40(2)-40(8)), and no filing/withholding guidance.
Maintenance
Related MCP Connectors
Source-linked Malaysian individual and sole-proprietor tax guidance for AI agents.
Track budgets from your AI chat: envelopes, monthly limits, variance reports. All data is local.
The finance app your AI agent runs: money goals, a budget, and where you have the most to gain.
All-in-one travel planner and tracker for perpetual travelers and digital nomads, in your AI chat.
Related MCP Servers
- AlicenseBqualityBmaintenance39 tax tools for US individual taxpayers — federal/state tax calculations, credits, deductions, retirement strategies, audit risk, and tax planning. All calculations run locally, no data leaves the machine. Supports TY2024 and TY2025 (One Big Beautiful Bill Act).45302 npm16MIT
- AlicenseNot gradedqualityCmaintenanceLets AI agents create Thailand e-Tax invoices (ใบกำกับภาษี) by computing Thai VAT 7% and submitting to Leceipt for signing and filing with the Thai Revenue Department.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access Thailand tax, visa, and expat-money tools, including tax calculation, remittance checks, residency counting, and premium rule-engine queries.MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to retrieve 2027 and 2026 federal income tax brackets, standard deductions, calculated federal income tax with bracket breakdowns and year-over-year comparisons, and other tax amounts using IRS Revenue Procedure data without network calls or API keys.41MIT