sacred-scriptures-mcp

Traves-Theberge/sacred-scriptures-mcp

3.1

If you are the rightful owner of sacred-scriptures-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Sacred Scriptures MCP is a comprehensive Model Context Protocol server providing AI assistants with access to sacred scriptures from major world religions.

Tools
6
Resources
0
Prompts
0

Sacred Scriptures MCP

A comprehensive Model Context Protocol (MCP) server that provides AI assistants with access to sacred scriptures from major world religions including Christianity, Islam, Judaism, Hinduism, Buddhism, Sikhism, and Taoism.

Features

  • ๐Ÿ” Advanced Search: Full-text search across multiple sacred scriptures with filtering by religion, book, chapter, language, and version
  • ๐Ÿ“š Multi-Religion Support: Christianity (KJV Bible), Islam (Quran), Judaism (Tanakh), Hinduism (Bhagavad Gita), Buddhism (Dhammapada), and Taoism (Tao Te Ching)
  • ๐ŸŒ Multiple Languages: Support for original languages (Hebrew, Sanskrit, Chinese) with English translations
  • ๐Ÿ“– Precise References: Retrieve specific verses by book, chapter, and verse number
  • ๐ŸŽฒ Random Texts: Get random verses for inspiration or study
  • โšก High Performance: Fast in-memory search with relevance scoring
  • ๐Ÿ”ง Production Ready: Comprehensive error handling, logging, and monitoring

Currently Available Sacred Scriptures

Christianity

  • King James Version (KJV) - Most popular English Bible translation (31,102 verses)

Islam

  • Quran (Sahih International) - Popular English translation (6,236 verses)

