sacred-texts-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sacred-texts-mcpsemantically search 'compassion' in Buddhist texts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sacred-texts-mcp
A local Model Context Protocol server for semantic search, close-reading, and cross-tradition comparison across sacred, mythological, and foundational texts.
It turns heterogeneous source material into citable textual units, embeds them in a filtered vector index, and gives AI clients seven focused tools for retrieval and textual analysis.
What you can do
Search passages by meaning across multiple traditions and works.
Find cross-cultural parallels starting from a known passage.
Retrieve complete, citable passages instead of isolated search snippets.
Search exact words, lemmas, and Strong numbers where lexical data exists.
Inspect original-language tokens, morphology, and translation alignment.
Discover which works are available and what kind of analysis each supports.
Example questions:
Where do flood narratives appear across different traditions?
Which creation passages resemble Genesis 1:1?
How is a specific Hebrew or Greek lemma used across the indexed texts?
See real tool output from three example sessions.
Related MCP server: textual-criticism-mcp
How it works
flowchart LR
A[Heterogeneous sources] --> B[Format-aware parsers]
B --> C[Citable text units]
C --> D[Gemini embeddings]
D --> E[(SQLite + sqlite-vec)]
E --> F[FastMCP server]
F --> G[Codex, Claude Code, or another MCP client]The index is local and distributed as a single SQLite file. No API key is needed to search the prebuilt public index. A Gemini API key is required only if you choose to rebuild its embeddings.
For implementation details, see Architecture and Normalization.
MCP tools
Tool | Purpose |
| List available works, traditions, unit counts, and original-language coverage |
| Search by meaning, optionally filtered by tradition or work |
| Find passages semantically close to a known reference |
| Search exact terms, lemmas, or Strong numbers |
| Inspect word-level apparatus for one passage |
| Retrieve a passage with optional surrounding context |
| Retrieve a continuous range within one work |
Quick start
1. Install
Requirements: Git and Python 3.10 or newer.
git clone https://github.com/alessandrodalpozzo/sacred-texts-mcp.git
cd sacred-texts-mcp
python -m pip install -r requirements.txtOn Windows, use py -3 instead of python if Python is installed through
the Windows launcher.
2. Download the prebuilt index
Download
index-open.db from the latest release
and save it locally as:
data/index.dbThe names differ intentionally: index-open.db is the downloadable release
asset; data/index.db is the path expected by the server.
PowerShell:
Invoke-WebRequest `
-Uri "https://github.com/alessandrodalpozzo/sacred-texts-mcp/releases/latest/download/index-open.db" `
-OutFile "data/index.db"macOS or Linux:
curl -L \
https://github.com/alessandrodalpozzo/sacred-texts-mcp/releases/latest/download/index-open.db \
-o data/index.db3. Connect an MCP client
Codex
The project-scoped .codex/config.toml registers the
server automatically. Open the repository as a trusted project, restart
Codex, and check Settings > MCP servers or run /mcp.
Codex reads the project instructions from AGENTS.md.
Claude Code
Claude Code discovers the committed .mcp.json automatically.
Its one-line CLAUDE.md imports AGENTS.md, so Claude and
Codex follow the same project guidance.
You can also register the server manually:
claude mcp add sacred-texts -- python /absolute/path/to/sacred-texts-mcp/server/mcp_server.pyOther MCP clients
Configure a standard stdio server with:
{
"command": "python",
"args": ["/absolute/path/to/sacred-texts-mcp/server/mcp_server.py"]
}Rebuilding the index
The repository includes the compressed open corpus, so a rebuild does not require downloading the original source collection:
cp .env.example .env
# Add GEMINI_API_KEY to .env
python index/build_index.pyRebuilding is optional. The released index is ready for local retrieval.
Engineering highlights
Format-aware ingestion: reusable parsers normalize TSV, TEI XML, JSON, HTML, OCR-derived text, PDFs, and Wikisource material.
Citation-preserving chunking: retrieval units follow each work's own verse, section, chapter, or tablet structure rather than arbitrary character windows.
Incremental embedding pipeline: unchanged units are detected and are not embedded again.
Native filtered vector search: work and tradition metadata participate directly in SQLite vector retrieval.
Self-correcting tool interface: ambiguous work or tradition names return candidates that an MCP client can use to refine its request.
License-aware publishing: the public export is mechanically restricted to works approved for redistribution.
Automated verification: tests cover corpus schemas, indexing, query behavior, vocabulary resolution, diffing, and public-export enforcement.
Documentation
Document | Contents |
Pipeline, storage, retrieval, and design decisions | |
Source-format problems and normalization choices | |
Included and excluded sources, licenses, and attribution | |
Real MCP calls and outputs | |
Authoritative per-work source and redistribution status |
Scope and limitations
The public artifacts include only openly licensed or public-domain material. They are a curated subset of the editions supported by the ingestion pipeline, not a comprehensive library of every sacred or ancient text.
Semantic similarity is a retrieval aid, not a historical or theological judgment. Results depend on the available edition, translation, and embedding quality. Some works are translation-only and therefore do not support word-level analysis.
This project applies the same neutral retrieval interface to every tradition and does not endorse a theological interpretation. See Data sources and licensing for the exact public scope.
License
The source code is released under the MIT License. Textual data
retains its original per-work license and attribution as recorded in
data/work_licenses.tsv.
This server cannot be deployed
Maintenance
Related MCP Connectors
Bible corpus MCP server: scripture, Greek/Hebrew interlinear data, cross-refs, semantic search.
Citation-oriented retrieval across six religious traditions
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Read-only semantic search over Vedic scripture verses, commentaries, and recorded lectures.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceFree, open MCP server for The Urantia Papers — full-text and semantic search across 197 papers, 14,500+ paragraphs, and 4,400+ named entities.MIT- AlicenseNot gradedqualityDmaintenanceBiblical text analysis with textual criticism support. An MCP server for morphological analysis, manuscript variants, and concordance searches across Hebrew and Greek biblical texts.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server to search and retrieve passages from a corpus of 7,872 classical Islamic books via the Sahifah API, with full citations and mu'tabar filtering.6 npmMIT
- FlicenseNot gradedqualityAmaintenanceAn MCP server for Christian scholarship and research, providing read-only access to a SQLite corpus of 66-book BSB and 83-book WEB Bibles, original-language Greek/Hebrew word studies with Strong's and morphology, cross-references, patristic citations (Irenaeus, Justin Martyr, Apostolic Fathers), verse alignments, semantic and hybrid search over ~55,800 embeddings, and multi-work passage retrieval, interlinear lookup, and research-brief synthesis prompts.2-