Skip to main content
Glama
thailand-data-mcp

thailand-data-mcp

by narinthon-so

thailand-data-mcp-server

MCP server exposing Thailand data tools for AI agents: official company-registry lookups, Thai address normalization, public holidays, and VAT/withholding-tax reference.

Tools

Tool

What it does

thai_company_lookup

Official DBD registry profile by 13-digit juristic ID: TH/EN name, type, status, registration date, registered/paid-up capital, business objective, registered address. Live data, cached 24h.

thai_address_normalize

Free-text Thai address (TH/EN) → structured province/district/subdistrict/postcode with official codes, confidence level, ambiguity candidates, and street-part extraction. Fully offline.

thai_list_provinces

Canonical list of all 77 provinces, bilingual, with codes.

thai_holidays

Thai public holidays (2025–2026) with lunar-holiday flags.

thai_vat_reference

VAT rate/threshold/filing + common WHT rates and the 50 ทวิ certificate rule. Reference only, not tax advice.

Related MCP server: eu-company-mcp-server

Install & run

pnpm install
pnpm build
node dist/index.js            # stdio (default)
TRANSPORT=http PORT=3000 node dist/index.js   # streamable HTTP at /mcp (binds 127.0.0.1)

Claude Code registration:

claude mcp add thailand-data -- node /path/to/thailand-data-mcp/dist/index.js

No API keys required.

Example

thai_company_lookup {"juristic_id": "0107536000315"}
→ KASIKORNBANK PUBLIC COMPANY LIMITED | บริษัทมหาชนจำกัด | ยังดำเนินกิจการอยู่ | capital 30,246,820,970 THB | ...

thai_address_normalize {"address": "เลขที่ 5 ซอยสุขุมวิท 39 แขวงคลองตันเหนือ เขตวัฒนา กรุงเทพฯ"}
→ province กรุงเทพมหานคร / district วัฒนา / subdistrict คลองตันเหนือ / 10110 | confidence: high | street: "เลขที่ 5 ซอยสุขุมวิท 39"

Data sources & licenses

  • Company registry: DBD Open Data openapi.dbd.go.th — used under the DGA Open Government License, which requires source attribution; every response therefore carries an attribution field. Do not strip it.

  • Geography: thailand-geography-data/thailand-geography-json (MIT) — bundled in data/.

  • Holidays / VAT: bundled reference data; verify critical values against official announcements (Royal Gazette, Revenue Department, Bank of Thailand).

Behavior notes

  • DBD lookups are cached in-memory for 24h (registry data changes slowly; also keeps request rates polite toward the WAF-fronted upstream).

  • The DBD API mislabels JSON responses as text/html; the client parses bodies regardless.

  • HTTP 403/429 from upstream = WAF/rate-limit → the tool returns a retry-later error, not a fabricated "not found".

  • "Not found" is only reported on the registry's explicit 1004 No data available status.

Development

pnpm dev    # tsx watch

Stack: TypeScript, @modelcontextprotocol/sdk, Zod. No runtime dependencies beyond the SDK.

Available Tools

5 tools
thai_address_normalizeNormalize Thai AddressA
Read-onlyIdempotent

Parse free-text Thai addresses (Thai or English) into the official administrative hierarchy: province (จังหวัด) → district (อำเภอ/เขต) → subdistrict (ตำบล/แขวง) → postal code, with bilingual names and official codes.

Handles common written forms: abbreviations (ต./อ./จ., กทม.), Bangkok's แขวง/เขต terminology, missing components, and postcode-only inputs. Matching is dictionary-based against the complete official geography (77 provinces, 928 districts, 7,436 subdistricts).

Args:

  • address (string): free-text address, 2-500 chars

