https://github.com/sivan22/mcp-sefaria-server
Fetch and read Jewish texts through the API of Sefaria.org
https://github.com/sivan22/mcp-sefaria-server
Last synced: 3 months ago
JSON representation
Fetch and read Jewish texts through the API of Sefaria.org
- Host: GitHub
- URL: https://github.com/sivan22/mcp-sefaria-server
- Owner: Sivan22
- License: mit
- Created: 2024-12-22T21:55:59.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-05-05T23:51:56.000Z (5 months ago)
- Last Synced: 2025-06-17T13:14:48.053Z (4 months ago)
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 20
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://smithery.ai/server/mcp-sefaria-server)
# Sefaria Jewish Library MCP Server
An MCP ([Model Context Protocol](https://docs.anthropic.com/en/docs/agents-and-tools/mcp)) server that provides access to Jewish texts from the [Sefaria](https://www.sefaria.org/) 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
- Get daily/weekly learning schedule from Sefaria's calendar## Installation
Requires Python 3.10 or higher.
### Clone the repository
```bash
git clone https://github.com/sivan22/mcp-sefaria-server.git
cd mcp-sefaria-server
```### Running the Server
The server can be run directly:
```bash
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 you should use the following config:
```
{
"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](https://smithery.ai/server/mcp-sefaria-server):
```bash
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.
Example:
```
reference: "Genesis 1:1"
reference: "שמות פרק ב פסוק ג"
reference: "משנה ברכות פרק א משנה א"
```### get_commentaries
Retrieves a list of commentaries for a given text.
Example:
```
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
```### get_daily_learnings
Retrieves the daily or weekly learning schedule from Sefaria's calendar API.
Parameters (all optional):
- `diaspora` (boolean): When true, returns weekly Torah reading for diaspora. When false, returns Torah reading for Israel. Default: true
- `custom` (string): If available, the weekly Haftarah will be returned for the selected custom
- `year`, `month`, `day` (integers): Specific date (all three must be used together, or API falls back to current date)
- `timezone` (string): Timezone name in accordance with IANA StandardsExample:
```
# Get current day's learning schedule
{}# Get learning schedule for a specific date in Israel
{
"diaspora": false,
"year": 2024,
"month": 12,
"day": 25,
"timezone": "Asia/Jerusalem"
}
```Returns a formatted schedule including:
- Weekly Torah portion (Parashat Hashavua) with aliyot
- Haftarah reading
- Daf Yomi (daily Talmud page)
- Daily Mishnah, Rambam, and other learning cycles
- Various Jewish learning programs and their daily selections## Development
This project uses:
- [MCP SDK](https://github.com/modelcontextprotocol/sdk) for server implementation
- [Sefaria API](https://github.com/Sefaria/Sefaria-API) for accessing Jewish texts
## Requirements
- Python >= 3.10
- MCP SDK >= 1.1.1
- Sefaria API## License
MIT License