
dharma-sources
io.github.gyatsodawa/dharma-sources
Quote Buddhist texts exactly as SuttaCentral, CBETA, 84000, Lotsawa House and BDRC publish them.
Documentation
English · 简体中文
Dharma Sources
Let the teaching be the teacher. A free, open-source MCP server that lets an AI assistant quote Buddhist texts exactly as authoritative archives publish them, each passage with its reference, translator, licence and a link to check it.
https://dharma-sources.gyatsodawa.com/mcp
No account, no API key. Website: dharma-sources.gyatsodawa.com, in English, 简体中文, 繁體中文, 日本語 and 한국어.
Why
When an AI doesn't know the exact words of a text, it often produces something that sounds right and says it just as confidently. This is called hallucination. The Dharma asks for the opposite: every teaching traced to its source, word for word, because one changed word can change the meaning.
Ask an assistant what the Buddha said in the Kālāma Sutta, and from memory it will often give you this:
"Believe nothing, no matter where you read it, or who said it, even if I have said it, unless it agrees with your own reason and your own common sense."
Those words are not in the sutta. With Dharma Sources, the assistant looks the text up first and quotes what it actually says:
"Please, Kālāmas, don't go by oral transmission, don't go by lineage, don't go by testament, don't go by canonical authority, don't rely on logic, don't rely on inference, don't go by reasoned train of thought, don't go by the acceptance of a view after deliberation, don't go by the appearance of competence, and don't think 'The ascetic is our respected teacher.'"
— AN 3.65:4.1 · tr. Bhikkhu Sujato · CC0 · SuttaCentral
And when a saying is in no text at all, the search comes back empty, and the assistant can say so instead of passing it on as scripture.
What it does, and what it doesn't
It does three things: it finds a text, returns the passage exactly as the archive publishes it, and attaches the reference, translator, licence and canonical URL.
It does not translate, summarise or interpret, and it does not speak for any teacher or tradition. These are texts, not a teacher: for practice, its guide for assistants points people to a qualified teacher.
Connect
The quick way. Give your assistant this sentence, and it will set itself up or tell you the one step to take:
Read https://dharma-sources.gyatsodawa.com/llms.txt and set up Dharma Sources for me.
By hand.
| Client | How |
|---|---|
| Claude Code | claude mcp add --transport http dharma-sources https://dharma-sources.gyatsodawa.com/mcp |
| Claude (web, desktop, mobile) | Settings → Connectors → Add custom connector, with the URL above |
| Cursor | In ~/.cursor/mcp.json, under "mcpServers": "dharma-sources": { "url": "https://dharma-sources.gyatsodawa.com/mcp" } |
| VS Code | code --add-mcp '{"name":"dharma-sources","type":"http","url":"https://dharma-sources.gyatsodawa.com/mcp"}' |
| Any other MCP client | Add the URL as a Streamable HTTP server |
{
"mcpServers": {
"dharma-sources": { "url": "https://dharma-sources.gyatsodawa.com/mcp" }
}
}
To check the connection, ask the assistant to call list_sources. The public endpoint allows 60 requests a minute
per client.
It is listed in the official MCP Registry
as io.github.gyatsodawa/dharma-sources, and on Glama,
where you can browse the tools and try them in the browser.
Tools
| Tool | What it does |
|---|---|
search | Find works and passages by words or a phrase, in a chosen language. Returns ids to pass to fetch. |
fetch | Get a passage or a work by id, with its text where the licence allows, and its reference, translator, licence and URL. |
resolve_work | Turn a citation as people write it ("MN 10", "T 251", "Toh 21", a BDRC id, a Lotsawa House or 84000 URL) into the record it names, with its parallels in other canons. |
list_sources | List the archives, what each covers, and whether it returns text or only metadata and links. |
All four are read-only. A passage comes back like this:
DN 16:2.26.1: The Great Discourse on the Buddha's Extinguishment (Bhikkhu Sujato)
id: sc:dn16/en/sujato:2.26.1
url: https://suttacentral.net/dn16/en/sujato#2.26.1
translator: Bhikkhu Sujato
edition: Long Discourses
licence: CC0
[2.26.1] So Ānanda, live as your own island, your own refuge, with no other refuge.
Let the teaching be your island and your refuge, with no other refuge.
The server also tells the assistant how to quote: use the text as returned, never present a paraphrase or its own translation as a quotation, link instead of reciting from memory when text is withheld, and don't treat an unreachable archive as proof that a passage doesn't exist.
Sources
| Source | What it serves | Licence and what follows from it |
|---|---|---|
| SuttaCentral | The Pali canon and its parallels; passage text for segmented translations, links for older ones | Segmented translations are CC0 and root texts carry a Public Domain mark; other translations keep their own licences |
| CBETA | The Chinese canon (Taishō and others), by fascicle or by line, with CBETA citations | CC BY-NC-SA 4.0; four modern collected works keep their copyright and are linked |
| 84000 | English translations of the Kangyur and Tengyur, passage by passage as 84000 numbers them | CC BY-NC-ND 3.0, so passages are quoted word for word with full attribution; 84000's notes are left out |
| Lotsawa House | Translations from Tibetan, paragraph by paragraph with the Tibetan | CC BY-NC 4.0; texts "reproduced with permission" from another holder are linked, not reproduced |
| BDRC | Catalogue records of Tibetan works, editions and authors | The catalogue is CC0; scans and e-texts state no reuse licence, so they are linked |
Most texts are licensed for non-commercial use only. The licence comes with every passage.
Each source has an adapter that reports the licence the archive states for an edition. One rule in
src/core/rights.ts then decides whether text leaves the server: text with an unknown or
unlisted licence is withheld, and the reader is sent to the archive. docs/permissions.md
lists what is held back from each source and what permission would release it.
More archives are on the way. To propose one, open an issue or a pull request.
This is an independent project, not affiliated with or endorsed by any of these archives.
Run it yourself
Requires Node.js 22 or later and pnpm.
pnpm install
pnpm build
node dist/cli.mjs fetch "sc:mn10/en/sujato:1.1-1.4" # one passage, from the command line
node dist/cli.mjs resolve "Toh 21" # a citation, resolved
node dist/cli.mjs stdio # a local MCP server over stdio
pnpm dev # the HTTP endpoint at http://localhost:8787/mcp
To use the local server in a client, point it at node /path/to/dharma-sources/dist/cli.mjs stdio.
Develop
pnpm check # lint (Biome), types (TypeScript), tests (Vitest)
pnpm eval # citation-integrity evals (Promptfoo) against the live archives
pnpm eval:model # the same questions put to Claude, GPT and Gemini, with and without this server
pnpm site:dev # the website (Astro)
src/core and src/adapters don't depend on a runtime. src/entry holds the stdio, command-line and Cloudflare
Workers entry points, which all build the server from the same factory in src/server.ts. The
website is in site/, and is served by the same Worker ahead of /mcp.
To add a source, write an adapter in src/adapters/<name>/ that implements SourceAdapter from
src/core/adapter.ts, reports the licence the archive states, and has tests against
recorded fixtures in test/.
Licence
Code: Apache-2.0. The texts belong to their archives and translators, under the licences shown with each record.
No installation packages available.