mcp sefaria server
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.
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.
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.
Requires Python 3.10 or higher.
git clone https://github.com/sivan22/mcp-sefaria-server.git
cd mcp-sefaria-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 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"
}
}
}
}
To install Sefaria Jewish Library for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-sefaria-server --client claude
The server provides the following tools through the MCP interface:
Retrieves a specific Jewish text by its reference.
Example:
reference: "Genesis 1:1"
reference: "שמות פרק ב פסוק ג"
reference: "משנה ברכות פרק א משנה א"
Retrieves a list of commentaries for a given text.
Example:
reference: "Genesis 1:1"
reference: "שמות פרק ב פסוק ג"
reference: "משנה ברכות פרק א משנה א"
Searches for Jewish texts in the Sefaria library based on a query.
Example:
query: "moshiach"
slop: 1
filters: ["Talmud", "Bavli"]
size: 5
This project uses: - MCP SDK for server implementation - Sefaria API for accessing Jewish texts
MIT License
[
{
"description": "get a jewish text from the jewish library",
"inputSchema": {
"properties": {
"reference": {
"description": "The reference of the jewish text, e.g. 'ש×××× ×¢×¨×× ×××¨× ×××× ×¡××× ×' or 'Genesis 1:1'",
"type": "string"
}
},
"required": [
"reference"
],
"type": "object"
},
"name": "get_text"
},
{
"description": "get a list of references of commentaries for a jewish text",
"inputSchema": {
"properties": {
"reference": {
"description": "the reference of the jewish text, e.g. 'ש×××× ×¢×¨×× ×××¨× ×××× ×¡××× ×' or 'Genesis 1:1'",
"type": "string"
}
},
"required": [
"reference"
],
"type": "object"
},
"name": "get_commentaries"
},
{
"description": "search for jewish texts in the Sefaria library",
"inputSchema": {
"properties": {
"filters": {
"default": "[]",
"description": "Filters to apply to the text path in English (Examples: "Shulkhan Arukh", "maimonides", "talmud").",
"type": "list"
},
"query": {
"description": "The search query",
"type": "string"
},
"size": {
"default": 10,
"description": "Number of results to return.",
"type": "integer"
},
"slop": {
"default": 2,
"description": "The maximum distance between each query word in the resulting document. 0 means an exact match must be found.",
"type": "integer"
}
},
"required": [
"query"
],
"type": "object"
},
"name": "search_texts"
}
]