Tripitaka MCP
MCP server for the full Pāli Tipiṭaka — ~444,000 segments at parity with SuttaCentral (Sutta + Vinaya + Abhidhamma).
What it can do
- Search By Keyword: ค้นหาข้อความในพระไตรปิฎกด้วย keyword ค้นหาแบบ trigram (word similarity) บนภาษาที่เปิดใช้งานในเซิร์ฟเวอร์. สามารถกรองผลลัพธ์ตามปิฎกและฉบับแปลได้. 💡 **คำแนะนำสำหรับ AI client:** Cano
- Get Sutta: ดึงเนื้อหาสูตร/กัณฑ์ตาม ID — return เนื้อหาเต็มทุก segment ใช้รหัสมาตรฐาน SuttaCentral เช่น: - `mn1` = มัชฌิมนิกาย สูตรที่ 1 (Mūlapariyāyasutta — มูลปริยายสูตร, 334 segments) - `dn22` = ทีฆ
- Search Semantic: ค้นหาแบบ semantic — ค้นหาตามความหมาย ไม่จำเป็นต้องตรงคำ ใช้ vector similarity search (cosine distance) บน `text_pali` ที่ embed ด้วย multilingual MiniLM model. 🤔 **ส่วนใหญ่คุณควรใช้
What data it sees
Do you need an account
No: the server works without sign-in
MCP server for the full Pāli Tipiṭaka — ~444,000 segments at parity with SuttaCentral (Sutta + Vinaya + Abhidhamma). Hybrid search, full-sutta fetch with cross-references, segment-aligned translation comparison, and Pāli word lookup. Offered as Dhamma Dāna.
How to connect
How to connect Tripitaka MCP to Claude
The server address to paste into Claude settings:
https://tripitaka-mcp--dhamma-seeker.run.tools
- Open Claude (claude.ai or the desktop app).
- Go to Settings → Connectors.
- Click Add custom connector.
- Paste the server address copied below into Remote MCP server URL and click Add.
- In a chat, click + → Connectors and switch the new connector on.
Custom connectors are available on Free, Pro, Max, Team and Enterprise plans (Free is limited to one). On Team and Enterprise an organization Owner adds the connector first under Organization settings → Connectors.
Authorization
After you click Add, a sign-in window for the service opens. Sign in with your own account and approve access. Claude never sees your password.
How to connect Tripitaka MCP to ChatGPT
The server address to paste into ChatGPT settings:
https://tripitaka-mcp--dhamma-seeker.run.tools
- Open ChatGPT in a browser (chatgpt.com). A Plus, Pro, Business, Enterprise or Edu plan is required.
- Turn on developer mode once: Settings → Apps → Advanced settings → Developer mode.
- Open Settings → Connectors and click Create.
- Fill in the form: Name (anything), Description (one line about what the service does), MCP server URL (copy it below).
- Under Authentication choose OAuth if the service requires sign-in, otherwise None. Click Create.
- In a new chat open + → Apps/Connectors and enable the connector.
OpenAI has renamed this section before (Connectors → Apps/Plugins). If the label differs, search settings for "developer mode". On Business/Enterprise workspaces an admin must allow custom connectors first.
Authorization
On first use ChatGPT opens the service's sign-in window. Sign in and approve access.
How to connect Tripitaka MCP to Cursor
The server address to paste into Cursor settings:
https://tripitaka-mcp--dhamma-seeker.run.tools
Fastest: click Open in Cursor below and confirm the prompt.
Manually:
- In Cursor open Settings → Cursor Settings → MCP and click Add new global MCP server.
- Paste the JSON copied below into
~/.cursor/mcp.json(per project:.cursor/mcp.jsonin the repo root). - Save the file. The server appears in the MCP list; authorize it there if asked.
Authorization
If the service needs sign-in, an authorize button appears next to the server in the MCP list.
Server tool list (10)
Raw names from tools/list. Only developers need these.
| search_by_keyword | ค้นหาข้อความในพระไตรปิฎกด้วย keyword ค้นหาแบบ trigram (word similarity) บนภาษาที่เปิดใช้งานในเซิร์ฟเวอร์. สามารถกรองผลลัพธ์ตามปิฎกและฉบับแปลได้. 💡 **คำแนะนำสำหรับ AI client:** Canonical reference ของระบบคือบาลีโรมัน (จาก SuttaCentral). ถ้า user ถามเป็นภาษาที่ปิด (หรือไม่อยู่ใน supported set) ให้แปล keyword เป็น บาลีโรมัน (preferred) หรืออังกฤษก่อนเรียก tool นี้ — เช่น "ทุกข์" → "dukkha", "อานาปานสติ" → "ānāpānassati". ดูภาษาที่ใช้ได้ใน server instructions ด้านบน. 🔍 **เลือก tool ค้นหาให้เหมาะกับงาน:** - **หาคำเป๊ะ (term lookup)** — เช่น "appearances of `ānāpānassati`": ใช้ tool นี้ ดี เพราะ trigram match ตรงคำสุด - **หา "เนื้อหาเรื่อง X" (concept search)** — เช่น "discourses about mindfulness of breathing": **ใช้ `search_hybrid` แทน** เพราะ canonical Pāli มีลักษณะที่ keyword search หา concept ได้ไม่ครบ: • คำสำคัญในชื่อหมวด (`Ānāpānapabba`) ไม่ได้อยู่ในเนื้อหาคำสอน ที่ใช้ verb อื่น (`assasati`, `passasati`, `dīghaṁ`, `rassaṁ`) — เช่น DN22 Ānāpānapabba มี 16 segments แต่คำว่า `ānāpāna` ปรากฏแค่ 2 ที่ (header + footer) — เนื้อหาจริงจะหาไม่เจอ • Stock phrases (เช่น `So satova assasati, satova passasati`) ปรากฏซ้ำใน 10+ สูตร — keyword จะ rank ผลกว้าง ไม่ชี้สูตรเฉพาะ - **ค้นทั่วไปจาก keyword เดียว** — ใช้ `limit≥30` แล้วกรองเอง หรือเรียกหลายคำที่เกี่ยวข้อง (root verb + noun + compound) |
| get_sutta | ดึงเนื้อหาสูตร/กัณฑ์ตาม ID — return เนื้อหาเต็มทุก segment ใช้รหัสมาตรฐาน SuttaCentral เช่น: - `mn1` = มัชฌิมนิกาย สูตรที่ 1 (Mūlapariyāyasutta — มูลปริยายสูตร, 334 segments) - `dn22` = ทีฆนิกาย สูตรที่ 22 (Mahāsatipaṭṭhānasutta — มหาสติปัฏฐาน, 454 segments) - `dn16` = ทีฆนิกาย สูตรที่ 16 (Mahāparinibbānasutta — สูตรยาวที่สุด 1,664 segments) - `sn56.11` = สังยุตต์ 56.11 (Dhammacakkappavattana — ธัมมจักกัปปวัตตนะ) - `mn62` = มัชฌิมนิกาย 62 (Mahārāhulovāda — สอนพระราหุล) - `dhp1-20` = Dhammapada verses 1-20 (KN ใช้ range format) - `mil3.1.1` = Milindapañha 3.1.1 (paracanonical, 3-4 level id) 💡 **คำแนะนำสำหรับ AI client:** - **Quote text_pali / text_english โดยตรงจาก segment** — อย่าดึงจาก training memory. ระบบ verify ได้, AI หลายครั้งจำผิดได้ - Segment สั้นๆ ลงท้ายด้วย `:0.1` หรือ `:0.2` มักเป็น **header** (ชื่อ นิกาย/สูตร) ไม่ใช่เนื้อหา teaching จริง — เริ่ม content จาก `:1.1` - Segment ที่ลงท้ายด้วย "...niṭṭhitaṁ" (เช่น `mn1:194.10` = "Mūlapariyāyasuttaṁ niṭṐhitaṁ paṭhamaṁ") เป็น **colophon** ปิดสูตร - Segments ที่มี `…pe…` (peyyāla = เปยยาล) คือ **abbreviated repetition** ไม่ใช่ข้อมูลขาดหาย — ตำราบาลีย่อด้วยวิธีนี้ - response มี `cross_reference` field — render เป็น markdown clickable ใน reply เพื่อให้ user verify ต้นฉบับได้ ✅ **Coverage (v1.1+):** ครบ 3 ปิฎก เทียบเท่า SuttaCentral bilara-data - Sutta Piṭaka (DN/MN/SN/AN/KN): ✅ ครบ Pāli + Sujato EN (5,791 sections) - Vinaya Piṭaka: ✅ ครบ Pāli + Brahmali EN — ใช้ SC codes เช่น `pli-tv-bu-vb-pj1` (ปาราชิก ๑), `pli-tv-bi-vb-pj1` (ภิกขุนี), `pli-tv-kd1` (มหาวรรค), `pli-tv-pvr10` (ปริวาร), `pli-tv-bu-pm` (ภิกขุปาฏิโมกข์) - Abhidhamma Piṭaka: ✅ ครบ 7 books (ds, vb, dt, pp, kv, ya, patthana) — Pāli only (bilara ไม่มี EN ทุก translator) |
| search_semantic | ค้นหาแบบ semantic — ค้นหาตามความหมาย ไม่จำเป็นต้องตรงคำ ใช้ vector similarity search (cosine distance) บน `text_pali` ที่ embed ด้วย multilingual MiniLM model. 🤔 **ส่วนใหญ่คุณควรใช้ `search_hybrid` แทน** — มันรวม semantic นี้กับ keyword search แล้ว ranking ดีกว่า. ใช้ tool นี้เฉพาะเมื่อ: - ต้องการ pure semantic (ไม่ต้องการ keyword influence) - อยาก tune `threshold` ละเอียด (hybrid ใช้ RRF ปรับยาก) - debug ดูว่า semantic จับอะไรได้บ้างเทียบกับ keyword ⚠️ ข้อจำกัดที่ทราบ: - Index = บาลีเท่านั้น (English/Thai ใช้ได้แต่ผ่าน multilingual embedding ที่ไม่ได้ tune บน Pāli) - English query มัก embed ดีกว่าไทย (model tune EN เป็นหลัก) - คำเฉพาะตัว (`appamāda`, `dukkha`) ที่ค้นแบบ exact ดีกว่า → ใช้ `search_by_keyword` - Stock phrases บาลีปรากฏในหลายสูตร → similarity score กระจัดกระจาย, อ่าน top 10 อย่ายึดแค่ rank 1 |
| search_hybrid | ค้นหาแบบผสมผสาน (Hybrid Search) — รวมพลัง Keyword + Semantic ใช้เทคนิค RRF (Reciprocal Rank Fusion) เพื่อนำผลลัพธ์จาก การค้นหาคำตรงๆ มารวมกับผลลัพธ์จากการค้นหาความหมาย — **เป็น tool ที่แนะนำสำหรับ "หาเนื้อหาเรื่อง X"** เพราะ semantic ช่วย จับสูตรที่พูดถึง concept เดียวกันแม้ใช้คำต่างกัน (เช่น คำสอน อานาปานสติบางสูตรใช้ `assasati/passasati/dīghaṁ` แทน `ānāpānassati`). 💡 **คำแนะนำสำหรับ AI client:** - Query ภาษาอังกฤษมักได้ผลดี (เช่น `mindfulness of breathing`) เพราะ embedding model เป็น multilingual แต่ tuned สำหรับ EN เป็นหลัก - Stop word ภาษาไทยอ่อน — ถ้า query ไทยไม่ได้ผลดี ให้ AI client แปลเป็นบาลี/อังกฤษก่อน (ดู server instructions) - default `limit=5` มักน้อยเกินสำหรับ topic survey — ถ้าต้องการ coverage ดี ใช้ `limit=15-20` (max 20) - Ranking ตาม similarity ไม่ใช่ canonical importance — สูตรหลัก (locus classicus) เช่น MN118, DN22 อาจ rank ต่ำกว่าสูตรเล็ก ถ้าสูตรเล็กมีคำเป๊ะกว่า. ใช้ผลลัพธ์เป็น "starting point" แล้วต่อด้วย `get_sutta` สำหรับสูตรเฉพาะที่เป็น canonical reference |
| list_structure | แสดงโครงสร้างพระไตรปิฎกทั้ง 3 ปิฎก พร้อมสถิติ coverage 💡 **ใช้ tool นี้เมื่อ:** - User ถามภาพรวมพระไตรปิฎก (มีอะไรบ้าง / นิกายอะไร) - ตรวจ coverage ก่อนสัญญาว่าจะค้นได้ — ดู segment_count > 0 เป็นตัว ตัดสินว่า sub-collection นั้นโหลดแล้ว - Verify scope สำหรับการ compile artifact 📊 **State ปัจจุบัน v1.1+ (เทียบเท่า SuttaCentral bilara-data):** - **Sutta Piṭaka** ครบ: DN 37, MN 155, SN 1,829, AN 1,419, KN 2,351 sections (~284,702 segments รวม) — Pāli + Sujato EN - **Vinaya Piṭaka** ครบ: Bhikkhu Vibhaṅga 222, Bhikkhunī Vibhaṅga 127, Khandhaka 22, Parivāra 51 + Pātimokkha 2 (~71,557 segs) — Pāli + Brahmali EN - **Abhidhamma Piṭaka** ครบ: 7 books (ds, vb, dt, pp, kv, ya, patthana) ~88,414 segs — Pāli only (bilara ไม่มี EN ทุก translator) - **รวม ~444,673 segments** ใน DB ⚠️ **Quirks ที่ยังอยู่:** - Schema มี duplicate codes legacy + SC modern ใช้ co-exist: - Vinaya: `vin-v/vin-m/vin-c/vin-p` (legacy, segment_count = 0) คู่กับ `pli-tv-bu-vb/pli-tv-bi-vb/pli-tv-kd/pli-tv-pvr` (active, มี segments) - Abhidhamma: `ym/pt` (legacy = 0) คู่กับ `ya/patthana` (active) - **เลือก code ที่ segment_count > 0 ตอนใช้งาน** — ตัวอื่นเป็น metadata placeholder จาก migration เก่า 🌐 **ภาษา:** ส่งกลับ Pāli + Thai + English labels เสมอ (metadata ไม่ใช่ segment text); text content ตามภาษาที่ ENABLED_LANGUAGES บอก. ตอนนี้ ฉบับแปลไทยใน DB ยังไม่มี — Thai user ใช้ cross_reference 84000.org เพิ่ม Returns: โครงสร้างแบบ hierarchical: - pitakas{vinaya/sutta/abhidhamma} → nikayas[] - แต่ละ nikaya: code, name (3 ภาษา), sutta_count, segment_count |
| get_reference | สร้างข้อมูลอ้างอิง (citation) ที่ถูกต้องสำหรับสูตร 💡 **ใช้ tool นี้เมื่อ:** - User ขอ citation สำหรับงานวิชาการ/บทความ/อ้างอิง - ต้องการรู้ตำแหน่งในพระไตรปิฎก (ปิฎก/นิกาย) ของสูตร - ต้องการ formatted citation string พร้อมใช้ 🔗 vs `get_sutta`: tool นี้ return เฉพาะ metadata + citation ไม่มี segments; ใช้คู่กับ `get_sutta` เมื่ออยากได้ทั้งเนื้อหา + citation |
| list_editions | แสดงรายการฉบับแปลที่มีในระบบ พร้อมสถิติ coverage 💡 **ใช้ tool นี้เมื่อ:** - ก่อนเรียก `compare_translations` หรือ `get_sutta(edition=...)` — เพื่อรู้ว่าใช้ค่า edition อะไรได้บ้างและฉบับไหนคุ้มเทียบ - User ถามว่ามีฉบับแปลใดบ้างใน DB 🔍 **กรอง:** Tool นี้ filter ตาม `TRIPITAKA_ENABLED_LANGUAGES` ของเซิร์ฟเวอร์ — Thai disabled → return empty list. ทำงานเฉพาะภาษาที่เปิดอยู่ ⚠️ **State ปัจจุบัน:** DB ส่วนใหญ่มีแต่ Pāli (default จาก SuttaCentral bilara) + English (Sujato). Thai editions (`dhiranandi`, `jayasaro`, `mbu`, `royal`) ยังไม่ได้ index — return empty จนกว่าจะ load Returns: list ของ edition object แต่ละตัวมี: - edition: รหัสฉบับ เช่น "sujato", "dhiranandi", "mbu" - translator: ชื่อผู้แปล - language: รหัสภาษา ISO ("pi", "en", "th") - segment_count: จำนวน segments ที่มีคำแปลใน edition นี้ - sutta_count: จำนวนสูตรที่มีคำแปล |
| compare_translations | เปรียบเทียบคำแปลทุกฉบับที่มีสำหรับ segment เดียวกัน 💡 **ใช้ tool นี้เมื่อ:** - User ถามความหมาย/การแปลของบรรทัดเดียวจากบาลี ที่อยากเทียบหลายผู้แปล - ตรวจสอบว่าผู้แปลแต่ละคนตีความต่างกันยังไง (เช่น คำเทคนิค `dukkha`, `anattā`, `nibbāna` มี nuance ในการแปลต่างกัน) - งานวิชาการที่ต้อง quote multiple translations 🔍 **vs `get_sutta`:** tool นี้ targets **1 segment** (line-level), ส่วน `get_sutta` targets **ทั้งสูตร**. ถ้าอยากเทียบทั้งสูตร ต้องเรียก `compare_translations` หลาย segment 📋 **Format ของ segment_id:** `<sutta_id>:<paragraph>.<line>` เช่น `mn1:171.4` (Mūlapariyāyasutta paragraph 171 line 4 — "Nandī dukkhassa mūlaṁ"). หา segment_id จาก `get_sutta` หรือ search results ⚠️ **State ปัจจุบัน:** Translation table ยังว่าง (DB load เฉพาะ default Pāli+English จาก bilara). `total_editions` มักเป็น 0; `text_pali` กับ `text_english` ใช้ได้เสมอ. Thai editions เพิ่มทีหลัง |
| get_word_definition | ดึงความหมายพจนานุกรมของคําศัพท์บาลี พร้อมด้วยตัวอย่างประโยคบริบทในพระสูตร ใช้เป็น Pali Dictionary Bridge เพื่อทำความเข้าใจความหมายแท้จริงของคำ โดยนำเสนอ "นิยาม" ควบคู่กับ "บริบทที่พระพุทธองค์ทรงใช้จริง" 📖 **เกี่ยวกับฐานข้อมูลพจนานุกรม:** Tool นี้ใช้พจนานุกรมต้นฉบับหลายเล่ม รวมถึง "พจนานุกรมพุทธศาสน์ ฉบับ ประมวลศัพท์" ของสมเด็จพระพุทธโฆษาจารย์ (ป. อ. ปยุตฺโต) ที่เป็นภาษาไทย — เนื้อหาเหล่านี้เป็น **ผลงานต้นฉบับวิชาการที่สมบูรณ์อยู่แล้ว** (ไม่ใช่ คำแปล) จึง **เปิดให้ใช้ได้เสมอ** แม้ ENABLED_LANGUAGES จะปิดภาษาไทย. AI client ควรแปลเนื้อหาผลลัพธ์ภาษาไทยเป็นภาษาผู้ใช้เองหากจำเป็น. |
| parse_pali_word | วิเคราะห์คำบาลีเพื่อหารากศัพท์ (Stemming / Lemmatization เบื้องต้น) 💡 **ใช้ tool นี้เมื่อ:** - เจอคำบาลีในข้อความ (เช่น `dukkhassa`, `bhikkhūnaṁ`) แล้ว `get_word_definition` หาไม่เจอ — Pāli inflect คำตามวิภัตติ ๘ × วจน ๒ = ๑๖ form ต่อราก - ต้องการแยก compound word (`sammāsambuddhassa` → `sammā` + `sambuddha` + `-ssa` genitive) - ดู possible stems ก่อนค้นต่อใน `get_word_definition` 🔄 **Workflow แนะนำ:** `parse_pali_word(inflected_form)` → ได้ `possible_stems[]` → เรียก `get_word_definition(stem)` ทีละ stem จนเจอ definition ⚠️ **ข้อจำกัด:** - เป็น rule-based เบื้องต้น — ตัด common suffixes (case endings, vowel shortening) ไม่ใช่ full morphological analyzer - Compound words (samāsa) ไม่ได้แยก — เช่น `dukkhanirodha` ไม่ตัดเป็น `dukkha` + `nirodha` - ไม่จับ sandhi (เสียงเชื่อม) เช่น `tena ahaṁ → tenāhaṁ` - ผลลัพธ์เป็น **possible** stems — ต้อง verify ผ่าน `get_word_definition` |