MCP HubMCP Hub
Sivan22

mcp-sefaria-server

by: Sivan22

Fetch and read Jewish texts through the API of Sefaria.org

11created 22/12/2024
Visit
API
Jewish

📌Overview

Purpose: The Sefaria Jewish Library MCP Server is designed to provide seamless access to Jewish texts through a standardized Model Context Protocol (MCP) interface for Large Language Models.

Overview: This server harnesses the extensive Jewish library provided by Sefaria, allowing users to retrieve texts, commentaries, and search capabilities efficiently. It is implemented using the MCP SDK and interacts with the Sefaria API to provide relevant data.

Key Features:

  • Retrieve Jewish texts by reference: Users can obtain specific texts by inputting references, facilitating quick access to sacred materials.

  • Retrieve commentaries on a given text: The server allows users to access a curated list of commentaries for selected texts, enhancing understanding and interpretation.

  • Search the Jewish library for a query: Users can perform searches based on specific queries, enabling exploration of the library for relevant content.


Sefaria Jewish Library MCP Server

An MCP (Model Context Protocol) server that provides access to Jewish texts from the Sefaria library. This server enables Large Language Models to retrieve and reference Jewish texts through a standardized interface.

Features

  • Retrieve Jewish texts by reference
  • Retrieve commentaries on a given text
  • Search the Jewish library for a query

Installation

Requires Python 3.10 or higher.

Clone the repository

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

Running the Server

The server can be run directly:

uv --directory path/to/directory run sefaria_jewish_library

Or through an MCP client that supports the Model Context Protocol. For Claude Desktop app and Cline, use the following configuration:

{
  "mcpServers": {        
      "sefaria_jewish_library": {
          "command": "uv",
          "args": [
              "--directory",
              "absolute/path/to/mcp-sefaria-server",
              "run",
              "sefaria_jewish_library"
          ],
          "env": {
            "PYTHONIOENCODING": "utf-8" 
          }
      }
  }
}

Installing via Smithery

To install Sefaria Jewish Library for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-sefaria-server --client claude

Available tools

The server provides the following tools through the MCP interface:

get_text

Retrieves a specific Jewish text by its reference.

Examples:

reference: "Genesis 1:1"
reference: "שמות פרק ב פסוק ג"
reference: "משנה ברכות פרק א משנה א"

get_commentaries

Retrieves a list of commentaries for a given text.

Examples:

reference: "Genesis 1:1"
reference: "שמות פרק ב פסוק ג"
reference: "משנה ברכות פרק א משנה א"

search_texts

Searches for Jewish texts in the Sefaria library based on a query.

Example:

query: "moshiach"
slop: 1
filters: ["Talmud", "Bavli"]
size: 5

Development

This project uses:

  • MCP SDK for server implementation
  • Sefaria API for accessing Jewish texts

Requirements

  • Python >= 3.10
  • MCP SDK >= 1.1.1
  • Sefaria API

License

MIT License