Judaism

  • Tanakh - Complete Hebrew Bible (Torah, Nevi'im, Ketuvim) (23,200 verses)

Hinduism

  • Bhagavad Gita - Sacred text with Sanskrit and English (700 verses across 18 chapters)

Buddhism

  • Dhammapada - Collection of Buddhist sayings (423 verses)

Taoism

  • Tao Te Ching - Fundamental text of Taoism by Laozi (81 chapters)

Planned Future Additions

Christianity

  • World English Bible (WEB) - High-quality public domain Bible
  • New International Version (NIV) - Modern English translation
  • English Standard Version (ESV) - Literal translation
  • New American Standard Bible (NASB) - Literal translation

Islam

  • Quran (Original Arabic) - Original Arabic text with transliteration
  • Sahih Bukhari - Authentic hadith collection
  • Sahih Muslim - Authentic hadith collection

Judaism

  • Torah (Hebrew) - Westminster Leningrad Codex with vowel points
  • Mishnah - Oral Torah compilation
  • Talmud - Rabbinic discussions of the Mishnah

Hinduism

  • Rig Veda - Ancient Hindu sacred text
  • Sama Veda - Vedic chants and melodies
  • Yajur Veda - Sacrificial formulas
  • Atharva Veda - Hymns and spells
  • Upanishads - Philosophical texts
  • Ramayana - Epic of Rama
  • Mahabharata - Great epic including the Bhagavad Gita

Buddhism

  • Tipitaka (Pali Canon) - Complete Pali Buddhist canon
  • Lotus Sutra - Mahayana Buddhist text
  • Heart Sutra - Core Mahayana teaching
  • Diamond Sutra - Perfection of wisdom text

Sikhism

  • Guru Granth Sahib - Central religious text of Sikhism
  • Dasam Granth - Secondary Sikh scripture

Jainism

  • Agamas - Canonical Jain texts
  • Tattvartha Sutra - Jain philosophy

Zoroastrianism

  • Avesta - Zoroastrian scriptures
  • Gathas - Hymns of Zoroaster

Other Traditions

  • Book of Mormon - Latter-day Saint scripture
  • Doctrine and Covenants - LDS revelations
  • Kitab-i-Aqdas - Bahรก'รญ most holy book
  • Kitab-i-Iqan - Bahรก'รญ book of certitude

Installation

Prerequisites

  • Node.js 18.0.0 or higher
  • npm or yarn package manager

Quick Setup

  1. Clone the repository:
git clone https://github.com/your-username/sacred-scriptures-mcp.git
cd sacred-scriptures-mcp
  1. Run the setup script:
chmod +x setup.sh
./setup.sh
  1. Start the server:
npm start

Manual Installation

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Configure environment:
cp config.example.env .env
  1. Add your data files to the data/ directory (see Data Files section)

  2. Start the server:

npm start

Data Files

The server expects JSON data files in the data/ directory. Currently included:

  • kjv_bible.json - King James Version Bible (31,102 verses)
  • quran_english.json - Quran (English translation) (6,236 verses)
  • tanakh.json - Hebrew Bible/Tanakh (23,200 verses)
  • bhagavad_gita_verses.json - Bhagavad Gita verses (700 verses)
  • bhagavad_gita_chapters.json - Bhagavad Gita chapter information
  • bhagavad_gita_translations.json - Bhagavad Gita translations
  • dhammapada.json - Buddhist Dhammapada (423 verses)
  • taoteching.json - Tao Te Ching (81 chapters)

MCP Tools

The server provides the following tools for AI assistants:

1. search_religious_texts

Search through sacred scriptures with advanced filtering options.

Parameters:

  • query (required): Search query text
  • religion (optional): Filter by religion (Christianity, Islam, Judaism, etc.)
  • book (optional): Filter by book name (Genesis, Matthew, Quran, etc.)
  • chapter (optional): Filter by chapter number
  • language (optional): Filter by language (English, Arabic, Hebrew, etc.)
  • version (optional): Filter by version (KJV, NIV, ESV, etc.)
  • limit (optional): Maximum results to return (default: 50)
  • offset (optional): Results to skip for pagination (default: 0)
  • exactMatch (optional): Exact phrase matching (default: false)

Example:

{
  "query": "love your neighbor",
  "religion": "Christianity",
  "book": "Matthew",
  "limit": 10
}

2. get_text_by_reference

Get specific sacred scripture by book, chapter, and verse reference.

Parameters:

  • book (required): Book name (e.g., Genesis, Matthew, Al-Fatiha)
  • chapter (required): Chapter number
  • verse (optional): Verse number (returns all verses if omitted)
  • religion (optional): Filter by religion to disambiguate book names

Example:

{
  "book": "John",
  "chapter": 3,
  "verse": 16,
  "religion": "Christianity"
}

3. get_random_text

Get a random sacred scripture, optionally filtered by religion.

Parameters:

  • religion (optional): Filter by religion

Example:

{
  "religion": "Buddhism"
}

4. list_available_religions

Get a list of all available religions in the database.

No parameters required.

5. list_available_books

Get a list of all available books, optionally filtered by religion.

Parameters:

  • religion (optional): Filter books by religion

Example:

{
  "religion": "Islam"
}

6. get_server_status

Get information about the server status and loaded data sources.

No parameters required.

Configuration

The server can be configured using environment variables in the .env file:

# Data Configuration
DATA_PATH=./data

# Server Configuration
MCP_SERVER_NAME=sacred-scriptures-mcp
MCP_SERVER_VERSION=1.0.0
LOG_LEVEL=info

# Performance Settings
MAX_SEARCH_RESULTS=100
SEARCH_TIMEOUT_MS=5000
CACHE_EXPIRY_HOURS=24

Development

Scripts

  • npm start - Start the server
  • npm run dev - Start in development mode
  • npm run build - Build TypeScript to JavaScript
  • npm test - Run tests (when available)

Project Structure

sacred-scriptures-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts              # Main server entry point
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ””โ”€โ”€ text-manager.ts   # Text management and search
โ”‚   โ”œโ”€โ”€ parsers/
โ”‚   โ”‚   โ”œโ”€โ”€ base.ts          # Base parser interface
โ”‚   โ”‚   โ””โ”€โ”€ json.ts          # JSON data parser
โ”‚   โ”œโ”€โ”€ sources/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts         # Data source configurations
โ”‚   โ””โ”€โ”€ types/
โ”‚       โ””โ”€โ”€ index.ts         # TypeScript type definitions
โ”œโ”€โ”€ data/                    # Sacred scripture data files
โ”œโ”€โ”€ config.example.env       # Example configuration
โ”œโ”€โ”€ package.json            # Node.js dependencies
โ”œโ”€โ”€ tsconfig.json           # TypeScript configuration
โ””โ”€โ”€ setup.sh               # Automated setup script

Docker Support

Using Docker

  1. Build the Docker image:
docker build -t sacred-scriptures-mcp .
  1. Run the container:
docker run -p 3000:3000 -v $(pwd)/data:/app/data sacred-scriptures-mcp

Using Docker Compose

docker-compose up -d

Production Deployment

Environment Setup

  1. Set production environment variables:
export NODE_ENV=production
export LOG_LEVEL=warn
export DATA_PATH=/app/data
  1. Build for production:
npm run build
  1. Start with process manager:
pm2 start dist/index.js --name sacred-scriptures-mcp

Health Checks

The server includes health check endpoints:

  • Status: Check server status and loaded data sources
  • Metrics: Get performance metrics and statistics

Monitoring

  • Server logs are written to stderr for easy collection
  • Graceful shutdown handling for SIGINT and SIGTERM
  • Comprehensive error handling with detailed error messages

API Examples

Search for verses about love

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "search_religious_texts",
      "arguments": {
        "query": "love",
        "religion": "Christianity",
        "limit": 5
      }
    }
  }'

Get a specific verse

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get_text_by_reference",
      "arguments": {
        "book": "John",
        "chapter": 3,
        "verse": 16
      }
    }
  }'

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Adding New Sacred Scriptures

  1. Add the data file to the data/ directory
  2. Update the TEXT_SOURCES configuration in src/sources/index.ts
  3. Create appropriate parser if needed
  4. Test the integration
  5. Update documentation

License

This project is licensed under the MIT License - see the file for details.

Acknowledgments

  • Sacred scripture data sources:

Support

For support, please open an issue on GitHub or contact the maintainers.

Changelog

Version 1.0.0

  • Initial release
  • Support for major world religions
  • Advanced search capabilities
  • MCP protocol implementation
  • Production-ready deployment

Note: This server is designed to work with AI assistants that support the Model Context Protocol (MCP). It provides read-only access to sacred scriptures for educational and research purposes.