Sefaria API MCP
MCP server for accessing the Sefaria API - the largest open-source database of Jewish texts.
Description
This skill provides guidance and helper tools for using the Sefaria API MCP server. Access the complete library of Jewish texts including Torah, Talmud, Mishnah, commentaries, and more through a simple MCP interface.
Installation
- Clone the repository:
git clone https://github.com/davad00/sefaria-api-mcp.git
cd sefaria-api-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
Tools
connect
Starts the Sefaria API MCP server.
Arguments:
port(optional): Port number (default: 8080)
Example:
{
"name": "connect",
"arguments": {
"port": 8080
}
}
use
Shows example usage patterns for all available Sefaria MCP tools.
Example:
{
"name": "use"
}
Available MCP Tools
Once the MCP server is running, you have access to:
Text Retrieval
get_text- Get text by reference (e.g., 'Genesis 1:1', 'Shabbat 2b')get_text_v1- Legacy v1 text endpointget_random_text- Get random text segmentget_manuscripts- Get manuscript variants
Search & Discovery
search- Full-text search across libraryfind_refs- Parse text to find Sefaria referencesget_toc- Table of contents (all available texts)get_category- Texts in a specific category
Related Content
get_related- All related content (links, sheets, topics)get_links- Cross-references to other sourcesget_topics- Topic detailsget_all_topics- List all topicsget_ref_topic_links- Topics linked to a reference
Lookup
get_index- Text metadata (structure, versions)get_shape- Text structureget_lexicon- Hebrew word definitionsget_versions- Available translations
Calendar
get_calendars- Get today's Torah readings and Jewish calendar information
Example Usage
// Get Genesis 1:1
{
"name": "get_text",
"arguments": { "tref": "Genesis 1:1" }
}
// Search for "love"
{
"name": "search",
"arguments": { "q": "love", "limit": 5 }
}
// Parse references from text
{
"name": "find_refs",
"arguments": { "text": "As it says in Shabbat 31a" }
}
// Get today's readings
{
"name": "get_calendars"
}
Configuration
Add to your MCP configuration:
{
"mcpServers": {
"sefaria": {
"command": "node",
"args": ["path/to/sefaria-api-mcp/dist/index.js"]
}
}
}
Links
License
MIT License - Free to use, modify, and redistribute.
Support
For issues or questions:
- Open an issue on GitHub
- Check the Sefaria API docs