Dhamma.Gift MCP server
Commit Nov 14, 2026Enables searching and reading Pāli Canon texts with Russian and English translations using SQLite-powered full-text search.
Also known as dhammagift/dg-node, dg-node
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 1.0.0
- Last commit
- Nov 14, 2026
- License
- —
What is Dhamma.Gift MCP?
Dhamma.Gift enables searching and reading Pāli Canon texts with Russian and English translations using SQLite-powered full-text search.
Summary generated from the project's README
About Dhamma.Gift MCP server
Accessing and searching Pāli Canon texts through English and Russian translations is the primary function of this server. It provides a specialized backend for reading sacred texts using SuttaCentral Bilara and DhammaGift translations. Developers and researchers can utilize the SQLite-powered FTS5 engine to perform full-text searches across the canon, retrieving specific segments or entire suttas via clean URL structures like /dn22 or /dn22:12.1.
The system operates locally by reading data directly from the disk, requiring a build step to generate the dg.db SQLite database from Bilara data. It supports various environments including Windows, Termux, and local servers through automatic path resolution for offline mirrors. While it includes legacy Express-based services, the modern production environment runs on Fastify to handle search requests, reader routes, and static assets.
Users can toggle between Pāli, Russian, and English content modes to suit their study needs. The server manages segment-aware links and scroll targets, ensuring that specific verses or sections are easily reachable within the reader interface.
What you can do with it
- 1Search the Pāli CanonFind specific terms or names across the entire canon using Russian or English translations.
- 2Read specific sutta segmentsNavigate directly to a specific verse or segment within a sutta using clean URL routing.
- 3Toggle translation languagesSwitch between viewing the original Pāli text and its Russian or English translations.
Written from the project's README. Every use case is checked against a quote from it.
How to install Dhamma.Gift MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Dhamma.Gift MCP in Claude Code
$ claude mcp add --transport http dg-node https://api.dhamma.gift/mcpInstall Dhamma.Gift MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"dg-node": {
"url": "https://api.dhamma.gift/mcp"
}
}
}Install Dhamma.Gift MCP in VS Code
.vscode/mcp.json
{
"servers": {
"dg-node": {
"type": "http",
"url": "https://api.dhamma.gift/mcp"
}
}
}Install Dhamma.Gift MCP in VS Code CLI
$ code --add-mcp '{"name":"dg-node","type":"http","url":"https://api.dhamma.gift/mcp"}'Install Dhamma.Gift MCP in Codex
$ codex mcp add dg-node --url https://api.dhamma.gift/mcpInstall Dhamma.Gift MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.dg-node] url = "https://api.dhamma.gift/mcp"
Install Dhamma.Gift MCP in Gemini CLI
$ gemini mcp add -s user --transport http dg-node https://api.dhamma.gift/mcpInstall Dhamma.Gift MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"dg-node": {
"url": "https://api.dhamma.gift/mcp",
"type": "http"
}
}
}Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachabledhammagift/dg-node is public and reachablegithub.com/dhammagift/dg-node ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-11-13github.com/dhammagift/dg-node ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeinitialize answered with protocol 2025-06-18 in 397 msPass
README
View on GitHubdg-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
/dn22and/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
git pull
npm install
npm run build-search-db # build dg.db (SQLite/FTS5) from fresh Bilara data
npm 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
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 repo
curl -I "http://localhost:3000/dn22" # reader via clean URL
curl -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-fastifyis the modern backend, while legacy PHP pages remain in parallel for compatibility
Project structure
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.md
docs/ — 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.
Dhamma.Gift MCP questions
How do I add Dhamma.Gift MCP to Claude Code?
Run claude mcp add --transport http dg-node https://api.dhamma.gift/mcp in your terminal. Add --scope user to make it available in every project.
How do I add Dhamma.Gift MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How do I build the search database?
You can build the SQLite/FTS5 search index from fresh Bilara data by running the command 'npm run build-search-db'.
Does the server support segment-specific links?
Yes, the server supports clean URLs for specific segments, such as /dn22:12.1, which allows for scrolling to specific targets.