Tripitaka MCP

io.github.dhamma-seekerPublished by GitHub account dhamma-seekerv1.3.0Updated Oct 26, 2026

MCP server for the full Pāli Canon — search, cite, compare translations. Offered as Dhamma Dāna.

VerifiedStreamable HTTPWeb executableWeb Search & ScrapingFiles & StorageKnowledge & Memory

Overview

AI-generated overview

MCP server for the Pāli Tipiṭaka that lets an assistant search the canon, fetch suttas, verify quotes, compare translations and build citations.

What you can do
  • Search the canon by keyword, meaning or hybrid ranking, and survey the whole corpus for exact counts and every occurrence of a term
  • Fetch a sutta by ID, in full, as an outline, or as a slice around a segment, and open an inline Pāli/English viewer
  • Verify a quoted or half-remembered line against the canon and generate formatted academic citations
  • Compare translations of a single segment and list available editions
  • Look up Pāli words in dictionaries, find how the suttas and Vinaya define a term, and strip inflections to recover a root form
  • Inspect the structure of the three pitakas with coverage statistics
When to use it
Useful when someone wants to study, quote or fact-check Buddhist canonical texts: finding passages on a topic, checking whether a line attributed to the Buddha is genuine, comparing translators, or producing a proper citation.
Requirements
The hosted instance needs no account or key, only network access; Claude Desktop reaches it through an npx bridge, so Node.js is required. A local edition installs via pipx with Python 3.10+ and a one-time ~120 MB database download; the full self-hosted stack needs Docker, PostgreSQL with pgvector and an embedding model.
Before you install
On the hosted server, queries leave your machine and reach a third-party service; bursts may be throttled. The local edition lacks semantic and hybrid search and its keyword ranking differs. The canon is read-only, but a self-hosted HTTP endpoint has no caller authentication, so do not bind it publicly without protection. Commercial use and redistribution are restricted by the project's notice.

Installation

In SourceWeft

  1. Open Tripitaka MCP 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/io.github.dhamma-seeker%2Ftripitaka-mcp/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": {
    "tripitaka": {
      "type": "http",
      "url": "https://mcp.tripitaka-mcp.com/mcp"
    }
  }
}

README

Tripitaka MCP Server

[Tripitaka MCP logo: folded hands over a dhammacakka in pixel art]

[License: MIT] [MCP Spec] [Coverage] [Hosted] [Dhamma Dāna] [Glama] [Smithery]

An MCP server for searching and citing content from the Pāli Tipiṭaka. It lets AI clients such as Claude or Cursor look up suttas, quote the teachings, and compare translations across languages.

🙏 This project is offered as Dhamma Dāna: 100% free, non-commercial only. License details: LICENSE (code) and NOTICE.md (data)

