translation-helps-mcp

klappy/translation-helps-mcp

3.2

If you are the rightful owner of translation-helps-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.

The Translation Helps MCP Server is a high-performance, serverless API designed to aggregate Bible translation resources from Door43, utilizing Netlify Functions, TypeScript, and SvelteKit.

Translation Helps MCP Server v4.5.0

๐ŸŽ‰ NEW in v4.5.0: Major PRD Implementation Release

  • 6 of 21 PRD tasks completed (28.6% progress)
  • Advanced resource discovery systems with intelligent caching
  • Smart resource recommendations with AI-powered analysis
  • Complete Phase 3 (Resource Discovery) + Phase 4 (Performance) implementation
  • 95% PRD compliance confirmed through comprehensive codebase audit

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

๐Ÿš€ Key Features (v4.5.0)

Advanced Resource Discovery (NEW)

  • Intelligent Resource Type Detection: Automatic identification of resource types with confidence scoring
  • Language Coverage Matrix: Real-time availability tracking for Strategic Languages
  • Smart Resource Recommendations: AI-powered suggestions based on user roles and content analysis

Performance Optimization (NEW)

  • Intelligent Cache Warming: Predictive caching based on access patterns
  • Request Coalescing: Automatic deduplication to prevent redundant API calls
  • Response Compression: Advanced payload optimization with Gzip/Brotli support

Core Translation Helps

  • Scripture Texts: ULT/GLT (literal) and UST/GST (simplified) with word alignment
  • Translation Notes: Verse-by-verse explanations for difficult passages
  • Translation Words: Biblical term definitions with comprehensive articles
  • Translation Questions: Comprehension and application questions
  • Translation Academy: Biblical translation principles and methods

๐ŸŒŸ MCP via HTTP/Web API

Translation Helps MCP runs on Cloudflare Pages providing a modern HTTP-based MCP implementation that works perfectly without WebSockets or long-lived connections.

โšก Live Production Deployment

  • HTTP MCP Endpoint: https://translation-helps-mcp.pages.dev/api/mcp
  • Complete Documentation: https://translation-helps-mcp.pages.dev/mcp-tools
  • Interactive Test UI: https://translation-helps-mcp.pages.dev/mcp-http-test

๐Ÿ”Œ MCP Setup for AI Assistants

Choose your preferred setup method:

Option 1: HTTP MCP (Recommended)

No installation required! Use the live HTTP endpoint directly.

For Cursor AI (.cursor/mcp.json):

{
  "mcpServers": {
    "translation-helps": {
      "command": "node",
      "args": [
        "-e",
        "console.log('HTTP MCP: Use direct API calls to https://translation-helps-mcp.pages.dev/api/mcp')"
      ]
    }
  }
}

For Claude Desktop:

  • Use the web interface at https://translation-helps-mcp.pages.dev/mcp-tools
  • Or integrate via HTTP requests in your applications
Option 2: Local MCP Server

For Cursor AI (.cursor/mcp.json):

{
  "mcpServers": {
    "translation-helps": {
      "command": "node",
      "args": ["src/index.ts"],
      "cwd": "/absolute/path/to/translation-helps-mcp"
    }
  }
}

For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "translation-helps": {
      "command": "node",
      "args": ["src/index.ts"],
      "cwd": "/absolute/path/to/translation-helps-mcp"
    }
  }
}

๐Ÿš€ Development Setup

  1. Install dependencies:

    npm install
    
  2. Start local MCP server:

    npm start
    
  3. Start development web server:

    netlify dev
    
  4. Test the API:

    curl "http://localhost:8888/.netlify/functions/fetch-scripture?reference=John%203:16&language=en&organization=unfoldingWord"
    

๐Ÿ”— HTTP MCP Usage

Direct HTTP Testing:

# Test any of the 14 available tools organized in 3 categories:
# Core: Direct DCS/Door43 resource access (10 tools)
# Linked: Combined endpoint functionality (2 tools)
# Experimental: Value-added features (2 tools)
curl -X POST https://translation-helps-mcp.pages.dev/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"method":"tools/call","params":{"name":"translation_helps_fetch_scripture","arguments":{"reference":"John 3:16"}}}'

JavaScript Integration:

import { createMCPClient } from "$lib/mcp/http-client";
const client = await createMCPClient("/api/mcp");
const result = await client.callTool("translation_helps_fetch_scripture", {
  reference: "John 3:16",
});

๐Ÿงช Comprehensive Test Suite โญ NEW!

Translation Helps MCP includes an exhaustive test suite that ensures stability and prevents regressions. This testing infrastructure was built to eliminate the bugs and regressions that were plaguing development:

