iapp-mcp 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+
9
+ # Environments
10
+ .env
11
+ .venv/
12
+ venv/
13
+
14
+ # Tooling
15
+ .pytest_cache/
16
+ .mypy_cache/
17
+ .ruff_cache/
18
+
19
+ # OS
20
+ .DS_Store
21
+
22
+ # Internal docs (not for public repo)
23
+ ENDPOINTS.md
@@ -0,0 +1,333 @@
1
+ Metadata-Version: 2.4
2
+ Name: iapp-mcp
3
+ Version: 2.0.0
4
+ Summary: MCP server for iApp AI Marketplace APIs (https://iapp.co.th) — Thai OCR, eKYC, NLP, LLM, Speech, Image/Video Generation
5
+ Project-URL: Homepage, https://iapp.co.th
6
+ Project-URL: Documentation, https://iapp.co.th/docs/intro
7
+ Project-URL: Repository, https://github.com/iapp-technology/iapp_ai
8
+ Project-URL: API Marketplace, https://iapp.co.th
9
+ Author-email: "iApp Technology Co., Ltd." <dev@iapp.co.th>
10
+ License: MIT
11
+ Keywords: ai,ekyc,iapp,llm,mcp,nlp,ocr,speech,thai
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: httpx>=0.27.0
22
+ Requires-Dist: iapp-core[async]<0.2.0,>=0.1.0
23
+ Requires-Dist: mcp>=1.2.0
24
+ Requires-Dist: pydantic>=2.0.0
25
+ Description-Content-Type: text/markdown
26
+
27
+ # iApp AI MCP Server
28
+
29
+ [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server for the
30
+ [iApp AI Marketplace](https://iapp.co.th) — connect AI assistants like Claude to
31
+ 30+ Thai-focused AI APIs: OCR, eKYC, Thai NLP, LLMs, speech, and image/video generation.
32
+
33
+ ## Features
34
+
35
+ | Category | Tools |
36
+ |---|---|
37
+ | **eKYC** | Thai ID card OCR (front/back/photocopy), passport OCR, driver license OCR, bank book OCR, face verification, face detection, face liveness, face+ID KYC, face recognition (1:N) |
38
+ | **Document OCR** | General Thai document OCR (text/layout/DOCX), receipt, credit card statement, tax deduction certificate (50 ทวิ), civil registration certificate, resume/CV extraction + AI evaluation, job description extraction |
39
+ | **Thai NLP** | Multilingual translation (28 languages), summarization, sentiment analysis, toxicity classification, Thai QA, question generation |
40
+ | **LLM** | Chinda Thai LLM 4B (free), DeepSeek-V3.2, DeepSeek V4 (Flash/Pro), Thanoy Thai Legal AI |
41
+ | **Speech** | Speech-to-text (Thai/English/Chinese, base/pro with diarization), Thai text-to-speech (4 voices), voice cloning, AI audio watermark detection |
42
+ | **Image/Video** | Image generation (Google Nano Banana / Pro), background removal, Seedance 2.0 video generation (async submit + status) |
43
+ | **Smart City & Data** | Thai license plate recognition, power/water meter OCR, route optimization, Thai holiday data |
44
+
45
+ ## Prerequisites
46
+
47
+ - An iApp API key:
48
+ 1. Login / register at [iapp.co.th](https://iapp.co.th)
49
+ 2. Go to **API Keys** in the control panel
50
+ 3. Click **Create New API Key**, name it, and create
51
+ 4. Copy the key — it is only shown once!
52
+
53
+ ## Installation
54
+
55
+ The server is published as [`iapp-mcp` on PyPI](https://pypi.org/project/iapp-mcp/) and
56
+ [`iapp-mcp` on npm](https://www.npmjs.com/package/iapp-mcp) — use whichever package
57
+ manager you prefer:
58
+
59
+ ### Python (3.10+)
60
+
61
+ | Package manager | Run without installing | Install permanently |
62
+ |---|---|---|
63
+ | [uv](https://docs.astral.sh/uv/) | `uvx iapp-mcp` | `uv tool install iapp-mcp` |
64
+ | pip | — | `pip install iapp-mcp` |
65
+
66
+ ### Node.js (18+)
67
+
68
+ > The npm package is a thin launcher for the Python server, so
69
+ > [uv](https://docs.astral.sh/uv/getting-started/installation/) must be installed
70
+ > (one time): `curl -LsSf https://astral.sh/uv/install.sh | sh` or `brew install uv`
71
+
72
+ | Package manager | Run without installing | Install permanently |
73
+ |---|---|---|
74
+ | npm | `npx -y iapp-mcp` | `npm install -g iapp-mcp` |
75
+ | yarn | `yarn dlx iapp-mcp` | `yarn global add iapp-mcp` |
76
+ | pnpm | `pnpm dlx iapp-mcp` | `pnpm add -g iapp-mcp` |
77
+
78
+ Every "install permanently" option gives you the same `iapp-mcp` command:
79
+
80
+ ```bash
81
+ IAPP_API_KEY=YOUR_API_KEY iapp-mcp
82
+ ```
83
+
84
+ ## Configuration
85
+
86
+ ### Claude Code
87
+
88
+ Use the `claude mcp add` CLI — pick the command matching how you installed (see
89
+ above), pass your API key with `-e`, and add `--` before the launch command:
90
+
91
+ ```bash
92
+ # uv / uvx (recommended, nothing to install)
93
+ claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- uvx iapp-mcp
94
+
95
+ # npm / npx
96
+ claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- npx -y iapp-mcp
97
+
98
+ # already installed permanently (pip / uv tool / npm / yarn / pnpm)
99
+ claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- iapp-mcp
100
+ ```
101
+
102
+ - `-s user` registers it for every project (use `-s project` to check it into this
103
+ repo's `.mcp.json` and share with teammates, or `-s local` for just the current
104
+ project on this machine).
105
+ - Verify it's connected: `claude mcp list` (or `/mcp` inside a Claude Code session).
106
+ - Remove it later with `claude mcp remove iapp-mcp`.
107
+
108
+ Once added, no special syntax is needed to use it — just describe what you want in
109
+ chat (see [Usage Examples](#usage-examples) below) and Claude Code automatically
110
+ calls the right `iapp-mcp` tool.
111
+
112
+ ### Other MCP clients (Claude Desktop, Cursor, etc.)
113
+
114
+ Add the server to your MCP client's configuration file. Pick the block matching how
115
+ you installed:
116
+
117
+ **PyPI + uv (recommended):**
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "iapp-mcp": {
123
+ "command": "uvx",
124
+ "args": ["iapp-mcp"],
125
+ "env": {
126
+ "IAPP_API_KEY": "YOUR_API_KEY"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ **npm:**
134
+
135
+ ```json
136
+ {
137
+ "mcpServers": {
138
+ "iapp-mcp": {
139
+ "command": "npx",
140
+ "args": ["-y", "iapp-mcp"],
141
+ "env": {
142
+ "IAPP_API_KEY": "YOUR_API_KEY"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ **Installed permanently (pip / uv tool / npm / yarn / pnpm):**
150
+
151
+ ```json
152
+ {
153
+ "mcpServers": {
154
+ "iapp-mcp": {
155
+ "command": "iapp-mcp",
156
+ "env": {
157
+ "IAPP_API_KEY": "YOUR_API_KEY"
158
+ }
159
+ }
160
+ }
161
+ }
162
+ ```
163
+
164
+ The server runs over stdio, so any MCP client (desktop apps, IDEs, custom apps using
165
+ the MCP SDK) can launch it with any of the commands above and the `IAPP_API_KEY`
166
+ environment variable set.
167
+
168
+ ## Tools Reference
169
+
170
+ All 37 tools, what they do, and their key inputs. File inputs are **local file
171
+ paths**; generated files are saved to the `output_path` you specify.
172
+
173
+ ### 🪪 eKYC
174
+
175
+ | Tool | What it does | Key inputs |
176
+ |---|---|---|
177
+ | `iapp_thai_id_card_ocr` | Read data from a Thai national ID card photo | `file_path`, `side` (front/back) |
178
+ | `iapp_thai_id_card_photocopy_ocr` | Read a photocopied ID card + detect signature | `file_path` |
179
+ | `iapp_passport_ocr` | Read MRZ + personal data from any passport | `file_path`, `segmentation` (for skewed photos) |
180
+ | `iapp_thai_driver_license_ocr` | Read a Thai driver license | `file_path` |
181
+ | `iapp_book_bank_ocr` | Read account name/number from a bank book page | `file_path` |
182
+ | `iapp_face_verification` | Check if two face photos are the same person (1:1) | `image1_path`, `image2_path`, `threshold` |
183
+ | `iapp_face_detection` | Find face(s) + bounding boxes in a photo | `file_path`, `mode` (single/multi) |
184
+ | `iapp_face_liveness` | Detect photo-of-photo / screen spoofing | `file_path` |
185
+ | `iapp_face_id_card_kyc` | Match a selfie against the face on an ID card | `id_card_path`, `selfie_path` |
186
+ | `iapp_face_recognition` | Enroll & search faces in a company database (1:N) | `action` (add/remove/check/recognize_single/recognize_multi), `company`, `file_path`, `name`, `password` |
187
+
188
+ ### 🔍 Thai Document OCR
189
+
190
+ | Tool | What it does | Key inputs |
191
+ |---|---|---|
192
+ | `iapp_document_ocr` | OCR any Thai document | `file_path`, `mode`: `text` (raw text), `layout` (structure + bounding boxes), `docx` (convert to Word) |
193
+ | `iapp_receipt_ocr` | Extract line items & totals from Thai receipts | `file_path`, `return_ocr` |
194
+ | `iapp_credit_card_statement_ocr` | Extract transactions from card statements | `file_path`, `return_ocr` |
195
+ | `iapp_tax_deduction_certificate_ocr` | Read withholding tax certificates (50 ทวิ) | `file_path`, `return_ocr` |
196
+ | `iapp_civil_registration_ocr` | Read Thai civil registration certificates | `file_path`, `return_ocr` |
197
+ | `iapp_resume_ocr` | Extract structured data from a resume/CV + AI evaluation | `file_path` |
198
+ | `iapp_job_description_ocr` | Extract structured data from a job description | `file_path` |
199
+
200
+ ### 🤖 Large Language Model
201
+
202
+ | Tool | What it does | Key inputs |
203
+ |---|---|---|
204
+ | `iapp_llm_chat` | Chat with LLMs hosted on iApp (OpenAI-compatible) | `prompt` (or full `messages`), `model`: `chinda-qwen3-4b` (Thai, free) / `deepseek-chat` / `deepseek-reasoner` / `deepseek-v4-flash` / `deepseek-v4-pro`, `system_prompt`, `max_tokens`, `temperature` |
205
+ | `iapp_thanoy_legal_qa` | Ask Thai legal questions (Thanoy Legal AI) | `query` |
206
+
207
+ ### 🌐 Thai NLP
208
+
209
+ | Tool | What it does | Key inputs |
210
+ |---|---|---|
211
+ | `iapp_translate` | Translate between 28 languages (Thai-optimized) | `text`, `source_lang`, `target_lang` (e.g. th, en, ja, zh, ko, …) |
212
+ | `iapp_summarize` | Summarize Thai/English text | `text`, `style` (standard/clarify/friendly), `language` (th/en) |
213
+ | `iapp_sentiment_analysis` | Classify Thai text as positive/neutral/negative | `text` |
214
+ | `iapp_toxicity_classification` | Detect toxic Thai text | `text` |
215
+ | `iapp_thai_qa` | Answer a question from a given Thai document (extractive QA) | `question`, `document` |
216
+ | `iapp_question_generation` | Generate Q&A pairs from Thai text | `text` |
217
+
218
+ ### 🎙️ Speech Technology
219
+
220
+ | Tool | What it does | Key inputs |
221
+ |---|---|---|
222
+ | `iapp_speech_to_text` | Transcribe audio with speaker diarization | `file_path`, `language` (th/en/zh), `quality` (base/pro) |
223
+ | `iapp_text_to_speech` | Synthesize Thai speech and save an audio file | `text`, `output_path`, `voice` (kaitom-v3/kaitom-v2/kaitom-v1/cee), `speed` |
224
+ | `iapp_voice_clone_tts` | Speak any text in a voice cloned from a sample | `text`, `ref_audio_path`, `ref_text`, `output_path` |
225
+ | `iapp_ai_audio_detection` | Check if audio was AI-generated | `audio_path` |
226
+
227
+ ### 🖼️ Image & 🎬 Video Generation
228
+
229
+ | Tool | What it does | Key inputs |
230
+ |---|---|---|
231
+ | `iapp_image_generation` | Generate an image from text (Google Nano Banana) | `prompt`, `output_path`, `model` (nanobanana / nanobanana-pro) |
232
+ | `iapp_remove_background` | Remove the background from an image | `file_path`, `output_path` |
233
+ | `iapp_video_generation_submit` | Submit an async Seedance 2.0 video job | `prompt`, `model` (seedance/seedance-fast), `duration` (4–15 s), `ratio`, `resolution`, `generate_audio` |
234
+ | `iapp_video_generation_status` | Poll a video job and get the download URL | `task_id` |
235
+
236
+ ### ♻️ Smart City AI & 📊 Thai Data
237
+
238
+ | Tool | What it does | Key inputs |
239
+ |---|---|---|
240
+ | `iapp_license_plate_ocr` | Read Thai vehicle license plates from photos | `file_path` |
241
+ | `iapp_meter_ocr` | Read power/water meter values from photos | `file_path` |
242
+ | `iapp_route_optimization` | Optimize delivery routes for multiple drivers (≤100 stops) | `origin_address` + coordinates, `stops`, `driver_count` |
243
+ | `iapp_thai_holidays` | Look up Thai public holidays | `year`, or `start_date`+`end_date`, or nothing (around today) |
244
+
245
+ ## Usage Examples
246
+
247
+ Once connected — in Claude Code, Claude Desktop, or any other MCP client — just ask
248
+ in plain language; no special command syntax is needed:
249
+
250
+ ### 1. Electronic Know Your Customer (eKYC)
251
+
252
+ - *"อ่านข้อมูลจากบัตรประชาชนในไฟล์ idcard.jpg"* — Thai National ID Card OCR (`iapp_thai_id_card_ocr`, front/back)
253
+ - *"อ่านสำเนาบัตรประชาชนที่มีลายเซ็นในไฟล์ copy.png"* — Photocopied ID Card With Signature Detection (`iapp_thai_id_card_photocopy_ocr`)
254
+ - *"Extract the MRZ data from passport.jpg"* — Passport OCR (`iapp_passport_ocr`)
255
+ - *"อ่านข้อมูลใบขับขี่จาก license.png"* — Thai Driver License OCR (`iapp_thai_driver_license_ocr`)
256
+ - *"อ่านเลขบัญชีจากหน้าสมุดบัญชี bookbank.png"* — Thai Bank Book OCR (`iapp_book_bank_ocr`)
257
+ - *"เช็คว่ารูป selfie.jpg กับ idcard.jpg เป็นคนเดียวกันไหม"* — Face Verification (`iapp_face_verification`)
258
+ - *"หาใบหน้าทั้งหมดในรูป group.jpg"* — Face Detection (`iapp_face_detection`, single/multi)
259
+ - *"ตรวจว่ารูป face.jpg เป็นภาพถ่ายคนจริงหรือภาพปลอม"* — Face Passive Liveness / Spoofing Check (`iapp_face_liveness`)
260
+ - *"ทำ KYC: เทียบหน้าใน selfie.jpg กับรูปบนบัตรประชาชน idcard.jpg"* — Face and ID Card Verification for KYC (`iapp_face_id_card_kyc`)
261
+ - *"ลงทะเบียนใบหน้าพนักงานใหม่ แล้วลองค้นหาว่าใบหน้าในรูปนี้คือใคร"* — Face Recognition 1:N (`iapp_face_recognition`: add / recognize / check / remove)
262
+
263
+ ### 2. Large Language Model
264
+
265
+ - *"ถาม Chinda Thai LLM ว่า ส้มตำมีกี่แคลอรี่"* — Chinda Thai LLM 4B, free (`iapp_llm_chat`, model=chinda-qwen3-4b)
266
+ - *"ใช้ DeepSeek V4 Flash ช่วยจัดหมวดหมู่ข้อความลูกค้าพวกนี้"* — DeepSeek V4 Flash/Pro (`iapp_llm_chat`, model=deepseek-v4-flash / deepseek-v4-pro)
267
+ - *"ใช้ DeepSeek reasoner วิเคราะห์โจทย์คณิตข้อนี้แบบละเอียด"* — DeepSeek-V3.2 thinking/non-thinking (`iapp_llm_chat`, model=deepseek-reasoner / deepseek-chat)
268
+ - *"ถามทนอย: สัญญาเช่าบ้านไม่มีลายเซ็นพยานมีผลไหม"* — Thanoy Thai Legal AI Chatbot (`iapp_thanoy_legal_qa`)
269
+
270
+ ### 3. Image Generation
271
+
272
+ - *"สร้างรูปแมวใส่ชุดไทยนั่งริมเจ้าพระยา เซฟเป็น cat.png"* — Google Nano Banana Image Generation (`iapp_image_generation`, nanobanana / nanobanana-pro)
273
+ - *"ลบพื้นหลังออกจากรูปสินค้า product.jpg"* — Background Removal (`iapp_remove_background`)
274
+
275
+ ### 4. Thai Document OCR
276
+
277
+ - *"OCR เอกสาร contract.pdf เอาข้อความทั้งหมด"* — General Thai Document OCR, raw text (`iapp_document_ocr`, mode=text)
278
+ - *"วิเคราะห์โครงสร้างเอกสาร report.jpg เอา bounding box ด้วย"* — Document Structure Analysis + OCR (`iapp_document_ocr`, mode=layout)
279
+ - *"แปลงเอกสารสแกนนี้เป็นไฟล์ Word"* — OCR to DOCX (`iapp_document_ocr`, mode=docx)
280
+ - *"สกัดข้อมูลจาก resume.pdf แล้วประเมินความเหมาะสมกับตำแหน่ง"* — AI Resume / CV Extraction + Evaluation (`iapp_resume_ocr`)
281
+ - *"อ่านรายการใช้จ่ายจาก statement บัตรเครดิต statement.jpg"* — Thai Credit Card Statement OCR (`iapp_credit_card_statement_ocr`)
282
+ - *"สกัดข้อมูลตำแหน่งงานจากไฟล์ jd.pdf"* — Job Description OCR + Extraction (`iapp_job_description_ocr`)
283
+ - *"อ่านข้อมูลทะเบียนบ้านจาก house_reg.jpg"* — Thai Civil Registration Certificate OCR (`iapp_civil_registration_ocr`)
284
+ - *"OCR ใบเสร็จ receipt.jpg แล้วรวมยอดให้หน่อย"* — Thai Receipt OCR (`iapp_receipt_ocr`)
285
+ - *"อ่านหนังสือรับรองหักภาษี ณ ที่จ่าย (50 ทวิ) ไฟล์นี้"* — Thai Tax Deduction Certificate OCR (`iapp_tax_deduction_certificate_ocr`)
286
+
287
+ ### 5. Video Generation
288
+
289
+ - *"Generate a 5-second video of a cat surfing at sunset"* — Seedance 2.0 Video Generation (`iapp_video_generation_submit` → `iapp_video_generation_status`)
290
+
291
+ ### 6. Speech Technology
292
+
293
+ - *"ถอดเสียงไฟล์ประชุม meeting.wav พร้อมระบุว่าใครพูด"* — Thai Speech-to-Text Base/PRO with diarization (`iapp_speech_to_text`, language=th)
294
+ - *"Transcribe interview.mp3 (English audio)"* — English Speech-to-Text Base/PRO (`iapp_speech_to_text`, language=en)
295
+ - *"ถอดเสียงไฟล์เสียงภาษาจีนนี้"* — Chinese Speech-to-Text Base/PRO (`iapp_speech_to_text`, language=zh)
296
+ - *"อ่านข้อความนี้เป็นเสียงพูดด้วยเสียงไข่ต้ม เซฟเป็น speech.wav"* — Thai Text-to-Speech V1/V2/V3, Kaitom & Cee voices (`iapp_text_to_speech`)
297
+ - *"โคลนเสียงจาก ref.wav แล้วให้พูดประโยคนี้"* — Voice Cloning TTS (`iapp_voice_clone_tts`)
298
+ - *"เช็คว่าไฟล์เสียง audio.wav เป็นเสียง AI สร้างหรือเสียงคนจริง"* — AI Audio Detection (`iapp_ai_audio_detection`)
299
+
300
+ ### 7. Smart City AI
301
+
302
+ - *"จัดเส้นทางส่งของ 20 จุดนี้ให้คนขับ 3 คน เริ่มจากคลังสินค้า"* — Automatic Route Optimization (`iapp_route_optimization`)
303
+ - *"อ่านป้ายทะเบียนรถจากภาพกล้องวงจรปิด cctv.jpg"* — Thai Vehicle License Plate OCR (`iapp_license_plate_ocr`)
304
+ - *"อ่านเลขมิเตอร์น้ำ/ไฟจากรูป meter.jpg"* — Power & Water Meter OCR (`iapp_meter_ocr`)
305
+
306
+ ### 8. Thai Natural Language Processing
307
+
308
+ - *"สรุปบทความยาว ๆ นี้ให้เหลือย่อหน้าเดียว"* — Text Summarization (`iapp_summarize`)
309
+ - *"จากเอกสารนี้ ช่วยตอบคำถาม: โครงการเริ่มเมื่อไหร่"* — Thai Auto Question Answering / ThaiQA (`iapp_thai_qa`)
310
+ - *"สร้างคำถาม-คำตอบจากเนื้อหาบทเรียนนี้ไว้ทำแบบทดสอบ"* — Thai Question Generator (`iapp_question_generation`)
311
+ - *"แปลข้อความนี้เป็นภาษาญี่ปุ่น"* — Multilingual Translation, 28 languages (`iapp_translate`)
312
+ - *"วิเคราะห์ว่ารีวิวลูกค้าพวกนี้เป็นบวกหรือลบ"* — Thai Sentiment Analysis (`iapp_sentiment_analysis`)
313
+ - *"ตรวจว่าคอมเมนต์พวกนี้มีข้อความ toxic ไหม"* — Thai Text Toxicity Classification (`iapp_toxicity_classification`)
314
+
315
+ ### 9. Thai Data API
316
+
317
+ - *"วันหยุดราชการไทยปีหน้ามีวันไหนบ้าง"* — Thai Holiday Data API (`iapp_thai_holidays`)
318
+
319
+ ## Notes
320
+
321
+ - Most tools consume iApp credits (IC) per call — costs are documented in each tool description.
322
+ - File-based tools accept **local file paths**; generated audio/images are saved to the path you specify.
323
+ - Large base64 blobs in API responses (e.g. cropped face images) are truncated in tool output to keep context small.
324
+ - Seedance video generation requires a paid iApp account (any IC package purchase unlocks it).
325
+
326
+ ## Support
327
+
328
+ - Documentation: [iapp.co.th/docs/intro](https://iapp.co.th/docs/intro)
329
+ - Email: support@iapp.co.th
330
+
331
+ ## License
332
+
333
+ © iApp Technology Co., Ltd.
@@ -0,0 +1,307 @@
1
+ # iApp AI MCP Server
2
+
3
+ [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server for the
4
+ [iApp AI Marketplace](https://iapp.co.th) — connect AI assistants like Claude to
5
+ 30+ Thai-focused AI APIs: OCR, eKYC, Thai NLP, LLMs, speech, and image/video generation.
6
+
7
+ ## Features
8
+
9
+ | Category | Tools |
10
+ |---|---|
11
+ | **eKYC** | Thai ID card OCR (front/back/photocopy), passport OCR, driver license OCR, bank book OCR, face verification, face detection, face liveness, face+ID KYC, face recognition (1:N) |
12
+ | **Document OCR** | General Thai document OCR (text/layout/DOCX), receipt, credit card statement, tax deduction certificate (50 ทวิ), civil registration certificate, resume/CV extraction + AI evaluation, job description extraction |
13
+ | **Thai NLP** | Multilingual translation (28 languages), summarization, sentiment analysis, toxicity classification, Thai QA, question generation |
14
+ | **LLM** | Chinda Thai LLM 4B (free), DeepSeek-V3.2, DeepSeek V4 (Flash/Pro), Thanoy Thai Legal AI |
15
+ | **Speech** | Speech-to-text (Thai/English/Chinese, base/pro with diarization), Thai text-to-speech (4 voices), voice cloning, AI audio watermark detection |
16
+ | **Image/Video** | Image generation (Google Nano Banana / Pro), background removal, Seedance 2.0 video generation (async submit + status) |
17
+ | **Smart City & Data** | Thai license plate recognition, power/water meter OCR, route optimization, Thai holiday data |
18
+
19
+ ## Prerequisites
20
+
21
+ - An iApp API key:
22
+ 1. Login / register at [iapp.co.th](https://iapp.co.th)
23
+ 2. Go to **API Keys** in the control panel
24
+ 3. Click **Create New API Key**, name it, and create
25
+ 4. Copy the key — it is only shown once!
26
+
27
+ ## Installation
28
+
29
+ The server is published as [`iapp-mcp` on PyPI](https://pypi.org/project/iapp-mcp/) and
30
+ [`iapp-mcp` on npm](https://www.npmjs.com/package/iapp-mcp) — use whichever package
31
+ manager you prefer:
32
+
33
+ ### Python (3.10+)
34
+
35
+ | Package manager | Run without installing | Install permanently |
36
+ |---|---|---|
37
+ | [uv](https://docs.astral.sh/uv/) | `uvx iapp-mcp` | `uv tool install iapp-mcp` |
38
+ | pip | — | `pip install iapp-mcp` |
39
+
40
+ ### Node.js (18+)
41
+
42
+ > The npm package is a thin launcher for the Python server, so
43
+ > [uv](https://docs.astral.sh/uv/getting-started/installation/) must be installed
44
+ > (one time): `curl -LsSf https://astral.sh/uv/install.sh | sh` or `brew install uv`
45
+
46
+ | Package manager | Run without installing | Install permanently |
47
+ |---|---|---|
48
+ | npm | `npx -y iapp-mcp` | `npm install -g iapp-mcp` |
49
+ | yarn | `yarn dlx iapp-mcp` | `yarn global add iapp-mcp` |
50
+ | pnpm | `pnpm dlx iapp-mcp` | `pnpm add -g iapp-mcp` |
51
+
52
+ Every "install permanently" option gives you the same `iapp-mcp` command:
53
+
54
+ ```bash
55
+ IAPP_API_KEY=YOUR_API_KEY iapp-mcp
56
+ ```
57
+
58
+ ## Configuration
59
+
60
+ ### Claude Code
61
+
62
+ Use the `claude mcp add` CLI — pick the command matching how you installed (see
63
+ above), pass your API key with `-e`, and add `--` before the launch command:
64
+
65
+ ```bash
66
+ # uv / uvx (recommended, nothing to install)
67
+ claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- uvx iapp-mcp
68
+
69
+ # npm / npx
70
+ claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- npx -y iapp-mcp
71
+
72
+ # already installed permanently (pip / uv tool / npm / yarn / pnpm)
73
+ claude mcp add iapp-mcp -s user -e IAPP_API_KEY=YOUR_API_KEY -- iapp-mcp
74
+ ```
75
+
76
+ - `-s user` registers it for every project (use `-s project` to check it into this
77
+ repo's `.mcp.json` and share with teammates, or `-s local` for just the current
78
+ project on this machine).
79
+ - Verify it's connected: `claude mcp list` (or `/mcp` inside a Claude Code session).
80
+ - Remove it later with `claude mcp remove iapp-mcp`.
81
+
82
+ Once added, no special syntax is needed to use it — just describe what you want in
83
+ chat (see [Usage Examples](#usage-examples) below) and Claude Code automatically
84
+ calls the right `iapp-mcp` tool.
85
+
86
+ ### Other MCP clients (Claude Desktop, Cursor, etc.)
87
+
88
+ Add the server to your MCP client's configuration file. Pick the block matching how
89
+ you installed:
90
+
91
+ **PyPI + uv (recommended):**
92
+
93
+ ```json
94
+ {
95
+ "mcpServers": {
96
+ "iapp-mcp": {
97
+ "command": "uvx",
98
+ "args": ["iapp-mcp"],
99
+ "env": {
100
+ "IAPP_API_KEY": "YOUR_API_KEY"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ```
106
+
107
+ **npm:**
108
+
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "iapp-mcp": {
113
+ "command": "npx",
114
+ "args": ["-y", "iapp-mcp"],
115
+ "env": {
116
+ "IAPP_API_KEY": "YOUR_API_KEY"
117
+ }
118
+ }
119
+ }
120
+ }
121
+ ```
122
+
123
+ **Installed permanently (pip / uv tool / npm / yarn / pnpm):**
124
+
125
+ ```json
126
+ {
127
+ "mcpServers": {
128
+ "iapp-mcp": {
129
+ "command": "iapp-mcp",
130
+ "env": {
131
+ "IAPP_API_KEY": "YOUR_API_KEY"
132
+ }
133
+ }
134
+ }
135
+ }
136
+ ```
137
+
138
+ The server runs over stdio, so any MCP client (desktop apps, IDEs, custom apps using
139
+ the MCP SDK) can launch it with any of the commands above and the `IAPP_API_KEY`
140
+ environment variable set.
141
+
142
+ ## Tools Reference
143
+
144
+ All 37 tools, what they do, and their key inputs. File inputs are **local file
145
+ paths**; generated files are saved to the `output_path` you specify.
146
+
147
+ ### 🪪 eKYC
148
+
149
+ | Tool | What it does | Key inputs |
150
+ |---|---|---|
151
+ | `iapp_thai_id_card_ocr` | Read data from a Thai national ID card photo | `file_path`, `side` (front/back) |
152
+ | `iapp_thai_id_card_photocopy_ocr` | Read a photocopied ID card + detect signature | `file_path` |
153
+ | `iapp_passport_ocr` | Read MRZ + personal data from any passport | `file_path`, `segmentation` (for skewed photos) |
154
+ | `iapp_thai_driver_license_ocr` | Read a Thai driver license | `file_path` |
155
+ | `iapp_book_bank_ocr` | Read account name/number from a bank book page | `file_path` |
156
+ | `iapp_face_verification` | Check if two face photos are the same person (1:1) | `image1_path`, `image2_path`, `threshold` |
157
+ | `iapp_face_detection` | Find face(s) + bounding boxes in a photo | `file_path`, `mode` (single/multi) |
158
+ | `iapp_face_liveness` | Detect photo-of-photo / screen spoofing | `file_path` |
159
+ | `iapp_face_id_card_kyc` | Match a selfie against the face on an ID card | `id_card_path`, `selfie_path` |
160
+ | `iapp_face_recognition` | Enroll & search faces in a company database (1:N) | `action` (add/remove/check/recognize_single/recognize_multi), `company`, `file_path`, `name`, `password` |
161
+
162
+ ### 🔍 Thai Document OCR
163
+
164
+ | Tool | What it does | Key inputs |
165
+ |---|---|---|
166
+ | `iapp_document_ocr` | OCR any Thai document | `file_path`, `mode`: `text` (raw text), `layout` (structure + bounding boxes), `docx` (convert to Word) |
167
+ | `iapp_receipt_ocr` | Extract line items & totals from Thai receipts | `file_path`, `return_ocr` |
168
+ | `iapp_credit_card_statement_ocr` | Extract transactions from card statements | `file_path`, `return_ocr` |
169
+ | `iapp_tax_deduction_certificate_ocr` | Read withholding tax certificates (50 ทวิ) | `file_path`, `return_ocr` |
170
+ | `iapp_civil_registration_ocr` | Read Thai civil registration certificates | `file_path`, `return_ocr` |
171
+ | `iapp_resume_ocr` | Extract structured data from a resume/CV + AI evaluation | `file_path` |
172
+ | `iapp_job_description_ocr` | Extract structured data from a job description | `file_path` |
173
+
174
+ ### 🤖 Large Language Model
175
+
176
+ | Tool | What it does | Key inputs |
177
+ |---|---|---|
178
+ | `iapp_llm_chat` | Chat with LLMs hosted on iApp (OpenAI-compatible) | `prompt` (or full `messages`), `model`: `chinda-qwen3-4b` (Thai, free) / `deepseek-chat` / `deepseek-reasoner` / `deepseek-v4-flash` / `deepseek-v4-pro`, `system_prompt`, `max_tokens`, `temperature` |
179
+ | `iapp_thanoy_legal_qa` | Ask Thai legal questions (Thanoy Legal AI) | `query` |
180
+
181
+ ### 🌐 Thai NLP
182
+
183
+ | Tool | What it does | Key inputs |
184
+ |---|---|---|
185
+ | `iapp_translate` | Translate between 28 languages (Thai-optimized) | `text`, `source_lang`, `target_lang` (e.g. th, en, ja, zh, ko, …) |
186
+ | `iapp_summarize` | Summarize Thai/English text | `text`, `style` (standard/clarify/friendly), `language` (th/en) |
187
+ | `iapp_sentiment_analysis` | Classify Thai text as positive/neutral/negative | `text` |
188
+ | `iapp_toxicity_classification` | Detect toxic Thai text | `text` |
189
+ | `iapp_thai_qa` | Answer a question from a given Thai document (extractive QA) | `question`, `document` |
190
+ | `iapp_question_generation` | Generate Q&A pairs from Thai text | `text` |
191
+
192
+ ### 🎙️ Speech Technology
193
+
194
+ | Tool | What it does | Key inputs |
195
+ |---|---|---|
196
+ | `iapp_speech_to_text` | Transcribe audio with speaker diarization | `file_path`, `language` (th/en/zh), `quality` (base/pro) |
197
+ | `iapp_text_to_speech` | Synthesize Thai speech and save an audio file | `text`, `output_path`, `voice` (kaitom-v3/kaitom-v2/kaitom-v1/cee), `speed` |
198
+ | `iapp_voice_clone_tts` | Speak any text in a voice cloned from a sample | `text`, `ref_audio_path`, `ref_text`, `output_path` |
199
+ | `iapp_ai_audio_detection` | Check if audio was AI-generated | `audio_path` |
200
+
201
+ ### 🖼️ Image & 🎬 Video Generation
202
+
203
+ | Tool | What it does | Key inputs |
204
+ |---|---|---|
205
+ | `iapp_image_generation` | Generate an image from text (Google Nano Banana) | `prompt`, `output_path`, `model` (nanobanana / nanobanana-pro) |
206
+ | `iapp_remove_background` | Remove the background from an image | `file_path`, `output_path` |
207
+ | `iapp_video_generation_submit` | Submit an async Seedance 2.0 video job | `prompt`, `model` (seedance/seedance-fast), `duration` (4–15 s), `ratio`, `resolution`, `generate_audio` |
208
+ | `iapp_video_generation_status` | Poll a video job and get the download URL | `task_id` |
209
+
210
+ ### ♻️ Smart City AI & 📊 Thai Data
211
+
212
+ | Tool | What it does | Key inputs |
213
+ |---|---|---|
214
+ | `iapp_license_plate_ocr` | Read Thai vehicle license plates from photos | `file_path` |
215
+ | `iapp_meter_ocr` | Read power/water meter values from photos | `file_path` |
216
+ | `iapp_route_optimization` | Optimize delivery routes for multiple drivers (≤100 stops) | `origin_address` + coordinates, `stops`, `driver_count` |
217
+ | `iapp_thai_holidays` | Look up Thai public holidays | `year`, or `start_date`+`end_date`, or nothing (around today) |
218
+
219
+ ## Usage Examples
220
+
221
+ Once connected — in Claude Code, Claude Desktop, or any other MCP client — just ask
222
+ in plain language; no special command syntax is needed:
223
+
224
+ ### 1. Electronic Know Your Customer (eKYC)
225
+
226
+ - *"อ่านข้อมูลจากบัตรประชาชนในไฟล์ idcard.jpg"* — Thai National ID Card OCR (`iapp_thai_id_card_ocr`, front/back)
227
+ - *"อ่านสำเนาบัตรประชาชนที่มีลายเซ็นในไฟล์ copy.png"* — Photocopied ID Card With Signature Detection (`iapp_thai_id_card_photocopy_ocr`)
228
+ - *"Extract the MRZ data from passport.jpg"* — Passport OCR (`iapp_passport_ocr`)
229
+ - *"อ่านข้อมูลใบขับขี่จาก license.png"* — Thai Driver License OCR (`iapp_thai_driver_license_ocr`)
230
+ - *"อ่านเลขบัญชีจากหน้าสมุดบัญชี bookbank.png"* — Thai Bank Book OCR (`iapp_book_bank_ocr`)
231
+ - *"เช็คว่ารูป selfie.jpg กับ idcard.jpg เป็นคนเดียวกันไหม"* — Face Verification (`iapp_face_verification`)
232
+ - *"หาใบหน้าทั้งหมดในรูป group.jpg"* — Face Detection (`iapp_face_detection`, single/multi)
233
+ - *"ตรวจว่ารูป face.jpg เป็นภาพถ่ายคนจริงหรือภาพปลอม"* — Face Passive Liveness / Spoofing Check (`iapp_face_liveness`)
234
+ - *"ทำ KYC: เทียบหน้าใน selfie.jpg กับรูปบนบัตรประชาชน idcard.jpg"* — Face and ID Card Verification for KYC (`iapp_face_id_card_kyc`)
235
+ - *"ลงทะเบียนใบหน้าพนักงานใหม่ แล้วลองค้นหาว่าใบหน้าในรูปนี้คือใคร"* — Face Recognition 1:N (`iapp_face_recognition`: add / recognize / check / remove)
236
+
237
+ ### 2. Large Language Model
238
+
239
+ - *"ถาม Chinda Thai LLM ว่า ส้มตำมีกี่แคลอรี่"* — Chinda Thai LLM 4B, free (`iapp_llm_chat`, model=chinda-qwen3-4b)
240
+ - *"ใช้ DeepSeek V4 Flash ช่วยจัดหมวดหมู่ข้อความลูกค้าพวกนี้"* — DeepSeek V4 Flash/Pro (`iapp_llm_chat`, model=deepseek-v4-flash / deepseek-v4-pro)
241
+ - *"ใช้ DeepSeek reasoner วิเคราะห์โจทย์คณิตข้อนี้แบบละเอียด"* — DeepSeek-V3.2 thinking/non-thinking (`iapp_llm_chat`, model=deepseek-reasoner / deepseek-chat)
242
+ - *"ถามทนอย: สัญญาเช่าบ้านไม่มีลายเซ็นพยานมีผลไหม"* — Thanoy Thai Legal AI Chatbot (`iapp_thanoy_legal_qa`)
243
+
244
+ ### 3. Image Generation
245
+
246
+ - *"สร้างรูปแมวใส่ชุดไทยนั่งริมเจ้าพระยา เซฟเป็น cat.png"* — Google Nano Banana Image Generation (`iapp_image_generation`, nanobanana / nanobanana-pro)
247
+ - *"ลบพื้นหลังออกจากรูปสินค้า product.jpg"* — Background Removal (`iapp_remove_background`)
248
+
249
+ ### 4. Thai Document OCR
250
+
251
+ - *"OCR เอกสาร contract.pdf เอาข้อความทั้งหมด"* — General Thai Document OCR, raw text (`iapp_document_ocr`, mode=text)
252
+ - *"วิเคราะห์โครงสร้างเอกสาร report.jpg เอา bounding box ด้วย"* — Document Structure Analysis + OCR (`iapp_document_ocr`, mode=layout)
253
+ - *"แปลงเอกสารสแกนนี้เป็นไฟล์ Word"* — OCR to DOCX (`iapp_document_ocr`, mode=docx)
254
+ - *"สกัดข้อมูลจาก resume.pdf แล้วประเมินความเหมาะสมกับตำแหน่ง"* — AI Resume / CV Extraction + Evaluation (`iapp_resume_ocr`)
255
+ - *"อ่านรายการใช้จ่ายจาก statement บัตรเครดิต statement.jpg"* — Thai Credit Card Statement OCR (`iapp_credit_card_statement_ocr`)
256
+ - *"สกัดข้อมูลตำแหน่งงานจากไฟล์ jd.pdf"* — Job Description OCR + Extraction (`iapp_job_description_ocr`)
257
+ - *"อ่านข้อมูลทะเบียนบ้านจาก house_reg.jpg"* — Thai Civil Registration Certificate OCR (`iapp_civil_registration_ocr`)
258
+ - *"OCR ใบเสร็จ receipt.jpg แล้วรวมยอดให้หน่อย"* — Thai Receipt OCR (`iapp_receipt_ocr`)
259
+ - *"อ่านหนังสือรับรองหักภาษี ณ ที่จ่าย (50 ทวิ) ไฟล์นี้"* — Thai Tax Deduction Certificate OCR (`iapp_tax_deduction_certificate_ocr`)
260
+
261
+ ### 5. Video Generation
262
+
263
+ - *"Generate a 5-second video of a cat surfing at sunset"* — Seedance 2.0 Video Generation (`iapp_video_generation_submit` → `iapp_video_generation_status`)
264
+
265
+ ### 6. Speech Technology
266
+
267
+ - *"ถอดเสียงไฟล์ประชุม meeting.wav พร้อมระบุว่าใครพูด"* — Thai Speech-to-Text Base/PRO with diarization (`iapp_speech_to_text`, language=th)
268
+ - *"Transcribe interview.mp3 (English audio)"* — English Speech-to-Text Base/PRO (`iapp_speech_to_text`, language=en)
269
+ - *"ถอดเสียงไฟล์เสียงภาษาจีนนี้"* — Chinese Speech-to-Text Base/PRO (`iapp_speech_to_text`, language=zh)
270
+ - *"อ่านข้อความนี้เป็นเสียงพูดด้วยเสียงไข่ต้ม เซฟเป็น speech.wav"* — Thai Text-to-Speech V1/V2/V3, Kaitom & Cee voices (`iapp_text_to_speech`)
271
+ - *"โคลนเสียงจาก ref.wav แล้วให้พูดประโยคนี้"* — Voice Cloning TTS (`iapp_voice_clone_tts`)
272
+ - *"เช็คว่าไฟล์เสียง audio.wav เป็นเสียง AI สร้างหรือเสียงคนจริง"* — AI Audio Detection (`iapp_ai_audio_detection`)
273
+
274
+ ### 7. Smart City AI
275
+
276
+ - *"จัดเส้นทางส่งของ 20 จุดนี้ให้คนขับ 3 คน เริ่มจากคลังสินค้า"* — Automatic Route Optimization (`iapp_route_optimization`)
277
+ - *"อ่านป้ายทะเบียนรถจากภาพกล้องวงจรปิด cctv.jpg"* — Thai Vehicle License Plate OCR (`iapp_license_plate_ocr`)
278
+ - *"อ่านเลขมิเตอร์น้ำ/ไฟจากรูป meter.jpg"* — Power & Water Meter OCR (`iapp_meter_ocr`)
279
+
280
+ ### 8. Thai Natural Language Processing
281
+
282
+ - *"สรุปบทความยาว ๆ นี้ให้เหลือย่อหน้าเดียว"* — Text Summarization (`iapp_summarize`)
283
+ - *"จากเอกสารนี้ ช่วยตอบคำถาม: โครงการเริ่มเมื่อไหร่"* — Thai Auto Question Answering / ThaiQA (`iapp_thai_qa`)
284
+ - *"สร้างคำถาม-คำตอบจากเนื้อหาบทเรียนนี้ไว้ทำแบบทดสอบ"* — Thai Question Generator (`iapp_question_generation`)
285
+ - *"แปลข้อความนี้เป็นภาษาญี่ปุ่น"* — Multilingual Translation, 28 languages (`iapp_translate`)
286
+ - *"วิเคราะห์ว่ารีวิวลูกค้าพวกนี้เป็นบวกหรือลบ"* — Thai Sentiment Analysis (`iapp_sentiment_analysis`)
287
+ - *"ตรวจว่าคอมเมนต์พวกนี้มีข้อความ toxic ไหม"* — Thai Text Toxicity Classification (`iapp_toxicity_classification`)
288
+
289
+ ### 9. Thai Data API
290
+
291
+ - *"วันหยุดราชการไทยปีหน้ามีวันไหนบ้าง"* — Thai Holiday Data API (`iapp_thai_holidays`)
292
+
293
+ ## Notes
294
+
295
+ - Most tools consume iApp credits (IC) per call — costs are documented in each tool description.
296
+ - File-based tools accept **local file paths**; generated audio/images are saved to the path you specify.
297
+ - Large base64 blobs in API responses (e.g. cropped face images) are truncated in tool output to keep context small.
298
+ - Seedance video generation requires a paid iApp account (any IC package purchase unlocks it).
299
+
300
+ ## Support
301
+
302
+ - Documentation: [iapp.co.th/docs/intro](https://iapp.co.th/docs/intro)
303
+ - Email: support@iapp.co.th
304
+
305
+ ## License
306
+
307
+ © iApp Technology Co., Ltd.