Thai Legal Data API/MCP — give Claude, ChatGPT, Grok & Gemini precise Thai law (4× more accurate citations)

Thai law, as data — not prose. The new Thai Legal Data API/MCP lets you look up any มาตรา verbatim, search 39 Thai laws by meaning, find the Supreme Court decisions (ฎีกา) that interpret a specific section, and ask legal questions that are answered only from retrieved sources — with every citation machine-checked. The API never invents a case number — and it plugs straight into Claude, ChatGPT, Grok, or any assistant that speaks MCP.
What's inside
- 39 laws · 6,363 sections — the consolidated statute corpus behind OpenThai 2.0 Legal (ป.พ.พ., ป.อ., ป.วิ.พ., ป.วิ.อ., ประมวลรัษฎากร and more)
- 70,634 Supreme Court rulings with their หลักกฎหมาย (legal-principle) headnotes
- 99.7% citation-linked — go from a section straight to the case law that interprets it
- Every result links back to the official record at deka.supremecourt.or.th
We measured it: Claude gets 4× more accurate
Does giving an AI assistant real Thai legal data actually help? We benchmarked it: 25 questions from the nitibench-CCL legal QA dataset, answered by the same Claude model twice — once bare, once with the six iapp-mcp legal tools.
| Bare Claude | Claude + iapp-mcp | |
|---|---|---|
| Cites the correct มาตรา | 20% | 80% |
| Citation F1 | 0.093 | 0.380 |
4× more correct citations (claude-sonnet-5, n=25, gold-citation hit rate). Without tools, the model cites plausible neighbors — มาตรา 298 or 300 when the right answer is 299. With tools, it retrieves the real section text and cites 299 exactly. Even our strongest test model improved by 1.5× — and with the tools, every model we tested converged at ~80% accuracy.
Real-world use cases
** Lawyers — precedent research in minutes, not afternoons**
"Find ฎีกา interpreting ป.อ. 335 (11) on employees taking employer property — and where the line between theft and embezzlement falls."
Real rulings grouped by issue, each with its legal-principle headnote and a verification link.
** Law students — exam prep with exact statute text**
"Give me ป.พ.พ. section 420 verbatim, the elements of tort liability, and the landmark ฎีกา worth memorizing."
The text matches the code letter-for-letter — not an AI's misremembered version.
** In-house legal & compliance — cited answers for internal memos**
"We store customer ID-card copies without consent — which sections does that violate, and is there precedent?"
** Developers — build legal apps without building the corpus**
Call the REST endpoints (/section, /search, /deka/search, /ask) or plug the MCP into your agent — 6,363 sections and 70,634 rulings become your app's foundation with zero scraping or data maintenance.
** Everyone else — everyday legal questions**
"Someone defamed me on Facebook — which section applies and what's the limitation period?"
Answers cite real sections and precedent — solid preparation before you talk to an actual lawyer.
Connect it in one URL — no API key to paste
The new remote MCP server connects with your iApp account through OAuth — sign in once and your API key is linked automatically, never copied anywhere:
https://mcp.iapp.co.th
- Claude (claude.ai / Desktop): Settings → Connectors → Add custom connector → paste the URL → Connect
- Antigravity (Gemini): Agent panel → MCP servers → add
{ "iapp-ai": { "serverUrl": "https://mcp.iapp.co.th" } } - Claude Code:
claude mcp add --transport http iapp-ai https://mcp.iapp.co.th - Cursor / Codex / Windsurf and any MCP client: same URL — see the per-client setup guide
Then just ask in Thai: "หาฎีกาที่ตีความ ป.อ. มาตรา 335 หลังปี 2560".
Prefer the classic local install? claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- uvx iapp-mcp — all six legal tools ship in iapp-mcp 2.1.0.
Prefer REST? GET /v3/store/data/thai-legal/section?law=ประมวลกฎหมายอาญา§ion=335&with_deka=true — see the full documentation with live try-it demos.
Free during launch
All endpoints are free during the launch promotion (then 0.1 IC/request; /meta and /laws stay free forever). New accounts get 50 IC free — no credit card required.
For research use — not legal advice. Every result carries a link to the official Supreme Court record; verify there before relying on a ruling in practice.