Test Types

  • ๐Ÿฅ Smoke Tests - Quick health checks and basic functionality validation
  • ๐Ÿ”„ API/MCP Parity Tests - Ensure identical responses between API and MCP endpoints
  • ๐Ÿ› Regression Tests - Catch previously fixed bugs and prevent regressions
  • โšก Performance Tests - Validate response times and concurrent request handling
  • ๐Ÿ›ก๏ธ Error Handling Tests - Test edge cases and error conditions

Running Tests

# Run all tests with comprehensive reporting
npm test

# Quick smoke test (fastest - ~30 seconds)
npm run test:smoke

# Full parity validation (~5-10 minutes)
npm run test:parity

# Regression testing (~2-3 minutes)
npm run test:regression

# Unit tests (~1 minute)
npm run test:unit

# Watch mode for development
npm run test:watch

# Generate coverage report
npm run test:coverage

Test Coverage

The test suite validates:

โœ… Full API/MCP Parity - All endpoints return identical responses
โœ… No Double JSON Wrapping - Clean, structured responses
โœ… Actual Data Return - Scripture, notes, questions, and words
โœ… Ingredient File Path Usage - No hardcoded paths
โœ… Book Code Mapping - Correct 3-letter book codes
โœ… Response Structure Validation - Consistent formats
โœ… Error Handling - Graceful failure modes
โœ… Performance Benchmarks - Response time validation

For detailed test documentation, see .

๐Ÿ› ๏ธ Architecture

Translation Helps MCP uses a unified architecture that eliminates code duplication:

  • Single Implementation: Each feature has one implementation in API functions
  • MCP Wrappers: All MCP endpoints are lightweight wrappers calling API functions
  • Identical Responses: Test page and chat responses are guaranteed identical
  • Zero Maintenance Overhead: All fixes happen in one place

API/MCP Endpoint Mapping

API EndpointMCP EndpointPurpose
fetch-scripturemcp-fetch-scriptureGet Bible verses
fetch-translation-notesmcp-fetch-translation-notesGet translator notes
fetch-translation-questionsmcp-fetch-translation-questionsGet comprehension questions
fetch-translation-word-linksmcp-fetch-translation-word-linksGet word connections
fetch-translation-wordsmcp-fetch-translation-wordsGet word definitions
fetch-resourcesmcp-fetch-resourcesGet all resources for reference
get-languagesmcp-get-languagesGet available languages
extract-referencesmcp-extract-referencesExtract Bible references from text
browse-translation-wordsmcp-browse-translation-wordsBrowse word categories

๐ŸŽฏ MCP Tools (14 Total)

๐Ÿ—‚๏ธ Core Endpoints (10 tools)

Direct mappings to DCS/Door43 resources

  • translation_helps_fetch_scripture - Get Bible text in USFM or plain text format
  • translation_helps_fetch_translation_notes - Get detailed translation notes for Bible passages
  • translation_helps_fetch_translation_questions - Get comprehension questions for Bible passages
  • translation_helps_fetch_translation_words - Get specific translation word article content
  • translation_helps_browse_translation_words - Browse available translation word articles by category
  • translation_helps_fetch_translation_word_links - Get translation word links for specific Bible references
  • translation_helps_get_languages - List all available languages for translation resources
  • translation_helps_extract_references - Extract and parse Bible references from text
  • translation_helps_list_available_resources - Search and list available translation resources
  • translation_helps_get_available_books - List available Bible books for translation resources

๐Ÿ”— Linked Endpoints (2 tools)

Combine multiple endpoints for enhanced functionality

  • translation_helps_get_words_for_reference - Get translation words that apply to specific Bible references
  • translation_helps_fetch_resources - Get comprehensive translation resources for a Bible reference

๐Ÿงช Experimental Endpoints (2 tools)

Value-added endpoints that may change

  • translation_helps_get_context - Get contextual information and cross-references for Bible passages
  • translation_helps_get_translation_word - Get detailed information about a specific translation word

๐Ÿ“ Usage Examples

Basic Scripture Lookup

curl "http://localhost:8888/.netlify/functions/fetch-scripture?reference=John%203:16&language=en&organization=unfoldingWord"

Translation Notes

curl "http://localhost:8888/.netlify/functions/fetch-translation-notes?reference=John%203:16&language=en&organization=unfoldingWord"

Translation Words

curl "http://localhost:8888/.netlify/functions/fetch-translation-words?word=love&language=en&organization=unfoldingWord"

๐Ÿš€ UI Demos

The project includes interactive UI demos:

  • Scripture Lookup - / - Search and display Bible verses
  • Translation Tools - Comprehensive translation resources
  • API Testing - /api - Test all endpoints
  • Performance Dashboard - /performance - Monitor API performance

