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 分

    请在仓库或注册中心条目中声明许可证。