Zayit MCP
MCP server for the Zayit Jewish texts library โ SQLite + Lucene 10, 7 tools, stdio & HTTP
Ask AI about Zayit MCP
Powered by Claude ยท Grounded in docs
I know everything about Zayit MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Zayit MCP Server
An MCP (Model Context Protocol) server that exposes the Zayit Jewish texts library to AI assistants. Wraps Zayit's SQLite database and Lucene search indices โ no network required, fully offline.
Prerequisites
- Zayit installed on the same machine (provides the database and Lucene indices)
- Java 21+ โ required by Lucene 10.x
Installing Java 21
| Platform | Command |
|---|---|
| Windows | winget install EclipseAdoptium.Temurin.21.JDK |
| macOS | brew install --cask temurin@21 |
| Ubuntu/Debian | sudo apt install temurin-21-jdk (add Adoptium repo first) |
| Fedora/RHEL | sudo dnf install temurin-21-jdk |
Building
The Gradle wrapper is included โ no separate Gradle installation needed.
# Linux / macOS
chmod +x gradlew
./gradlew shadowJar
# Windows
gradlew.bat shadowJar
Output: build/libs/zayit-mcp.jar (~35 MB, self-contained)
Running
stdio mode (for Claude Desktop / MCP clients)
# Linux / macOS
chmod +x run-stdio.sh
./run-stdio.sh
# Windows
run-stdio.bat
HTTP / SSE mode (for testing or remote access)
# Linux / macOS
./run-http.sh 3001
# Windows
run-http.bat 3001
The MCP endpoint is at http://localhost:3001/mcp.
Custom data directory
If Zayit stores its data somewhere non-standard, set ZAYIT_DATA_DIR:
ZAYIT_DATA_DIR=/path/to/databases ./run-stdio.sh
Data paths (auto-detected per OS)
| Platform | Path |
|---|---|
| Windows | %APPDATA%\io.github.kdroidfilter.seforimapp\databases |
| macOS | ~/Library/Application Support/io.github.kdroidfilter.seforimapp/databases |
| Linux | ~/.local/share/io.github.kdroidfilter.seforimapp/databases (XDG) |
Claude Desktop configuration
Windows
%APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"zayit": {
"command": "C:\\path\\to\\zayit-mcp\\run-stdio.bat"
}
}
}
macOS / Linux
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
~/.config/Claude/claude_desktop_config.json (Linux):
{
"mcpServers": {
"zayit": {
"command": "/path/to/zayit-mcp/run-stdio.sh"
}
}
}
Tools
search_books
Search for books by title using SQLite LIKE.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Hebrew or partial title |
limit | integer | 20 | Max results |
Returns: id | title | category | lines=N [primary]
Example: query="ืืจืืฉืืช" โ ืืจืืฉืืช, ืืจืืฉืืช ืจืื, ืืืืช ืืจืืฉืืช โฆ
search_ref
Fast prefix lookup via the Lucene reference index.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Title prefix (Hebrew) |
limit | integer | 10 | Max results |
Returns: book_id=N | title
get_text
Retrieve lines from a book by numeric ID with pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id | integer | required | From search_books or search_ref |
offset | integer | 0 | Line offset |
limit | integer | 50 | Lines to return (max 200) |
get_text_by_ref
Retrieve text by Hebrew reference string โ the ergonomic alternative to get_text.
| Parameter | Type | Default | Description |
|---|---|---|---|
ref | string | required | e.g. ืืจืืฉืืช ื, ื or ืืจืืืช ื |
context | integer | 2 | Lines of context before/after each hit |
limit | integer | 10 | Max hits |
Returns: Matched line (marked โบ) with surrounding context, across all books containing that reference.
Example: ref="ืืจืืฉืืช ื, ื" finds Genesis 1:1 in the base text plus every commentary quoting it.
get_book_toc
Get the hierarchical chapter/section table of contents for a book.
| Parameter | Type | Description |
|---|---|---|
book_id | integer | Book ID |
Returns: Indented TOC with line_id pointers per section. Use the line_id values as offset in get_text.
Example output:
โธ ืืจืืฉืืช โ line_id=1
โข ืคืจืง ื โ line_id=2
โข ืคืจืง ื โ line_id=34
...
get_links
Cross-references for a book or specific line, from the link table.
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id | integer | required | Book to find links for |
line_id | integer | โ | Restrict to a specific line |
connection_type | string | โ | Commentary, Targum, Reference, Source, Other |
limit | integer | 30 | Max links |
Returns: Source and target refs with 120-char text snippets and connection type.
text_search
Full-text search across all ~6,000 books using Lucene. Nikud and teamim are stripped automatically; final letters (ืโื, ืโื, ืโื , ืฃโืค, ืฅโืฆ) are normalized.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Lucene query (see syntax below) |
book_id | integer | โ | Restrict to one book |
limit | integer | 20 | Max results |
offset | integer | 0 | Pagination offset |
Lucene query syntax:
| Syntax | Example | Meaning |
|---|---|---|
| Terms (AND by default) | ืชืืจื ืืฉื | both words must appear |
| Explicit OR | ืืืจืื OR ืืฆืืง | either word |
| Exclude | ืชืืจื -ืืฉื ื | ืชืืจื without ืืฉื ื |
| Phrase | "ืืืืืช ืืจืขื ืืืื" | exact phrase |
| Prefix wildcard | ืืจื* | ืืจื, ืืจืืฉืืช, ืืจืื โฆ |
| Single-char wildcard | ื?ืืฉืืช | |
| Fuzzy | ืฉืืื~ | similar spelling |
| Proximity | "ืชืืจื ืืฉื"~5 | within 5 words of each other |
| Grouping | (ืืืจืื OR ืืฆืืง) ืฉืจื |
Architecture
AI client
โ MCP JSON-RPC (stdio or HTTP/SSE)
โผ
zayit-mcp.jar
โโโ SQLite (seforim.db) โ search_books, get_text, get_text_by_ref,
โ get_book_toc, get_links
โโโ Lucene (seforim.db.lucene, โ text_search, search_ref
seforim.db.lookup.lucene)
Stack: Kotlin 2.3 ยท MCP SDK 0.12.0 ยท Lucene 10.3.2 ยท SQLite JDBC 3.49 ยท Ktor 3.1 (HTTP mode)