✨ Features

  • Full Tipiṭaka coverage, at parity with SuttaCentral. All three baskets are indexed, about 444K segments. Sutta carries Pāli plus English from bilara-data's translators (Bhikkhu Sujato for DN/MN/SN/AN and most of the Khuddaka Nikāya, with John Kelly, Bhikkhu Kovilo and others for a few KN books). Vinaya carries Pāli plus Bhikkhu Brahmali's English. Abhidhamma is Pāli only, because upstream bilara-data has no English for any Abhidhamma book. list_structure reports live counts.
  • Hybrid search merges keyword and semantic results through Reciprocal Rank Fusion (RRF). It is the most precise of the search tools and needs no configuration.
  • Keyword search with trigram fuzzy matching and cross-language alignment.
  • Semantic search by meaning, using vector similarity (pgvector).
  • Translation comparison across editions, aligned segment by segment.
  • Dictionary bridge with 20,000+ entries (P. A. Payutto, PTS, DPPN).
  • Sutta fetch and citations. Get a sutta by ID (mn1, pli-tv-bu-vb-pj1, patthana1.1) and generate a properly formatted academic citation.
  • Pāli word analyzer that strips inflectional suffixes to find the root form when a dictionary lookup misses (bhikkhūnaṁ → bhikkhu).
  • Cross-reference URLs in every response: a clickable deep link into the project's own bilingual reader (Pāli + English, with a segment anchor that highlights the cited verse). The reader renders SuttaCentral's bilara-data verbatim, so it is the authoritative text, and AI clients surface the link so users can verify the source in one click.
  • Dual transport: legacy SSE (/sse) and canonical Streamable HTTP (/mcp, MCP spec 2025-03-26).
  • MCP resources: tripitaka://structure, tripitaka://sutta/{id}, tripitaka://word/{w}, for clients that pin context as resources.
  • Curated reference pages at /topics/*: six markdown pages covering canon structure, getting started and tool selection, places (Mahājanapada, holy sites, cosmology), 10 foundational themes with locus classicus, about 30 major figures, and a phase-based timeline of the Buddha's 45-year mission. Sutta IDs are verified against live data, and an AI client can fetch one page instead of running 30+ tool calls.
  • Claude skill. skills/tipitaka-research.md is a ready-to-install workflow file that turns on a multi-step research pattern (clarify → verify coverage → search → drill in → cite) on Claude Desktop and Claude Code.
  • Postman collection included for testing the API.

🏗️ Tech stack

TechnologyRole
Python + FastMCPMCP Server
PostgreSQL + pgvectorDatabase + Vector Search
sentence-transformersEmbeddings for semantic search
Docker ComposeInfrastructure

🚀 Quick start

🌐 No setup: connect to the public Dhamma Dāna server

The maintainers run a free public instance at tripitaka-mcp.com.

EndpointUse
https://mcp.tripitaka-mcp.com/mcpStreamable HTTP (MCP spec 2025-03-26)
https://mcp.tripitaka-mcp.com/sseLegacy SSE (older clients)

Connecting Claude Desktop takes three steps. Nothing to install but Node.js, and no Docker or GPU.

1. Find your absolute npx path. Claude Desktop doesn't read your shell profile, so a bare npx won't resolve. Open a terminal:

bash
which npx# example: /Users/you/.nvm/versions/node/v22.14.0/bin/npx

2. Open claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows) and add the entry below. Substitute YOUR_NPX_PATH with the output from step 1, and YOUR_NODE_BIN_DIR with that path's parent directory:

json
{  "mcpServers": {    "tripitaka": {      "command": "YOUR_NPX_PATH",      "args": ["-y", "mcp-remote", "https://mcp.tripitaka-mcp.com/mcp"],      "env": { "PATH": "YOUR_NODE_BIN_DIR:/usr/local/bin:/usr/bin:/bin" }    }  }}

3. Quit Claude Desktop completely (⌘Q on macOS, tray → Quit on Windows) and reopen. The 🔌 indicator in the bottom-left should show tripitaka with 14 tools available.

The first connection takes 5 to 10 seconds while npx downloads mcp-remote on demand. Give Claude Desktop a moment after the restart before deciding it failed.

Once connected, try asking Claude things like:

  • "What does the Buddha teach about mindfulness of breathing? Quote the relevant passages from MN 118."
  • "Show me the full text of the Karaṇīyamettasutta in Pāli and English."
  • "What does the Pāli word sati mean according to the Payutto dictionary?"
  • "Find suttas where the Buddha discusses anger."

Claude will pick the right tool, fetch the canonical Pāli, and surface a clickable link to the project's bilingual reader for verification.

The hosted server is a small free service offered for personal study, research, and dhamma practice. Keep your request rate reasonable; bursts may be throttled at the edge. Read NOTICE.md before redistributing it or using it commercially.

💻 Run it fully offline (pipx, local SQLite, no server)

If you would rather keep everything on your own machine, with no network calls to the hosted server, install the local edition. It carries the whole Pāli canon as a single SQLite file (~120 MB) and runs as a local stdio MCP server.

bash
pipx install tripitaka-mcp     # needs Python 3.10+tripitaka-mcp init             # one-time: downloads the SQLite databasetripitaka-mcp serve            # runs the MCP server over stdio

If the install fails like this:

Because the current Python version (3.9.6) does not satisfy Python>=3.10

pipx is using a different interpreter than you think. It builds its own isolated environment on purpose and ignores whatever venv you have active, so an old system Python gets picked even when the shell you typed in has 3.12. Tell it which to use:

bash
pipx install --python python3.12 tripitaka-mcp

(Any 3.10 or newer works; pipx environment shows what it defaults to.)

Then point Claude Desktop or Cursor at the local command, with no npx bridge and no internet:

json
{  "mcpServers": {    "tripitaka": {      "command": "tripitaka-mcp",      "args": ["serve"]    }  }}

(If tripitaka-mcp isn't on the client's PATH, use the absolute path from which tripitaka-mcp.)

Need a URL instead of stdio? Scripts, notebooks, and anything that shares one server across several clients want an HTTP endpoint rather than a subprocess:

bash
tripitaka-mcp serve --http                 # http://127.0.0.1:8765/mcptripitaka-mcp serve --http --port 9000     # or MCP_HOST / MCP_PORT

It binds 127.0.0.1 unless you say otherwise; the canon is read-only, but nothing here asks who is calling, so think before binding a public interface.

Hosted vs local

Both serve the same ~444K-segment canon. The differences:

Hosted (mcp.tripitaka-mcp.com)Local (pipx)
Toolsall 1411, or 12 with TRIPITAKA_MCP_APP=1; no search_semantic or search_hybrid
Concept / semantic search✅ vector search (pgvector)❌ use search_by_keyword instead
Keyword searchPostgreSQL trigram: fuzzy, typo tolerant, similarity rankedSQLite FTS5: whole-word / token match, so results and ranking can differ from hosted
Canon dataalways currenta snapshot from when you ran init; re-run tripitaka-mcp init to refresh
Updatesautomaticpipx upgrade tripitaka-mcp for code; re-run init for data
Privacyqueries reach the hosted server (nothing logged, see the Privacy Policy)nothing leaves your machine
Internetrequirednot needed after init
Rate limitbursts may be throttled at the edgenone
Setupzero / one-clickPython 3.10+, pipx, one-time ~120 MB download

search_semantic, search_hybrid, and the trigram keyword index need PostgreSQL, pgvector, and a ~1 GB embedding model, which is more than a lightweight local install should carry, so they stay hosted-only. In local mode those two tools are never registered: a connected client sees only the 11 it can actually call.

Because the local server is a standard stdio MCP server, it also gives you a fully offline AI stack. Pair it with a local model such as Ollama and any MCP-capable chat UI, and nothing leaves your machine.

🏎️ Fastest local path: the installer (recommended for non-developers)

bash
git clone https://github.com/dhamma-seeker/tripitaka-mcp.gitcd tripitaka-mcp./scripts/install.sh

The installer downloads a prepared database dump from Hugging Face (dhamma-seeker/tripitaka-mcp-dump) and restores it for you, which brings setup down from two to four hours (loading the data, then generating embeddings) to about five minutes. (If a dump file is already on disk, the installer uses that copy instead.)

The installer will:

  1. Verify that docker, compose, openssl, and curl are installed
  2. Generate .env with random passwords (for both the admin and the readonly user)
  3. Download the dump from Hugging Face (if not already local)
  4. Start the DB and restore the dump
  5. Set up the readonly role and runtime timeouts
  6. Print a ready-to-paste Claude Desktop config

Options:

bash
./scripts/install.sh --dump PATH          # use an existing dump file./scripts/install.sh --dump-url URL       # override the dump source./scripts/install.sh --no-dump            # skip restore (load data yourself later)

🔧 Manual setup (for developers)

1. Clone & setup
bash
git clone https://github.com/dhamma-seeker/tripitaka-mcp.gitcd tripitaka-mcpcp .env.example .env# Set POSTGRES_PASSWORD in .env to a random password
2. Start database
bash
docker compose up db -d
3. Install dependencies
bash
python -m venv .venvsource .venv/bin/activatepip install -r requirements.txt
4. Initialize database & load data
bash
# 1. Seed metadata (pitaka, nikāya)python scripts/seed_metadata.py
# 2. Download & load Sutta Piṭaka data from SuttaCentralpython scripts/data_loader.py
# 3. Load Thai CC0 translations (Dhīranando & Jayasāro)python scripts/load_thai_cc0.py
# 4. Load dictionaries (DPD, PTS, DPPN, and the Payutto dictionary)python scripts/load_dictionary.py
# 5. Generate embeddings for semantic / hybrid searchpython scripts/generate_embeddings.py
5. Run MCP server
bash
python main.py

🧪 Testing with Postman

You can drive the tools from Postman in SSE mode:

  1. Run the server with: MCP_TRANSPORT=sse python main.py
  2. Import postman_collection.json into Postman
  3. Invoke the tools directly

🚢 Production deployment

For production, restore from a database dump instead of re-loading the data and re-running the embedding model.

bash
docker compose -f docker-compose.prod.yml up -d --build

The production stack runs 5 services:

  • db: PostgreSQL + pgvector (internal only, no exposed port)
  • mcp-server: FastMCP over legacy SSE, behind /sse (readonly DB user, read-only FS, cap_drop: ALL)
  • mcp-server-http: the same server over Streamable HTTP, behind /mcp
  • reader: the bilingual reader that every cross-reference URL points at, behind /read/*
  • caddy: reverse proxy and Let's Encrypt. Its rate_limit block for the MCP site is declared but does not run as written, which DEPLOYMENT.md explains

For another layer of hardening, put Cloudflare in front of Caddy (DNS proxy, rate-limit rules, and DDoS protection on the free tier).

Full details are in DEPLOYMENT.md.

🔧 Connecting to Claude Desktop

The repo ships claude_desktop_config.example.json with three ready-to-use entries. Copy whichever fits your setup into claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows), then edit the absolute paths:

EntryWhen to useTransport
tripitaka-localYou ran the installer locally on the same machine as Claude Desktopstdio (no network)
tripitaka-remoteYou self-hosted the server on a VPS and want the modern transportStreamable HTTP (/mcp)
tripitaka-remote-sseYour client doesn't support Streamable HTTP yetLegacy SSE (/sse)

The remote entries route through mcp-remote, a bridge from Claude Desktop through npx to the remote MCP server. The example file comments every field; remove the _comment keys before saving.

For nvm users: command and env.PATH need absolute node paths, because Claude Desktop doesn't read your shell profile. Get them from which npx and which python while your normal shell is active.

Optional: install the research skill

On Claude Desktop and Claude Code, copying the bundled skill turns on the multi-step research workflow:

bash
mkdir -p ~/.claude/skillscp skills/tipitaka-research.md ~/.claude/skills/# Restart Claude Desktop (Cmd+Q then reopen) to pick up the skill

Details in skills/README.md.

📦 MCP tools (14 total)

ToolDescription
search_hybridCombined keyword + semantic search via RRF. Recommended for concept search, when you are after "discourses about X".
search_by_keywordTrigram keyword search, best for the top few matches of an exact word (appamāda, ānāpānassati).
survey_corpusExhaustive corpus survey: exact total, per-pitaka breakdown, and the matched word-forms. For "how many times" or "every place X appears", where you need every occurrence rather than the best matches. mode=thorough adds concept-level semantic recall.
search_semanticPure vector similarity. Usually search_hybrid is the better choice.
verify_quoteCheck a quote against the canon before repeating it. Returns exact / close / not_found with the matching segments, so a line can be attributed to a source instead of to a memory of one.
get_suttaFetch a sutta by ID (e.g. mn1, dn22, dhp1-20) with cross-reference URLs. Whole sutta by default; for long ones use mode="outline" (table of contents, no text), around="<segment_id>"+window (context around a hit), or segment_range/offset+limit to fetch just a slice.
open_sutta_viewerInteractive sutta viewer (MCP Apps). Renders the sutta inline in the chat as Pāli + English side by side, with the cited segment highlighted. The calling model can attach an AI translation of the displayed segments into the user's own language (translations param) as a clearly badged third row; the canon itself stays Pāli + English. Needs an MCP Apps-capable host (Claude, Claude Desktop, VS Code Copilot, and others); on other hosts it falls back to text.
get_referenceGenerate a properly formatted academic citation with all source URLs.
compare_translationsCompare renderings of a single segment across editions.
list_structureShow the Tipiṭaka structure with segment-count coverage per nikāya.
list_editionsList any additional translation editions loaded beyond the bundled Pāli + English. The public server currently carries none, so it answers plainly that there are no extra editions.
get_word_definitionPāli dictionary lookup (PTS, DPPN, and the Payutto Thai dictionary).
define_from_suttasFind how the suttas and Vinaya define a term in their own words: canonical formulas like "Katamañca X? ... ayaṁ vuccati X", "X adhivacana", and the Vinaya's "X nāma". Gives primary-source definitions where get_word_definition gives dictionary glosses.
parse_pali_wordStrip Pāli suffixes to recover the root form when get_word_definition misses (bhikkhūnaṁ → bhikkhu).

⚠️ Note on search_semantic

The vector index is built only on text_pali, using a multilingual MiniLM model that was not trained specifically on Pāli. (bilara-data carries Thai for 6 files in all, and the public server loads no Thai edition.) So:

  • Pāli and English queries come back accurate, with good cross-lingual alignment.
  • Thai queries return loose matches and aren't recommended.
  • For an exact keyword like appamāda, search_by_keyword is more precise.
  • For general-purpose search, search_hybrid (keyword + semantic) tolerates the limitation best.

Moving to a Pāli-trained embedding model such as bge-m3, and embedding the Thai edition, are both on the roadmap.

📁 Project structure

text
tripitaka-mcp/├── main.py                       # Main MCP Server (14 tools, 1 resource + 2 resource templates)├── cli.py                        # `tripitaka-mcp` CLI (init / serve) for the pipx edition├── sutta_verify.py               # Quote matching behind `verify_quote`├── sutta_definitions.py          # Canonical definition formulas behind `define_from_suttas`├── sutta_titles.py               # Sutta title resolution├── mcp_app.py                    # MCP Apps registration (env-gated, `TRIPITAKA_MCP_APP`)├── db/│   ├── connection.py             # Database connection pool│   └── schema.py                 # Schema (supports translation table)├── embedding/│   └── model.py                  # SentenceTransformer wrapper├── scripts/│   ├── install.sh                    # One-shot installer (HF dump → DB)│   ├── deploy.sh                     # Deploy / restart on a VPS│   ├── backup.sh                     # pg_dump → S3-compatible store│   ├── dump_and_publish.sh           # Verify embeddings → pg_dump → upload to HuggingFace│   ├── seed_metadata.py              # Seed pitaka/nikāya metadata│   ├── data_loader.py                # Load Sutta Piṭaka (Pāli + bilara EN, per-book translator)│   ├── load_vinaya.py                # Vinaya loader (Vibhaṅga + Pātimokkha + Khandhaka + Parivāra, Brahmali EN)│   ├── load_abhidhamma.py            # Abhidhamma loader (7 books, Pāli — bilara has no EN)│   ├── load_thai_cc0.py              # Thai translation loader│   ├── load_dictionary.py            # Load dictionary data│   ├── scrape_payutto.py             # Web scraper for the Payutto dictionary│   ├── generate_embeddings.py        # Generate vector embeddings│   ├── run_embedding_with_retry.sh   # Resilient wrapper around embedding generation (retries on DB drop)│   ├── check_embedding_progress.py   # Live progress snapshot (or --watch mode) for the embedding job│   ├── smoke_test.sh                 # Endpoint smoke test (TLS + /sse + /mcp + /health)│   ├── test_full_sutta.py            # Full-content smoke test (22 size-tiered suttas, exact pinned counts)│   ├── test_corpus_parity.py         # Check the corpus against the bilara-data clone it claims parity with│   ├── test_definitions.py           # `define_from_suttas` regression + snapshot + backend parity│   ├── test_verify_quote.py          # `verify_quote` regression, both backends│   ├── test_survey_counts.py         # `survey_corpus` count drift│   ├── test_pagination.py            # Slice / window / offset behaviour│   └── test_mcp_prompts.py           # Prompt-level test — a real model picks the tools, a judge reads the answer├── reader/                       # Bilingual reader served at /read/* (FastAPI)│   ├── app.py                    # Routes: /read/, /read/{sutta_id}, search, browse│   ├── queries.py                # Read-side queries│   ├── featured.py               # Landing-page sutta cards│   └── sutta_id_decoder.py       # Turn a sutta id into a human-readable location├── site/                         # Static landing page served at the apex domain├── topics/                       # Static markdown pages served at /topics/*│   ├── README.md                 # Index of available topic pages│   ├── tipitaka-overview.md      # Canon structure + coverage│   ├── getting-started.md        # Connection paths, tool selection, prompt patterns│   ├── places.md                 # Geography of the suttas (Mahājanapada, holy sites, cosmology)│   ├── themes.md                 # 10 foundational teachings + locus classicus│   ├── people.md                 # ~30 major figures (chief disciples, lay supporters, kings)│   └── timeline.md               # Phase-based timeline of the 45-year teaching career├── skills/                       # Portable Claude skills for AI clients│   ├── README.md                 # How to install│   └── tipitaka-research.md      # Multi-step research workflow├── infra/                        # Reverse proxy + deploy config│   ├── Caddyfile                 # Caddy: TLS, CORS for /mcp, /topics, /sse, /mcp│   ├── Dockerfile.caddy          # Caddy + caddy-ratelimit plugin│   ├── cloud-init.yml            # VPS bootstrap│   └── *.tf                      # Terraform (provider-agnostic)├── docs/│   └── CAPACITY.md               # Capacity planning per VPS spec├── claude_desktop_config.example.json├── docker-compose.yml            # Dev (single mcp-server)├── docker-compose.prod.yml       # Prod (db + 2 mcp-server + reader + caddy)├── Dockerfile└── requirements.txt

📜 Data sources & license

This project aggregates data from several sources under different licenses. Please read NOTICE.md in full before redistributing.

SourceLicenseNote
Source codeMITFree to use, fork, modify
SuttaCentral bilara-dataCC0Public domain
Thai translations (Dhīranando, Jayasāro)CC0Via SuttaCentral
Dictionary of Buddhism by Somdet Phra Buddhaghosacariya (P. A. Payutto)Dhamma Dāna⚠️ Non-commercial use only
PTS / DPPN / Dhammika DictionariesPublic Domain / CC

⚠️ If you plan to fork or redistribute

  • ✅ Use in free, dhamma-dāna, or educational projects
  • ✅ Run it on your own machine, for personal use
  • ❌ Don't use it in any paid product or service, because of the Payutto dictionary
  • ❌ Don't modify the dictionary content

For commercial use: remove the dictionary component, or contact Wat Nyanavesakavan for permission.

🙏 Credits & attribution

See CREDITS.md for contributor details and NOTICE.md for license terms.

Gratitude to:

  • Somdet Phra Buddhaghosacariya (P. A. Payutto) + Wat Nyanavesakavan
  • SuttaCentral and the Thai & English translators
  • 84000.org

Sādhu 🙏

May the sharing of this Dhamma bring benefit and happiness to all beings.

Source: README.md at commit afd6cd9

Tools

14

search_by_keyword

Keyword Search

Keyword search across the Pāli Tipiṭaka (trigram word-similarity). Searches the configured enabled language(s) on the server. Filterable by pitaka and translation edition. 💡 **Hints for the AI client:** The system's canonical reference is Romanised Pāli (from SuttaCentral). If the user asks in a disabled or unsupported language, translate the keyword to **Romanised Pāli (preferred) or English** before calling this tool — e.g. "suffering" → "dukkha", "mindfulness of breathing" → "ānāpānassati". See the server instructions for the enabled language set. ✅ **Diacritics do not matter.** `anapanassati` and `ānāpānassati` return the same thing; so do `nibbana` and `nibbāna`. Write the macrons if you know them, guess without them if you don't — neither costs you results. ⚠️ **A common Pāli noun is a poor query.** `samudda` (sea) matches ~700 segments and the top of that list is mostly section headings, not the passage that teaches anything. Two things to do instead: - Search the **rarest distinctive noun** in the passage, not its most obvious one. For the simile of the blind turtle, `turtle`/`kacchapa` gets there; `ocean`/`samudda` does not, in either language. - **Prefer English, or raise the limit.** `turtle` returns SN 56.47 and SN 56.48 inside the default window; `kacchapa` matches them too but ranks them past 30, so you need `limit=50` to see them. - A word inside a **compound** may be out of reach entirely: `samudda` scores 0.50 against `mahāsamudde` (compounded *and* inflected), under the 0.6 cutoff, so SN 56.47 is not ranked low — it is excluded. Trying more spellings will not recover it; search a different word instead. 🔍 **Pick the right search tool for the question shape:** - **Term lookup (exact word appearances)** — e.g. "occurrences of `ānāpānassati`": this tool is best (trigram nails the exact word). - **Concept search ("discourses about X")** — e.g. "discourses about mindfulness of breathing": **use `search_hybrid` instead.** Canonic

Parameterslimitpitakaeditionkeywordrequiredlanguage

survey_corpus

Survey Corpus (exhaustive)

Exhaustively survey the WHOLE Tipiṭaka for a term — guaranteed complete. Use this (not `search_by_keyword`) when the question is about **coverage or counting** rather than "show me the best passages": - "How many times does Kusinārā appear in the canon?" - "Every place ānāpānassati is mentioned — don't miss any" - "Which pitakas/how many suttas mention this term?" Unlike `search_by_keyword` (ranked, capped at 50, no total), this returns an **exact count**, a **per-pitaka breakdown**, the **distinct surface forms** that matched (so you can audit and discard over-matches), and a paginated enumeration. The `lexical` result carries `complete: true` — a hard guarantee that nothing was dropped for the chosen `match_scope`. Two layers, two different promises: - **lexical** — the word and its forms. Deterministic + EXHAUSTIVE. - **semantic** (`mode="thorough"`, hosted only) — passages teaching the same concept with DIFFERENT vocabulary (e.g. ānāpānassati via `assasati`/`passasati`). Approximate, **NOT exhaustive** — it never claims completeness, it only boosts recall.

Parametersmodecursorpitakakeywordrequiredlanguagepage_sizesem_limitmatch_scopesem_threshold

get_sutta

Get Sutta

Fetch a sutta's content — OR its table of contents (`mode="outline"`). ⚡ **Decide which mode BEFORE calling — don't fetch the whole sutta and parse it yourself:** - The user wants the **structure / outline / table of contents**, or asks **"how many sections/parts"** / "what's in it" → call `get_sutta(sutta_id, mode="outline")`. It returns the section list (titles + segment counts + ids), NOT the full text — cheap and exact. - The user wants the **context around a search hit** → `around="<segment_id>"` (search tools hand you the id, e.g. `dn22:18.1`) + optional `window`. - The user wants a **specific part** you already located → `segment_range="A..B"` or `offset`+`limit`. - Only fetch the **whole** sutta (no mode/selector) when the user actually wants to read/quote a SHORT sutta in full. Long ones (DN, long Vinaya/Abhidhamma; > ~400 segments — e.g. `dn16` is 1,664) should almost always start with `mode="outline"`; pulling the entire text wastes the context window. Uses standard SuttaCentral IDs, e.g.: - `mn1` = Majjhima Nikāya sutta 1 (Mūlapariyāyasutta, 334 segments) - `dn22` = Dīgha Nikāya sutta 22 (Mahāsatipaṭṭhānasutta, 454 segments) - `dn16` = Dīgha Nikāya sutta 16 (Mahāparinibbānasutta — the longest sutta in the canon, 1,664 segments) - `sn56.11` = Saṃyutta 56.11 (Dhammacakkappavattana) - `mn62` = Majjhima Nikāya 62 (Mahārāhulovāda — advice to Rāhula) - `dhp1-20` = Dhammapada verses 1-20 (KN uses range format) - `mil3.1.1` = Milindapañha 3.1.1 (paracanonical, 3–4 level id) 💡 **Hints for the AI client:** - **Quote `text_pali` / `text_english` directly from the returned segments** — do not rely on training memory. The system is verifiable; AI recall is often wrong. - Short segments numbered `:0.n` are **headers**, not the teaching itself — actual content starts around `:1.1`. They run collection → book → chapter → sutta, so the **last** one is the sutta's own name (`sn35.245:0.3` = Kiṁsukopamasutta, while `:0.2` is its chapter).

Parametersmodelimitaroundoffsetwindoweditionlanguagesutta_idrequiredsegment_range

search_semantic

Semantic Search

Semantic search — match by meaning, not exact words. Uses vector similarity (cosine distance) over `text_pali` embedded with a multilingual MiniLM model. 🤔 **In most cases you should use `search_hybrid` instead** — it combines this semantic search with keyword search and ranks better. Use this tool only when you need: - Pure semantic results (no keyword influence) - Fine-grained `threshold` tuning (hybrid uses RRF which is harder to tune) - To debug what semantic alone picks up vs keyword ⚠️ Known limitations: - The index is **Pāli only** (English/Thai queries pass through the multilingual embedding but the model isn't tuned on Pāli) - English queries usually embed better than Thai (model is EN-primary) - For specific Pāli terms (`appamāda`, `dukkha`), exact match is better — use `search_by_keyword` instead - Pāli stock phrases recur in many suttas → similarity scores cluster; read the top 10, don't trust rank 1 alone 📐 **Reading `distance`.** It is cosine distance between your query's embedding and the segment's, so smaller is closer, and a row is returned only at or under `threshold` (default 0.7) — an empty result means nothing cleared that cut. Ordering is proximity of meaning in one model's space, not doctrinal importance.

Parameterslimitqueryrequiredlanguagethreshold

search_hybrid

Hybrid Search

Hybrid search — combines keyword + semantic search via RRF. Uses Reciprocal Rank Fusion (RRF) to merge exact-word results with meaning-based results. **This is the recommended tool for "discourses about X" / concept queries**, because the semantic side catches suttas that discuss a concept using different vocabulary (e.g. some mindfulness-of-breathing suttas use `assasati/passasati/dīghaṁ` instead of `ānāpānassati`). ⚠️ **Send the question and nothing else. Do not pad the query.** The whole string becomes one vector, so every word you add moves it. Appending your own candidate terms — synonyms, Pāli equivalents, a keyword list — searches for the blend, not for the question. Measured on `Buddha flies in the sky`: asking it plainly put the right passage at **rank 1** (3 relevant suttas). Appending three guessed Pāli terms (`buddha, agga, sagga`) pushed it down to **rank 5** and left only 1 — because `agga` (supreme) and `sagga` (heaven) drag the vector toward their own meanings. Have candidate terms worth searching? Give them their own `search_by_keyword` call and merge the two result lists. One tool asks what a passage means, the other asks where a word occurs; combined into a single string they cancel out. Rewriting the question to sound more canonical does not help either — the same query phrased as `rose into the air and flew like a bird` scored **zero** relevant hits. 💡 **Hints for the AI client:** - English queries usually work best (e.g. `mindfulness of breathing`) because the embedding model is multilingual but EN-primary. - Thai stop-word handling is weak. If a Thai query underperforms, the AI client should translate to Pāli/English first (see server instructions). - The default `limit=5` is often too small for a topic survey — use `limit=15-20` (max 20) for good coverage. - `language` only chooses what comes back; it does not change what matches or how results are ranked. - Looking for a concrete thing rather than a concept (an animal, an

Parameterslimitqueryrequiredlanguage

list_structure

List Tipiṭaka Structure

Show the structure of all three pitakas with coverage statistics. 💡 **Use this tool when:** - The user asks for an overview of the Tipiṭaka (what's in it / which collections). - You need to check coverage before promising a search will find something — `segment_count > 0` is the active-loaded signal. - Verifying scope when compiling an artifact. 📊 **Current state (v1.1+, at parity with SuttaCentral bilara-data):** - **Sutta Piṭaka** complete: DN 37, MN 155, SN 1,829, AN 1,419, KN 2,351 sections (~284,702 segments) — Pāli + bilara EN (Sujato for DN/MN/SN/AN and most of KN; a few KN books have other bilara translators) - **Vinaya Piṭaka** complete: Bhikkhu Vibhaṅga 222, Bhikkhunī Vibhaṅga 127, Khandhaka 22, Parivāra 51 + Pātimokkha 2 (~71,557 segments) — Pāli + Brahmali EN - **Abhidhamma Piṭaka** complete: 7 books (ds, vb, dt, pp, kv, ya, patthana) ~88,414 segments — Pāli only (bilara has no English for any Abhidhamma book) - **Total ~444,673 segments** in the DB ⚠️ **Known quirks:** - The schema carries duplicate legacy + SC-modern codes side by side: - Vinaya: `vin-v/vin-m/vin-c/vin-p` (legacy, segment_count = 0) alongside `pli-tv-bu-vb/pli-tv-bi-vb/pli-tv-kd/pli-tv-pvr` (active, populated). - Abhidhamma: `ym/pt` (legacy = 0) alongside `ya/patthana` (active). - **Use the `active` flag** — each nikaya carries `active: true/false` (true ⇔ `segment_count > 0`). Pick `active` nikayas; the others are metadata placeholders from an older migration. 🌐 **Languages:** Returns Pāli + Thai + English labels regardless of enabled set (these are metadata, not segment text). Text content follows ENABLED_LANGUAGES. Thai translations aren't loaded yet.

Takes no parameters.

get_reference

Get Citation

Build a proper citation string for a sutta. 💡 **Use this tool when:** - The user wants a citation for academic work, an article, or a reference. - You need to know the canonical location of a sutta (pitaka / nikāya). - You want a ready-to-use formatted citation string. 🔗 vs `get_sutta`: this tool returns metadata + citation only, no segments. Pair it with `get_sutta` when you want both the content and the citation.

Parameterssutta_idrequired

list_editions

List Translation Editions

List the translation editions available, with coverage stats. 💡 **Use this tool when:** - Before calling `compare_translations` or `get_sutta(edition=...)`, so you know which edition values are valid and worth comparing. - The user asks which editions are loaded in the DB. 🔍 **Filtering:** Filtered by the server's `TRIPITAKA_ENABLED_LANGUAGES` — when Thai is disabled the list is empty. Only enabled languages are returned. ⚠️ **Current state:** the DB mostly holds Pāli (default from SuttaCentral bilara) and English (bilara's translators). Thai editions (`dhiranandi`, `jayasaro`, `mbu`, `royal`) aren't indexed yet — the list returns empty until they're loaded.

Takes no parameters.

compare_translations

Compare Translations

Compare every available translation for a single segment. 💡 **Use this tool when:** - The user asks about the meaning/translation of a single Pāli line and wants to see multiple translators side-by-side. - Checking how different translators interpret the same line — technical terms like `dukkha`, `anattā`, `nibbāna` carry nuance that varies across translations. - Academic work that needs to quote multiple translations. 🔍 **vs `get_sutta`:** this tool targets a **single segment** (line level); `get_sutta` returns the **whole sutta**. To compare a whole sutta you'd call `compare_translations` for each segment. 📋 **segment_id format:** `<sutta_id>:<paragraph>.<line>`, e.g. `mn1:171.4` (Mūlapariyāyasutta paragraph 171 line 4 — "Nandī dukkhassa mūlaṁ"). Find segment_ids via `get_sutta` or search results. ⚠️ **Current state:** the `translation` table is mostly empty (the DB only loads default Pāli + English from bilara). `total_editions` is usually 0; `text_pali` and `text_english` are always populated. Thai editions will be added later.

Parameterssegment_idrequired

get_word_definition

Get Word Definition

Look up the dictionary meaning of a Pāli word, with sutta context. Serves as a Pāli Dictionary Bridge — pairs the "definition" with the "context where the Buddha actually used the word". 📖 **About the dictionary sources:** This tool draws from multiple primary dictionaries, including "พจนานุกรมพุทธศาสน์ ฉบับประมวลศัพท์" (Buddhist Dictionary — Concept-Glossary edition) by Somdet Phra Buddhaghosacariya (P. A. Payutto). The Thai-language entries are **original scholarly works** (not translations), so they are **always available** even when ENABLED_LANGUAGES has Thai disabled. The AI client should translate Thai entries into the user's language if needed. 🔀 **Two kinds of thing in one payload.** `definitions[]` come from the dictionaries, not the canon, so they carry **no `segment_id`**; `appears_in_context[]` is corpus text and does carry one. `related_words[]` are headwords holding your query as a substring, so opposites appear — `dhamma` returns `adhamma`. Context examples are drawn at random: two identical calls return different ones.

Parameterswordrequiredlanguagelimit_context

verify_quote

Verify Quote

Verify, check, or confirm a Buddha quote — does the canon really say it? Fact-check a quotation attributed to the Buddha. Catches fake, misquoted, misattributed and misremembered passages, and finds the true reading. Paste a line that has been quoted or half-remembered — Pāli or English — and this says whether the canon really contains it, cites where, and if not, shows the closest thing that is actually there. 🧭 **When to use this:** - A quote is attributed to the Buddha and you are not certain it is real. A fabricated line that *sounds* canonical is the hardest error to catch by reading, because it reads correctly. Check it instead of trusting it. - Someone recalls a passage imperfectly, or a chanted form has drifted from the written one. The tool shows the received text beside theirs. - **Before repeating any Pāli you did not get from these tools**, verify it. This is cheap and it is the difference between citing and guessing. ⚠️ **Do not present an unverified passage as canonical.** If the verdict is `not_found`, say plainly that the line is not in the canon rather than quoting it with a hedge — a hedged fabrication still spreads. ⚖️ **Verdict thresholds.** `exact` = `contained` **or** `similarity` ≥ 0.995; `close` = `coverage` ≥ 0.85 **and** `similarity` ≥ 0.55; else `not_found`. `exact` means letters matched once folded, not that a human confirmed the reading. Matches also carry `coverage` (your letters present, in order), `contained` (present whole) and `spans` (segments joined; >1 → `segment_id` is the first only).

Parameterstextrequiredlimit

define_from_suttas

Define From Suttas

Find how the **suttas and Vinaya define a Pāli term in their own words**. The canon defines its own terms with fixed formulas — "Katamañca … dukkhaṁ?" (what is X?) … "ayaṁ vuccati … dukkhaṁ" (this is called X), "X adhivacana" (X is a designation for …), or the Vinaya "X nāma". This tool locates those definitional passages and returns them **cited**, so the assistant can present the doctrinal essence straight from the source. 🧭 **This tool vs `get_word_definition`:** - **`define_from_suttas`** → the *doctrinal* definition, how the term is defined **inside the canon**. Use for "how do the suttas define X", "what is the canonical definition of X", "define X from the suttas". Returns a few precise segments, not a lexicon essay. - **`get_word_definition`** → the *lexical* definition from dictionaries (Payutto / PTS / DPPN). Use for etymology and word meaning. They complement each other — offer both when the user wants the full picture (dictionary sense + how the Buddha defined it). 📖 **How to present the result:** Results are ranked; the top one is usually the canonical definition. **Quote the Pāli (and English where present) verbatim** and render each `cross_reference.tripitaka_mcp_reader.segment_url` as clickable markdown so the user can verify. Do NOT paraphrase into your own definition — the point is the canon's own words. Each result is tagged `kind` (direct / simile) and `detail` (descriptive / enumerative); a *descriptive* definition characterises the term, an *enumerative* one lists its types — prefer the descriptive when explaining the essence. ⚠️ A result tagged `context: true` **does not contain the term in its own line**. The canon's stock similes attach to a formula rather than to a word: the four jhāna similes (bath powder, deep lake, lotus pond, white cloth) never say *jhāna*, they illustrate the `vivicceva kāmehi …` formula that opens the paragraph. Such rows are found through that paragraph, so **say so when quoting one** — present it as th

Parameterstermrequiredlimitinclude_similes

parse_pali_word

Parse Pāli Word

Strip Pāli inflectional suffixes to find the root form (basic stem). 💡 **Use this tool when:** - You find an inflected Pāli word (e.g. `dukkhassa`, `bhikkhūnaṁ`) and `get_word_definition` doesn't find it directly — Pāli inflects nouns across 7 cases × 2 numbers, ~16 forms per root. - You want to see possible stems before another `get_word_definition` lookup. 🔄 **Recommended workflow:** `parse_pali_word(inflected_form)` → get `possible_stems[]` → call `get_word_definition(stem)` per stem until you find a definition. ⚠️ **Limitations:** - Rule-based first-pass — strips common suffixes (case endings, vowel shortening). Not a full morphological analyzer. - Compound words (samāsa) are NOT split — `dukkhanirodha` won't be broken into `dukkha` + `nirodha`. - Sandhi (sound junctions) like `tena ahaṁ → tenāhaṁ` aren't reversed. - Returns **possible** stems — verify each via `get_word_definition`. ⚠️ **`possible_stems` are rule output, not findings.** They come from the suffix table applied to your input — nothing was looked up, so no field carries a `segment_id`, and some candidates are not Pāli words at all. Treat each as a spelling to try in `get_word_definition`, never as an attested form.

Parameterswordrequired

open_sutta_viewer

Open Sutta Viewer

Open an interactive sutta viewer inside the chat — Pāli + English, plus an optional third row in the user's own language translated BY YOU. Renders each segment as: Pāli on top (canonical), the bilara-data English below it (verification anchor), and — when you supply `translations` — your translation in the user's language, clearly badged as AI-generated. Prefer this over dumping raw segments when the user wants to *read* a sutta. - `sutta_id` — standard SuttaCentral id, e.g. `sn56.11`, `mn10`, `dn22`. - `around` — a segment_id (e.g. `dn22:18.1`, from a search hit) to centre on; that segment is highlighted and scrolled into view. Use this after a search so the reader lands on the exact cited line. - `offset` — 0-based segment index for paging long suttas (use `next_offset` from the previous result). Do NOT combine with `around`. - `window` — segments before/after `around` to include (default 12). 🌐 **Translating for the user (important):** when the conversation language is neither English nor Pāli, you SHOULD translate the displayed segments and pass them via `translations` so the user reads in their own language while still seeing the originals: 1. Fetch the segments first (`get_sutta` with the same selector) so you have the exact Pāli + English text. (Already called this tool without translations? The result contains the segments — translate them and call this tool AGAIN with the same selector plus `translations` to upgrade the view.) Your translation must travel through the `translations` parameter to appear in the viewer — writing it as a normal chat message leaves the viewer bilingual and looks broken; the tool always accepts `translations`, so never report it as missing. 2. Translate **from the Pāli as the source, using the English as a semantic guide** — never relay-translate from English alone. Preserve untranslatable doctrinal terms (dukkha, jhāna, taṇhā…) as loanwords with a brief gloss instead of forcing equivalents

Parametersaroundoffsetwindowsutta_idrequiredtranslationstranslation_languagetranslation_disclaimer

Version history

1
  1. v1.3.0LatestSep 16, 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.