# fojin — Buddhist Canon Tools [Health: Active]

**Category:** 🔮 Spirituality & Esoterica  
**Repository:** https://github.com/xr843/fojin  
**GitHub Stars:** 359  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/fojin-buddhist-canon-tools

## Description
Buddhist canon tools: search, passages, cross-canon parallels, dictionaries — all URN-cited.

## Tools
Capabilities this server exposes over MCP:

- **search_corpus** — Semantic search across fojin's Buddhist corpus (10K+ texts, 30+ langs).

    Returns the most relevant passages, each with a `urn`, title, snippet and
    similarity score. `lang` optionally filters by language code
    (lzh=Classical Chinese, pi=Pali, sa=Sanskrit, bo=Tibetan, en=English).
    
- **read_passage** — Read the full content of one fascicle (卷) of a text, with its `urn`.

    Use the `text_id`/`juan_num` from a search_corpus hit. Returns the actual
    canonical text — quote from this, not from memory.
    
- **get_parallels** — Cross-canon parallel passages aligned to a fascicle.

    fojin's alignment moat: given a Chinese fascicle, returns the aligned
    Pali/Tibetan/Sanskrit parallels (each with its own `urn`) so you can compare
    how a passage is rendered across traditions.
    
- **lookup_dictionary** — Look up a Buddhist term across fojin's dictionaries (748K+ entries).
- **lookup_entity** — Search fojin's knowledge graph for entities — people, places, works,
    doctrinal terms — matching `query`.
- **resolve_urn** — Resolve a fojin URN (e.g. fojin:cbeta/T0001.1) to a reader URL and confirm
    it exists in the corpus. Use to verify or dereference a citation.
- **verify_quote** — Verify that a Buddhist-canon quote exists VERBATIM in the corpus.

    Call this before presenting any quoted scripture to a reader: LLMs
    routinely invent plausible-looking quotes. Returns `verbatim` (bool),
    where it was found (`matches`, each with a resolvable `urn`), or the
    closest near-miss window when it wasn't. `cite` optionally narrows the
    search — a CBETA id ("T0374") or fojin URN ("fojin:cbeta/T0374.13") —
    and `cite_matched` reports honestly whether the quote is where you
    claimed (a hit in a different fascicle does NOT confirm your citation).
    Quote must be ≥4 CJK chars after normalisation; Classical Chinese only.
    Short quotes are answered but say less: a four-character phrase recurs
    across the canon, so read `cite_matched` rather than `verbatim`, and check
    `matches_capped` before treating the list as complete. Each match carries
    an absolute `reader_url` — cite that, not a reconstructed third-party link.
    
- **commentaries** — What the historical commentators said about a passage of Buddhist scripture.

    Give a line of a sūtra and get back the classical commentaries that gloss
    it — each with the commentator's own words, the work it comes from, a
    quality tier, and a resolvable citation. This is the layer no other tool
    exposes for the Chinese canon: CBETA marks up almost none of it, and the
    alignment behind this was derived text by text.

    Two things to read carefully rather than skim. `total` is how many
    commentators the passage actually has — `truncated` says the list you got
    is a sample. And coverage is partial: roughly half of what a commentator
    wrote is not aligned, so an absent commentator means "not in the data",
    never "he said nothing". When nothing matches, `available_sutras` tells
    you which sūtras have data at all — do not read a miss as silence from the
    tradition.
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "fojin-buddhist-canon-tools": {
    "command": "uvx",
    "args": ["fojin-mcp"]
  }
}
```

## Documentation

## What fojin — Buddhist Canon Tools does

fojin — Buddhist Canon Tools provides an MCP interface to FoJin, a searchable aggregation of Buddhist texts and reference data.

The server exposes eight read-only tools. Retrieved content is addressable through FoJin URNs, allowing an assistant or developer to retain a stable reference to the source passage. The corpus described by the project includes material from 612 sources, more than 10,500 texts, and content in languages including Classical Chinese, Pali, Tibetan, and Sanskrit. The MCP listing does not describe write operations.

## How it works

An MCP client sends requests to the server using the Model Context Protocol. The tools query FoJin’s indexed corpus and return text or reference data that the assistant can use in its response. Search and passage retrieval support finding relevant material; cross-canon tools help compare related passages; dictionary tools provide terminology lookup.

The hosted service is available at `https://mcp.fojin.ai/mcp` and does not require installation or an API key. The project also publishes the `fojin-mcp` package for local stdio use. A local process can be started with `uvx fojin-mcp` or installed with pip, then configured to work with a local FoJin deployment.

## Setup and configuration

For the hosted option, add the MCP endpoint to a compatible client. The README gives this Claude command:

```bash
claude mcp add --transport http fojin https://mcp.fojin.ai/mcp
```

For local use, run:

```bash
uvx fojin-mcp
```

The repository also documents running the broader FoJin platform with Docker, importing source data, and generating embeddings. Those steps apply when operating a complete local FoJin instance, not when using the hosted MCP endpoint.

## Tools and capabilities

The server’s documented capability groups are:

- Searching the Buddhist canon
- Retrieving cited passages
- Finding cross-canon parallels
- Looking up dictionary entries
- Addressing sources through stable FoJin URNs
- Returning read-only results for use by MCP clients

fojin — Buddhist Canon Tools is a suitable fit when an agent needs to locate Buddhist source passages or compare traditions. It is less suited to workflows that require modifying corpus data or using MCP tools to write annotations, collections, or other records.

## Limitations and notes

The server is read-only, so the documented interface does not provide mutation tools. The repository’s corpus is assembled from external public sources, and the local platform setup starts with schema and source metadata rather than imported text; content import is required for a fully populated self-hosted deployment. The hosted endpoint avoids that local data-loading process.

The project describes citations as URN-linked and verifiable, but an MCP client still determines how retrieved passages are presented in its final answer. For reproducible research, preserve the returned citation and inspect the referenced source passage rather than relying only on a generated summary.

The fojin — Buddhist Canon Tools MCP server is focused on Buddhist textual research. Its documented coverage should not be treated as a general-purpose web search service or a general dictionary outside the indexed FoJin sources.

_Full upstream README: https://allmcps.com/mcp/fojin-buddhist-canon-tools/readme_

