Dhamma.Gift — Pāli Canon

gift.dhamma由 dhamma.gift 發布官方發布者v1.0.0更新於 Nov 7, 2026

Search and read the Pāli Canon: Pāli root texts with Russian and English translations.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取知識與記憶

概覽

AI 產生的概覽

遠端 MCP 伺服器,可在 dhamma.gift 上檢索與閱讀巴利三藏,提供巴利原文及俄文、英文譯本。

可以做什麼
  • 以關鍵字、子字串或正規表示式檢索三藏,回傳所有符合經文的清單,含編號、標題與符合次數
  • 依編號取得某部經的巴利原文,可選擇附上譯本並指定譯者
  • 將某一經段以巴利原文與各譯本並排對照
  • 列出三藏結構:集部、依編號前綴的典籍與經文數量、可用譯本語言與譯者
適用情境
適合讓助理查找佛教經典段落、定位某術語的定義或解說,或在研讀與引用時對照巴利原文與譯本。
執行需求
需連線至 api.dhamma.gift 的遠端 streamable HTTP 端點;未宣告驗證、環境變數或請求標頭。需要能存取該主機的網路。
安裝前請注意
檢索為字面關鍵字、子字串或正規表示式比對,並非語意搜尋,結果取決於確切用詞。內容來自第三方網站及其譯本,引用前應核對原始來源。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Dhamma.Gift — Pāli Canon,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/gift.dhamma%2Fpali-canon/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "dhamma-gift-p-li-canon": {
      "type": "http",
      "url": "https://api.dhamma.gift/mcp"
    }
  }
}

README

dg-node

Node.js backend for searching and reading Pāli Canon texts using SuttaCentral Bilara and DhammaGift translations.

This project powers the search index, reader endpoints, static assets, and compatibility layer for the legacy Dhamma.Gift stack. The production server runs on Fastify; the older Express-based implementation is kept only for legacy support.

Architecture and development rules: CLAUDE.md

Features

  • Search across the Pāli Canon with SQLite/FTS5
  • Reader routes for clean URLs such as /dn22 and /dn22:12.1
  • Segment-aware links and scroll targets
  • Support for offline mirror data and environment-based path resolution
  • Legacy compatibility with older PHP/Apache frontends

Quick start

bash
git pullnpm installnpm run build-search-db   # build dg.db (SQLite/FTS5) from fresh Bilara datanpm start                 # run the production server (dg-fastify.js), port 3000

build-search-db should be rerun whenever source texts or translations change on disk. The server reads data directly from disk and rebuilds the search index as needed.

Data paths such as SC_BILARA, DG_OFFLINE, and offline mirrors are resolved automatically based on the runtime environment (Termux, Windows development, local server, etc.).

unused/dg-light.js and unused/dblight.js (npm run start:express) are legacy Express + grep services and are not used in production. See CLAUDE.md for details.

Deployment checks

bash
curl "http://localhost:3000/search?q=kacchapa&scope=dhamma&langs=ru,en"curl -I "http://localhost:3000/assets/js/datatables/datatables.min.js"   # 200 from public/overrides/js/datatables, not from the legacy repocurl -I "http://localhost:3000/dn22"                                  # reader via clean URLcurl -I "http://localhost:3000/dn22:10.5"                             # segment link (scroll to 10.5)

Manual browser checks:

  • /nodejs/res/?q=kacchapa&scope=dhamma — search, DataTables, export
  • /dn22 — full-text reader
  • Pāli / Russian toggle (three modes: Pāli + translation → Pāli only → translation only) — should actually hide/show content correctly
  • /?q=dn22#12.1 (legacy format) — should continue to work alongside /dn22:12.1

Deployment notes for Apache/PHP

If the public Dhamma.Gift site is currently hosted by Apache/PHP while Node runs as a separate backend proxied only to /search, note the following:

  • search requests may route to the Node backend
  • static files and reader routes may still be served by Apache/PHP
  • root-domain routing can differ from the local development environment
  • dg-fastify is the modern backend, while legacy PHP pages remain in parallel for compatibility

Project structure

text
dg-fastify.js         — production server (Fastify + SQLite/FTS5, dg.db): /search, /api/text/:suttaId,                         static files (search/, reader/, siteroot/assets/), offline mirrors,                         clean URLs (/dn22, /dn22:12.1)unused/dg-light.js    — legacy Express + grep server, not used in production (see CLAUDE.md)unused/dblight.js     — build script for dg-light.js → dg_db_light.json (legacy, not needed with dg.db)search/               — search page (DataTables); legacy URL remains /nodejs/res/... (see CLAUDE.md)reader/               — reader frontend (reader-template.html + megareader.js)configs/              — project JSON configs (openapi, reader/*, search/*), see CLAUDE.mddocs/                 — project documentation and compatibility notes (SPA plans, backward compatibility)siteroot/             — root-site publication: assets/ (legacy assets), 4nt/config/login/,                         memo/read (legacy tools), see CLAUDE.md

License

See the repository license and project-specific notes in the root of the project.

來源:README.md,提交 ec9aea3

工具

4

get_text

Fetch a sutta by id (e.g. "dn22", "mn1", "sn56.11") — the Pali root text of every segment. Pali only by default; pass langs for translations, translators to name a translator (e.g. ["en_sujato"]). Same data as dhamma.gift/api/text.

輸入參數langssuttaId必填translators

compare_translations

One segment of the canon in the Pali root and every available translation side by side. Use a segment id from search/get_text, e.g. "mn129:21.3". Sujato (en_sujato) is excluded unless named in translators.

輸入參數langssegmentId必填translators

list_structure

What texts exist. Without arguments: collections (sutta/vinaya/abhidhamma/khuddaka), books by id prefix with sutta counts, and translation languages with translators. With prefix (e.g. "mn", "sn56", "an4"): the suttas under it with titles.

輸入參數prefix

版本歷史

1
  1. v1.0.0最新Oct 17, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。