Skip to main content
Glama

Sefaria API MCP

License: MIT npm version

MCP (Model Context Protocol) server for accessing the Sefaria API - the largest open-source database of Jewish texts.

Features

This MCP provides AI agents with full access to:

  • Tanakh (Torah, Neviim, Ketuvim)

  • Talmud (Bavli and Yerushalmi)

  • Mishnah and other Rabbinic texts

  • Commentaries (Rashi, Tosafot, etc.)

  • Topics and cross-references

  • Search across the entire library

  • Calendar integration for daily readings

Related MCP server: Sefaria Jewish Library MCP Server

Installation

From GitHub

git clone https://github.com/davad00/sefaria-api-mcp.git
cd sefaria-api-mcp
npm install
npm run build

From npm (coming soon)

npm install -g sefaria-api-mcp

For ClawHub

This MCP includes a Claw skill in the skills/ directory. Install via ClawHub or manually:

# Clone and install
git clone https://github.com/davad00/sefaria-api-mcp.git
cd sefaria-api-mcp
npm install
npm run build

Quick Start

Running the MCP Server

npm start

Configure in Your MCP Client

Add to your MCP configuration file:

{
  "mcpServers": {
    "sefaria": {
      "command": "node",
      "args": ["path/to/sefaria-api-mcp/dist/index.js"]
    }
  }
}

Using the Claw Skill

The included skill provides helper tools:

  • connect - Start the MCP server

  • use - Show example usage patterns

Example Queries

// 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 about lighting candles" }
}

// Get today's Torah readings
{
  "name": "get_calendars"
}

// Explore related content
{
  "name": "get_related",
  "arguments": { "tref": "Genesis 1:1" }
}

API Tools

Text Retrieval

Tool

Description

get_text

Get text by reference (e.g., 'Genesis 1:1', 'Shabbat 2b')

get_text_v1

Legacy v1 text endpoint

get_random_text

Get random text segment

get_manuscripts

Get manuscript variants

Search & Discovery

Tool

Description

search

Full-text search across library

find_refs

Parse text to find Sefaria references

get_toc

Table of contents (all available texts)

get_category

Texts in a specific category

Tool

Description

get_related

All related content (links, sheets, topics)

get_links

Cross-references to other sources

get_topics

Topic details

get_all_topics

List all topics

get_ref_topic_links

Topics linked to a reference

Lookup

Tool

Description

get_index

Text metadata (structure, versions)

get_shape

Text structure

get_lexicon

Hebrew word definitions

get_versions

Available translations

Configuration

To use this MCP in your system, configure the connection:

{
  "mcpServers": {
    "sefaria": {
      "command": "node",
      "args": ["path/to/SefariaApiMcp/dist/index.js"]
    }
  }
}

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
{
  "name": "find_refs",
  "arguments": { "text": "As it says in Shabbat 31a about lighting candles" }
}

// Get today's readings
{
  "name": "get_calendars"
}

// Explore related content
{
  "name": "get_related",
  "arguments": { "tref": "Genesis 1:1" }
}

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Support

  • Open an issue on GitHub for bugs or feature requests

  • Check the Sefaria API docs for API details

  • Join the discussion on ClawHub

Acknowledgments

Built on top of the Sefaria API - the free living library of Jewish texts.

Available Tools

28 tools
find_refsA

Parse text to find all Sefaria references within it. Useful for extracting citations from a piece of text or converting modern references to traditional ones.

Inputs: text (required).

get_all_topicsB

Get a list of all topics in Sefaria's topic system.

Inputs: no named parameters.

get_calendarsA

Get today's Torah readings according to the Jewish calendar (daily readings, parashat haShavua, holidays, etc.).

Inputs: no named parameters.

get_categoryC

Get all texts in a specific category.

Inputs: category (required).

get_indexC

Get metadata about a specific text (its structure, available versions, categories, etc.).

Inputs: tref (required).

get_languagesA

Get list of all languages available in Sefaria.

Inputs: no named parameters.

get_lexiconA

Look up a Hebrew word in the Sefaria lexicon. Returns definitions, translations, and related words.

Inputs: word (required).

get_manuscriptsB

Get manuscript variants for a specific text reference.

Inputs: tref (required).

get_nameA

Get information about a specific name in Sefaria (Rabbi, place, etc.).

Inputs: name (required).

get_next_readC

Get the next recommended reading based on a reference.

Inputs: tref (required).

get_random_by_topicB

Get a random text segment related to a specific topic.

Inputs: topic (required).

get_random_textA

Get a random text segment from the Sefaria library. Useful for daily study suggestions or testing.

Inputs: no named parameters.

get_shapeB

Get the structure/shape of a text (number of chapters, sections, etc.).

Inputs: tref (required).

get_termsC

Get information about specific terms (Rabbis, concepts, etc.).

Inputs: terms (required).

get_textA

Retrieve a specific text passage from Sefaria by reference (e.g., 'Genesis 1:1', 'Shabbat 2b:10', 'Exodus 20:2-6'). This is the primary way to get text content for citations and study.

Inputs: tref (required), context, version, language.

get_text_v1B

Legacy v1 text endpoint. Use get_text instead when possible.

Inputs: tref (required), context, version, language.

get_tocA

Get the Table of Contents - a hierarchical list of all available texts in Sefaria organized by category (Torah, Neviim, Ketuvim, Talmud, etc.). Note: This is a large response (~4MB) and mostly static - consider caching.

Inputs: no named parameters.

get_topic_graphA

Get the topic graph showing relationships between topics.

Inputs: topic (required).

get_topicsC

Get details about a specific topic in Sefaria's topic system.

Inputs: topic (required).

get_translationsC

Get all translations available in a specific language.

Inputs: lang (required).

get_versionsA

Get all available versions/translations for a specific text.

Inputs: title (required).

get_word_completionC

Get autocomplete suggestions for Hebrew words.

Inputs: prefix (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 28 tools

    Disambiguation2/5

    Several tool clusters are hard to distinguish: get_text and get_text_v1 are near-duplicates, get_index and get_shape overlap on structure, and get_related/get_links/get_related_websites/get_ref_topic_links all point at related-content subsets. Descriptions help individually, but the boundaries between topics, terms, names, and related-content tools are muddy enough that an agent will frequently pick the wrong endpoint.

    Naming Consistency4/5

    The overwhelming majority of tools follow a clean get_<resource> snake_case pattern, which is very predictable. Minor deviations like get_text_v1 and the non-get_ verbs search and find_refs prevent a perfect score but do not significantly hurt navigability.

    Tool Count2/5

    At 28 tools, the surface exceeds the 25+ threshold for 'too many' and feels more like an API mirror than a curated MCP toolset. Many retrieval variants (topics, related content, versions/translations) could be consolidated into fewer, broader tools.

    Completeness4/5

    The set covers most of the read-only Sefaria domain: text retrieval, structure, versions, languages, topics, search, lexicon, calendars, manuscripts, and related content. The main gaps are minor workarounds, such as fetching a text in a specific version directly or getting calendar info for a date other than today.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      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.
      4
      35
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLMs to access and search Jewish texts from the Sefaria library through 15 MCP tools, including text retrieval, search, and manuscript access.
      28
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to access and query the Sefaria digital library of Jewish texts through natural language or direct tool calls.
      302 npm
      1
      MIT