# Sacred Scriptures Mcp

> A Model Context Protocol server providing AI assistants with access to sacred scriptures from major world religions including Christianity, Islam, Judaism, Hinduism, Buddhism, and Taoism.

- **Type:** MCP server
- **Install:** `agentstack add mcp-traves-theberge-sacred-scriptures-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Traves-Theberge](https://agentstack.voostack.com/s/traves-theberge)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Traves-Theberge](https://github.com/Traves-Theberge)
- **Source:** https://github.com/Traves-Theberge/sacred-scriptures-mcp

## Install

```sh
agentstack add mcp-traves-theberge-sacred-scriptures-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Sacred Scriptures MCP

A comprehensive [Model Context Protocol (MCP)](https://modelcontextprotocol.io) 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:**
```bash
git clone https://github.com/your-username/sacred-scriptures-mcp.git
cd sacred-scriptures-mcp
```

2. **Run the setup script:**
```bash
chmod +x setup.sh
./setup.sh
```

3. **Start the server:**
```bash
npm start
```

### Manual Installation

1. **Install dependencies:**
```bash
npm install
```

2. **Build the project:**
```bash
npm run build
```

3. **Configure environment:**
```bash
cp config.example.env .env
```

4. **Add your data files to the `data/` directory** (see [Data Files](#data-files) section)

5. **Start the server:**
```bash
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:**
```json
{
  "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:**
```json
{
  "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:**
```json
{
  "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:**
```json
{
  "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:

```env
# 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:**
```bash
docker build -t sacred-scriptures-mcp .
```

2. **Run the container:**
```bash
docker run -p 3000:3000 -v $(pwd)/data:/app/data sacred-scriptures-mcp
```

### Using Docker Compose

```bash
docker-compose up -d
```

## Production Deployment

### Environment Setup

1. **Set production environment variables:**
```bash
export NODE_ENV=production
export LOG_LEVEL=warn
export DATA_PATH=/app/data
```

2. **Build for production:**
```bash
npm run build
```

3. **Start with process manager:**
```bash
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
```bash
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
```bash
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 [LICENSE](LICENSE) file for details.

## Acknowledgments

- Sacred scripture data sources:
  - [Tao Te Ching](https://github.com/dionysuzx/tao-te-ching)
  - [Tanakh](https://github.com/MarkBuffalo/gen-tanakh)
  - Various public domain sacred scripture collections

## 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.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Traves-Theberge](https://github.com/Traves-Theberge)
- **Source:** [Traves-Theberge/sacred-scriptures-mcp](https://github.com/Traves-Theberge/sacred-scriptures-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-traves-theberge-sacred-scriptures-mcp
- Seller: https://agentstack.voostack.com/s/traves-theberge
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
