Dhamma.Gift — Pāli Canon

gift.dhammaPublished by dhamma.giftOfficial publisherv1.0.0Updated Nov 7, 2026

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

VerifiedStreamable HTTPWeb executableWeb Search & ScrapingKnowledge & Memory

Overview

AI-generated overview

Remote MCP server for searching and reading the Pāli Canon on dhamma.gift, with Pāli root texts and Russian and English translations.

What you can do
  • Search the canon by keyword, substring or regex and get a census of matching suttas with ids, titles and match counts
  • Fetch a sutta's Pāli root text by id, optionally with translations and named translators
  • Compare one segment side by side in Pāli and every available translation
  • List the canon's structure: collections, books by id prefix with sutta counts, and available translation languages and translators
When to use it
Useful when you want an assistant to look up Buddhist canonical passages, find where a term is defined or explained, or compare Pāli wording with translations while studying or citing texts.
Requirements
A remote streamable HTTP endpoint at api.dhamma.gift; no authentication, environment variables or headers are declared. Network access to that host is needed.
Before you install
Search is literal keyword, substring or regex matching, not semantic search, so results depend on exact wording. Content comes from a third-party site and its translations; verify citations against the source before relying on them.

Installation

In SourceWeft

  1. Open Dhamma.Gift — Pāli Canon in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/gift.dhamma%2Fpali-canon/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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.

Source: README.md at commit ec9aea3

Tools

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.

ParameterslangssuttaIdrequiredtranslators

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.

ParameterslangssegmentIdrequiredtranslators

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.

Parametersprefix

Version history

1
  1. v1.0.0LatestOct 17, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.