SS

sefaria/sefaria-mcp

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

28 stars 14 forks 质量 64 趋势 8MIT

Sefaria 的 FastMCP 服务器

概览

一个现代MCP(模型上下文协议)服务器,通过Sefaria API访问犹太图书馆。 该服务器将 Sefaria Jewish 库展示为一组 14 个 MCP 工具,允许大型语言模型(LLM)及其他 MCP 客户端: - - 通过参考检索犹太文本(例如“创世纪1:1”)- - 在整个犹太图书馆中搜索- - 获取犹太历法的情境信息。当托拉阅读时间表不一致时,接受侨民(对侨民为真,对以色列为假)。 - - 寻找文本间的交叉引用和联系 - - 在特定书籍或文本作品内搜索 - - 搜索犹太参考词典 - - 检索文本所有可用的英文翻译 - - 获取犹太思想主题的详细信息 - - 自动补全并验证文本名称、书名和主题 - - 将书籍名称转换为合适的搜索筛选路径 - - 探索文本和类别的层级结构- - 获取作品的书目和结构信息(索引) - -...

概述(AI 翻译)

一个现代MCP(模型上下文协议)服务器,通过Sefaria API访问犹太图书馆。

这个服务器是干什么的?

该服务器将 Sefaria Jewish 库展示为一组 14 个 MCP 工具,允许大型语言模型(LLM)及其他 MCP 客户端:

主要工具:

  • get_text - 通过引用检索犹太文本(例如,“创世纪1:1”)
  • text_search - 在整个犹太图书馆中搜索
  • get_current_calendar - 获取犹太历法的具体情况信息。接受diaspora(true代表侨民,false代表以色列)在托拉阅读时间表不一致时使用。

核心工具:

  • get_links_between_texts - 寻找文本间的交叉引用和联系
  • search_in_book - 在特定书籍或文本作品内搜索
  • search_in_dictionaries - 搜索犹太参考词典

支持工具:

  • get_english_translations - 检索文本的所有可用英文翻译
  • get_topic_details - 获取犹太思想主题的详细信息
  • clarify_name_argument - 自动补全并验证文本名称、书名和主题
  • clarify_search_path_filter - 将书名转换为正确的搜索筛选路径

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Sefaria MCP Server

A modern MCP (Model Context Protocol) server for accessing the Jewish library via the Sefaria API.

What does this server do?

This server exposes the Sefaria Jewish library as a set of 14 MCP tools, allowing LLMs and other MCP clients to:

Primary Tools:

  • get_text - Retrieve Jewish texts by reference (e.g., “Genesis 1:1”)
  • text_search - Search across the entire Jewish library
  • get_current_calendar - Get situational Jewish calendar information. Accepts diaspora (true for Diaspora, false for Israel) for weeks when Torah reading schedules diverge.

Core Tools:

  • get_links_between_texts - Find cross-references and connections between texts
  • search_in_book - Search within a specific book or text work
  • search_in_dictionaries - Search Jewish reference dictionaries

Support Tools:

  • get_english_translations - Retrieve all available English translations for a text
  • get_topic_details - Retrieve detailed information about topics in Jewish thought
  • clarify_name_argument - Autocomplete and validate text names, book titles, and topics
  • clarify_search_path_filter - Convert book names to proper search filter paths

Structure Tools:

  • get_text_or_category_shape - Explore the hierarchical structure of texts and categories
  • get_text_catalogue_info - Get bibliographic and structural information (index) for a work

Manuscript Tools:

  • get_available_manuscripts - Access historical manuscript metadata and image URLs
  • get_manuscript_image - Download and process specific manuscript images

All endpoints are optimized for LLM consumption (compact, relevant, and structured responses).

What is MCP?

MCP (Model Context Protocol) is an open protocol for connecting Large Language Models (LLMs) to external tools, APIs, and knowledge sources. It enables LLMs to retrieve, reference, and interact with structured data and external services in a standardized way. Learn more in the MCP documentation.

How to Run

Prerequisites

  • Python 3.10+
  • Docker (optional, for containerized deployment)

Local Development

  1. Install dependencies:
    pip install -e .
    
  2. Run the server:
    python -m sefaria_mcp.main
    
    The server will be available at http://127.0.0.1:8088/mcp by default, with the legacy SSE endpoint at http://127.0.0.1:8088/sse. Set SEFARIA_MCP_PORT to override the HTTP port (e.g., SEFARIA_MCP_PORT=8089 python -m sefaria_mcp.main). Prometheus metrics bind separately on SEFARIA_MCP_METRICS_PORT (default 9090).

Configuration

Variable Default Purpose
SEFARIA_MCP_HOST 0.0.0.0 Interface the HTTP server binds to
SEFARIA_MCP_PORT 8088 Port serving both /mcp and /sse
在 GitHub 查看完整 README

安装

docker run -d --name sefaria-mcp \
新手?先看 mcpskill.org 教程 →