Returns structured JSON: { "province": { "code": number, "nameTh": string, "nameEn": string } | null, "district": { ... } | null, "subdistrict": { ... } | null, "postalCode": number | null, "confidence": "high" | "medium" | "low" | "ambiguous" | "none", "streetHint": string | null, // residual text after removing administrative parts (house no., road, soi) "warnings": string[], // e.g. postcode/subdistrict mismatch "candidates": [...] // present when confidence = "ambiguous"; add district/postcode and retry }

Examples:

  • Use when: filling a shipping form from a customer's pasted address

  • Use when: validating that district/province/postcode in a record are consistent

  • Use when: deduplicating customer records with differently-written addresses

  • Don't use when: you need geocoding to lat/long (not provided)

Error handling: confidence "none" means nothing matched — the text may not be a Thai address.

Inputs: address (required).

thai_company_lookupThai Company Registry LookupA
Read-onlyIdempotent

Look up a Thai company (juristic person) in the official DBD (Department of Business Development) registry by its 13-digit registration number.

Returns the official registry profile: Thai/English name, entity type, operating status, registration date, registered and paid-up capital (THB), business objective (bilingual, with TSIC-style code), and registered head-office address.

Args:

  • juristic_id (string): exactly 13 digits, e.g. "0107536000315"

Returns structured JSON: { "found": boolean, "company": { "juristicId": string, "nameTh": string, "nameEn": string, "type": string, // e.g. "บริษัทจำกัด" (Co., Ltd.), "บริษัทมหาชนจำกัด" (PCL) "status": string, // e.g. "ยังดำเนินกิจการอยู่" = still operating "registerDate": string, // YYYYMMDD "registeredCapitalBaht": number, "paidUpCapitalBaht": number, "objective": { "code": string, "textTh": string, "textEn": string }, "address": { ... } } | null, "fromCache": boolean, "attribution": string }

Examples:

  • Use when: verifying a Thai supplier/counterparty exists and is still operating (KYB / due diligence)

  • Use when: fetching official registered capital or address for a contract

  • Don't use when: you only have a company NAME — this tool requires the 13-digit ID (ask the counterparty or check their invoice/website footer)

Notes:

  • "found": false means the ID is not in the registry — it may be mistyped, or the entity may be a sole proprietor (not a juristic person).

  • Data is the live official registry, cached for 24h.

Inputs: juristic_id (required).

thai_holidaysThai Public HolidaysA
Read-onlyIdempotent

List Thai public holidays for a given year (2025, 2026), with dates, Thai/English names, and a flag for lunar-calendar holidays.

Args:

  • year (number): one of 2025, 2026

Returns structured JSON: { "year": number, "count": number, "holidays": [{ "date": "YYYY-MM-DD", "nameEn": string, "nameTh": string, "lunar": boolean }], "disclaimer": string }

Use when scheduling anything in Thailand: payment due dates, meeting planning, delivery estimates, contract deadlines. Lunar holidays (lunar: true) are fixed by annual announcement — verify for critical deadlines. Bank holidays can differ slightly from public holidays (Bank of Thailand publishes its own list).

Inputs: year (required).

thai_list_provincesList Thai ProvincesA
Read-onlyIdempotent

List all 77 Thai provinces with official codes and bilingual names.

Returns structured JSON: { "count": 77, "provinces": [{ "code": number, "nameTh": string, "nameEn": string }] }

Use when you need the canonical province list for validation, dropdowns, or mapping Thai/English province spellings.

Inputs: no named parameters.

thai_vat_referenceThai VAT & Withholding Tax ReferenceA
Read-onlyIdempotent

Reference card for Thai VAT and withholding tax (WHT) basics: standard VAT rate, registration threshold, filing forms and deadlines, and common WHT rates by payment category (services, rent, advertising, transport, dividends, etc.).

No arguments.

Returns structured JSON with "vat", "withholdingTax" (rates table + certificate requirement), and "disclaimers".

Use when: computing invoice amounts involving Thai WHT deduction, checking whether a business must register for VAT, or explaining the 50 ทวิ withholding certificate. Reference only — NOT tax advice; verify with the Revenue Department for filings.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a unique domain: address parsing, company lookup, holidays, province list, and VAT reference. No two tools overlap in purpose, making selection unambiguous for an agent.

    Naming Consistency5/5

    All tool names follow the snake_case pattern 'thai_<verb>_<noun>', starting with 'thai_' and using consistent verb conventions (normalize, lookup, list, reference). No mixed styles or cryptic names.

    Tool Count5/5

    With 5 tools, the server is well-scoped for Thailand-specific data queries. Each tool covers a distinct need without being too few for practical use or too many to navigate.

    Completeness4/5

    The tool set covers major data needs: addresses, companies, holidays, provinces, and tax info. Minor gaps exist, like geocoding or individual district lists, but these are not essential for the core purpose.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      MCP server for Nordic company registries. Verify companies, check board members, signing authority, and financial data across Norway, Denmark, Finland, and Sweden using official public APIs. 23 tools covering search, details, roles, and batch lookups.
      19
      14
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for EU company and business data. 9 tools: company search (GLEIF, 2M+ entities), LEI lookup, corporate structures (parent/subsidiaries), trade register search, EU VAT validation (VIES), GDP, unemployment, inflation, and business demography (Eurostat). All APIs free, no keys required.
      9
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An offline MCP server offering Thai-specific utilities for AI agents, including ID validation, baht text conversion, date handling, VAT calculation, phone formatting, and province lookup.
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for ThaiBulkSMS and ThaiBulkMail APIs, enabling SMS, email, credit check, and OTP operations through natural language.
      8
      10 npm
      MIT

    Appeared in Searches