MCP HubMCP Hub
Sivan22

mcp-otzaria-server

by: Sivan22

makes the jewish library accessible to LLMs through the MCP protocol

12created 18/12/2024
Visit
library
LLM

📌Overview

Purpose: To enable powerful search capabilities for Jewish texts and literature through a standardized interface for Large Language Models.

Overview: The Jewish Library MCP Server is an advanced Model Context Protocol (MCP) server designed for comprehensive search functionalities. It allows users to efficiently explore Jewish texts by leveraging sophisticated search techniques, ensuring accessible and relevant information retrieval.

Key Features:

  • Full-text search across Jewish texts and literature: Facilitates extensive searchability across a rich repository of Jewish literary works.

  • Advanced query syntax support: Includes field-specific searches, Boolean operators, required/excluded terms, phrase searches, and wildcards, making searches more precise and tailored to user needs.

  • Relevance-based scoring: Ranks search results based on their relevance, enhancing the user's ability to find pertinent information quickly.

  • Rich search results: Delivers detailed outputs that include references, topics, and highlighted excerpts, providing contextual insights directly within the search results.


Jewish Library MCP Server

An MCP (Model Context Protocol) server providing powerful search capabilities for Jewish texts and literature. This server enables Large Language Models to search and reference Jewish texts through a standardized interface.

Features

  • Full-text search across Jewish texts and literature
  • Advanced query syntax support:
    • Field-specific search (text:term, reference:term, topics:term)
    • Boolean operators (AND, OR)
    • Required/excluded terms (+term, -term)
    • Phrase search ('exact phrase')
    • Wildcards (?, *)
  • Relevance-based scoring
  • Rich search results including references, topics, and highlighted excerpts

Installation

Requires Python 3.10 or higher.

Clone the repository

git clone https://github.com/sivan22/mcp-otzaria-server.git
cd mcp-otzaria-server

Get the index

Download and extract the index from the provided link.

Install dependencies

pip install .

Running the Server

The server can be run directly:

uv --directory path/to/directory run jewish_library

Or through an MCP client that supports the Model Context Protocol.

For Claude desktop app and Cline use the following config:

{
  "mcpServers": {        
      "jewish_library": {
          "command": "uv",
          "args": [
              "--directory",
              "your/path/to/directory",
              "run",
              "jewish_library"
          ],
          "env": {
            "PYTHONIOENCODING": "utf-8" 
          }
      }
  }
}

Available Tools

The server provides a single tool through the MCP interface:

full_text_search

Performs a full-text search across the Jewish library with advanced query capabilities.

Example query formats:

# Basic search
"maimonides on prayer"

# Field-specific search
text:"love your neighbor" AND topics:mitzvot

# Required terms
+shabbat +candles

# Phrase search with topic filter
"four species" AND topics:sukkot

# Wildcard search
pray* AND reference:psalms

Search results include:

  • Reference information
  • Relevant topics
  • Highlighted excerpts showing query matches
  • Relevance score

Development

This project uses:

  • MCP SDK for server implementation
  • Tantivy for full-text search capabilities

Requirements

  • Python >= 3.10
  • MCP SDK >= 1.1.1
  • Tantivy search engine

License

MIT License