๐Ÿ”ง Development

Prerequisites

  • Node.js 18+
  • Netlify CLI

Development Workflow

  1. Start development server:

    netlify dev
    
  2. Run tests during development:

    npm run test:watch
    
  3. Check API health:

    curl http://localhost:8888/.netlify/functions/health
    

Testing Philosophy

The test suite follows these principles:

  1. Prevent Regressions - Every fixed bug gets a test
  2. Ensure Parity - API and MCP must be identical
  3. Fast Feedback - Smoke tests run in ~30 seconds
  4. Comprehensive Coverage - All endpoints tested
  5. Clear Reporting - Failures are easy to understand
  6. CI/CD Ready - Tests work in automated environments

๐Ÿ“š Resources

๐Ÿ”ง Development Environment Setup

This project follows strict development standards to ensure UW (unfoldingWord) terminology compliance and code quality.

Prerequisites

  • Node.js 18+
  • Git with hooks support
  • VS Code (recommended) with workspace extensions

Initial Setup

  1. Clone and Install:

    git clone <repository-url>
    cd translation-helps-mcp
    npm install
    
  2. Install Pre-commit Hooks:

    # Hooks are automatically installed via husky during npm install
    # Test the setup:
    npm run terminology:check
    
  3. VS Code Setup (recommended):

    • Install workspace recommended extensions
    • Settings are pre-configured for UW development standards
    • ESLint will automatically enforce terminology compliance

Development Standards

  • โœ… Terminology Compliance: Use "Strategic Language" not obsolete terms
  • โœ… UW Resource Types: Use proper ULT/GLT, UST/GST terminology
  • โœ… Code Formatting: Prettier + ESLint with custom UW rules
  • โœ… Pre-commit Validation: Automatic terminology checking

Available Scripts

# Development and Testing
npm run dev                    # Start development server
npm test                      # Run all tests (non-watch mode)
npm run test:watch            # Run tests in watch mode
npm run test:coverage         # Run tests with coverage

# Code Quality
npm run lint                  # Check code style and terminology
npm run lint:fix              # Auto-fix linting issues
npm run format                # Format code with Prettier
npm run terminology:check     # Validate UW terminology compliance
npm run typecheck             # TypeScript type checking

# Build and Deploy
npm run build                 # Build for production (Cloudflare)
npm run preview               # Preview production build locally
npm run deploy                # Deploy to Cloudflare Pages

๐Ÿš€ Deployment

This project is deployed on Cloudflare Pages for optimal performance and global distribution.

Automatic Deployment

Every push to the main branch automatically triggers deployment via GitHub Actions:

  1. Fork this repository

  2. Set up Cloudflare Pages:

    • Connect your GitHub repository to Cloudflare Pages
    • Set build command: cd ui && npm install && npm run build
    • Set build output directory: ui/.svelte-kit/cloudflare
    • Add compatibility flag: nodejs_compat
    • Set compatibility date: 2024-09-23
  3. Configure GitHub Secrets (for GitHub Actions):

    • CLOUDFLARE_API_TOKEN: Your Cloudflare API token
    • CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
  4. Push to main branch - deployment happens automatically!

Manual Deployment

# Build the project
npm run build

# Deploy to Cloudflare Pages
npm run deploy

Pre-commit Hooks

The repository includes automatic pre-commit validation:

  • Terminology Check: Prevents commits with outdated terminology
  • Code Formatting: Auto-formats code with Prettier
  • Linting: Enforces code quality and UW standards
  • Type Checking: Validates TypeScript types

Example pre-commit output:

๐Ÿ” Running pre-commit checks...
๐Ÿ“ Checking for UW terminology compliance...
โœ… Pre-commit checks passed!

UW Terminology Guidelines

When developing, always use:

โŒ Avoidโœ… Use Instead
Legacy terminologyStrategic Language (current standard)
Bible textsULT/GLT (Literal) or UST/GST (Simplified)
TranslationSpecific resource type (TN, TW, TWL, TQ, TA)
Generic descriptionsUW-specific resource descriptions

See docs/UW_TRANSLATION_RESOURCES_GUIDE.md for complete terminology and technical specifications.

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Follow development standards (terminology, formatting, testing)
  4. Add comprehensive tests for new functionality
  5. Ensure all tests pass: npm test
  6. Verify terminology compliance: npm run terminology:check
  7. Submit a pull request

Remember: Good tests prevent bad deployments! And proper terminology ensures UW compliance! ๐Ÿ›ก๏ธ

๐Ÿ“„ License

MIT License - see file for details.