Skip to content

unfoldingWord/translation-helps-mcp

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

792 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Translation Helps MCP Server v6.6.3

🚨 MAJOR UPDATE: 100% Real Data - Zero Mock Fallbacks

A comprehensive MCP (Model Context Protocol) server that provides AI agents with access to Bible translation resources from Door43's Content Service (DCS). This server enables AI assistants to fetch, process, and intelligently work with translation helps including scripture texts, translation notes, translation words, and translation questions.

πŸŽ‰ What's New in v6.6.3

Complete Architecture Overhaul

  • βœ… 100% Real Data - All mock data removed, every endpoint fetches from DCS
  • βœ… Unified Architecture - Single UnifiedResourceFetcher class handles all data
  • βœ… Markdown Support Everywhere - All endpoints support format=md for LLMs
  • βœ… Wrangler-Only Testing - Standardized on port 8787 with real KV/R2 bindings
  • βœ… No Mock Fallbacks - Real errors instead of fake success

Breaking Changes

Removed Endpoints:

  • /api/fetch-ult-scripture β†’ Use fetch-scripture?resource=ult
  • /api/fetch-ust-scripture β†’ Use fetch-scripture?resource=ust
  • /api/fetch-resources β†’ Use specific endpoints
  • /api/resource-recommendations β†’ Removed completely
  • /api/language-coverage β†’ Removed completely
  • /api/get-words-for-reference β†’ Use fetch-translation-words

See MIGRATION_GUIDE.md for detailed migration instructions.

πŸš€ Key Features

Core Translation Resources

  • Scripture Texts: Multiple translations (ULT, UST, T4T, UEB) with real-time DCS fetching
  • Translation Notes: Verse-by-verse explanations from TSV data
  • Translation Words: Biblical term definitions from markdown files
  • Translation Word Links: Connections between scripture and word articles
  • Translation Questions: Comprehension questions from TSV data
  • Translation Academy: Training modules for translators

πŸ€– MCP Prompts (NEW!)

Guided workflows that teach AI assistants to chain tools intelligently:

  • translation-helps-for-passage - Get everything: scripture + notes + questions + words (with titles) + academy articles
  • get-translation-words-for-passage - Show dictionary entry titles (not technical IDs)
  • get-translation-academy-for-passage - Find training articles referenced in notes

πŸ“– Complete Usage Guide β†’ | πŸ“š Technical Docs β†’

Why prompts matter:

  • One command replaces 6-10 tool calls
  • Shows human-readable titles instead of IDs
  • Standardizes best practices for translation workflows
  • Makes AI assistants much smarter about Bible translation

Technical Excellence

  • Real Data Only: No mock data, no fake responses, no fallbacks
  • Unified Fetcher: Single class (UnifiedResourceFetcher) for all resources
  • Smart Caching: KV for catalogs, R2 for ZIPs, Cache API for extracted files
  • Format Support: JSON, Markdown, Text, and TSV (where applicable)
  • Cloudflare Pages: Global edge deployment with sub-100ms response times

🌟 Deployment

Live Production

  • API Base: https://tc-helps.mcp.servant.bible/api/
  • Documentation: https://tc-helps.mcp.servant.bible/
  • Health Check: https://tc-helps.mcp.servant.bible/api/health

Quick Start

# Fetch scripture
curl "https://tc-helps.mcp.servant.bible/api/fetch-scripture?reference=John%203:16"

# Get translation notes in markdown (for LLMs)
curl "https://tc-helps.mcp.servant.bible/api/translation-notes?reference=Genesis%201:1&format=md"

# Fetch translation word links
curl "https://tc-helps.mcp.servant.bible/api/fetch-translation-word-links?reference=Titus%201:1"

# Browse translation academy modules
curl "https://tc-helps.mcp.servant.bible/api/browse-translation-academy?language=en"

πŸ› οΈ Architecture

Unified Data Fetching

All endpoints use the same architecture:

API Endpoint β†’ createSimpleEndpoint β†’ UnifiedResourceFetcher β†’ ZipResourceFetcher2 β†’ DCS

Key Components:

  1. UnifiedResourceFetcher - Single interface for all resource types
  2. ZipResourceFetcher2 - Handles ZIP archives with intelligent caching
  3. createSimpleEndpoint - Standardized endpoint creation pattern
  4. Real Error Handling - No mock fallbacks, actual error messages

Caching Strategy

DCS API β†’ KV Cache (1hr TTL) β†’ Catalog Metadata
        ↓
     R2 Storage β†’ ZIP Files
        ↓
    Cache API β†’ Extracted Files

🚨 Production Setup

⚠️ CRITICAL: R2 bucket must be populated with ZIP files for production to work!

See R2 Setup Guide for instructions on populating the R2 bucket.

πŸ§ͺ Testing with Wrangler

⚠️ IMPORTANT: All tests MUST use Wrangler for KV/R2 functionality

Setup

# Start Wrangler (REQUIRED for tests)
cd ui && npx wrangler pages dev .svelte-kit/cloudflare --port 8787

# In another terminal, run tests
npm test

Test Configuration

  • Port: Always 8787 (enforced by test setup)
  • Bindings: Real KV and R2 bindings
  • No Mocks: Tests use real Cloudflare services

See tests/TESTING_REQUIREMENTS.md for details.

πŸ“š API Documentation

Scripture Endpoints

# Fetch multiple translations
GET /api/fetch-scripture?reference=John%203:16&resource=ult,ust

# Response format options
GET /api/fetch-scripture?reference=John%203:16&format=md    # Markdown
GET /api/fetch-scripture?reference=John%203:16&format=text  # Plain text

Translation Helps

# Translation notes (from TSV)
GET /api/translation-notes?reference=John%203:16

# Translation questions (from TSV)
GET /api/translation-questions?reference=John%203:16

# Translation words (from markdown)
GET /api/fetch-translation-words?reference=John%203:16

# Translation word links (from TSV) - NEW!
GET /api/fetch-translation-word-links?reference=John%203:16

# Translation academy modules
GET /api/fetch-translation-academy?moduleId=figs-metaphor

# Browse academy modules
GET /api/browse-translation-academy?language=en&category=translate

Discovery Endpoints

# Available languages
GET /api/simple-languages

# Available books
GET /api/get-available-books?language=en

# Resource catalog
GET /api/resource-catalog?language=en&subject=Bible

See API_ENDPOINTS.md for complete documentation.

πŸ”§ Development

Prerequisites

  • Node.js 18+
  • Wrangler CLI (npm install -g wrangler)

Local Development

# Install dependencies
npm install
cd ui && npm install

# Start Wrangler dev server (REQUIRED)
cd ui && npx wrangler pages dev .svelte-kit/cloudflare --port 8787

# Run tests
npm test

# Build for production
npm run build

Development Standards

  • KISS: Keep It Simple - no over-engineering
  • DRY: Don't Repeat Yourself - single source of truth
  • Consistent: Same patterns everywhere
  • Antifragile: Fail fast with real errors, no hiding issues

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Use Wrangler for all testing (no exceptions!)
  4. Ensure all tests pass
  5. Submit a pull request

Remember:

  • No mock data
  • All endpoints must support markdown format
  • Use UnifiedResourceFetcher for new features
  • Test with real KV/R2 bindings

πŸ“„ License

MIT License - see LICENSE file for details.


Built with ❀️ for Bible translators worldwide

About

MCP Server for aggregating Bible translation resources from Door43

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 54.4%
  • HTML 16.9%
  • Svelte 14.1%
  • JavaScript 11.8%
  • Python 2.2%
  • Shell 0.5%
  • Other 0.1%