EGH Research MCP Server

EGH Research MCP Server

Provides offline research and advanced search capabilities for Ellen Gould Harmon's writings via MCP and HTTP APIs, including PDF generation and Docker deployment.

Category
Visit Server

README

EGH Research

Complete offline research platform for Ellen Gould Harmon's writings with PDF generation and Docker deployment

Docker Build CI NPM Package License: MIT

šŸš€ Quick Start with Docker

The fastest way to get started is with our pre-built Docker image:

# Pull and run the latest image
docker pull ghcr.io/gospelsounders/egw-writings-mcp/egh-research-server:latest
docker run -p 3000:3000 ghcr.io/gospelsounders/egw-writings-mcp/egh-research-server:latest

# Test the API
curl http://localhost:3000/health
curl http://localhost:3000/api/docs

🌐 Live API Documentation | šŸ“š Full Documentation

🌟 Overview

EGH Research is a comprehensive platform for offline research of Ellen Gould Harmon's writings, providing both Model Context Protocol (MCP) and HTTP REST API access with advanced PDF generation capabilities.

Key Components

  • šŸ”Œ EGH Research Server: Dual-protocol server (MCP + HTTP API) with offline database
  • šŸ“„ Content Downloader: Bulk data extraction and database population tools
  • šŸ“Š Web Interface: Modern React-based research platform
  • 🐳 Docker Deployment: Production-ready containerization with GitHub Actions

Core Features

  • ⚔ Offline Operation: Complete independence from external services
  • šŸ” Advanced Search: FTS5 full-text search with sub-millisecond response times
  • šŸ“„ PDF Generation: On-demand PDF creation with customizable formatting
  • 🌐 Dual APIs: Both MCP and REST APIs for maximum compatibility
  • 🐳 Docker Ready: Multi-architecture containers (AMD64, ARM64)
  • šŸ“± Modern UI: Responsive web interface for research

šŸ“¦ Architecture

ā”œā”€ā”€ apps/
│   ā”œā”€ā”€ local-server/        # Main EGH Research Server (MCP + HTTP API)
│   ā”œā”€ā”€ downloader/          # Data extraction and database tools
│   ā”œā”€ā”€ api-server/          # Live API integration server
│   └── website/             # React-based research interface
ā”œā”€ā”€ packages/
│   ā”œā”€ā”€ shared/              # Common utilities and database management
│   └── egw-pdf-generator/   # PDF generation engine
└── .github/workflows/       # CI/CD with Docker builds

šŸ›  Installation Options

Option 1: Docker (Recommended)

# Using Docker Run
docker pull ghcr.io/gospelsounders/egw-writings-mcp/egh-research-server:latest
docker run -p 3000:3000 ghcr.io/gospelsounders/egw-writings-mcp/egh-research-server:latest

# Using Docker Compose
curl -O https://raw.githubusercontent.com/GospelSounders/egw-writings-mcp/master/apps/local-server/docker-compose.yml
docker-compose up -d

Option 2: Global NPM Installation

# Install the research server
npm install -g @surgbc/egw-research-server

# Install supporting tools
npm install -g @surgbc/egw-writings-downloader

# Start the server
egw-research-server --http --port 3000

Option 3: Local Development

# Clone and setup
git clone https://github.com/surgbc/egh-research.git
cd egh-research
pnpm install && pnpm build

# Start HTTP server
cd apps/local-server
npm run start:http

# Or start MCP server
npm run start:mcp

šŸ”§ Configuration

Environment Variables

  • NODE_ENV: Development/production mode
  • LOG_LEVEL: Logging verbosity (debug, info, warn, error)
  • PDF_CLEANUP_INTERVAL: PDF file cleanup frequency

MCP Client Configuration

{
  "mcpServers": {
    "egh-research": {
      "command": "egw-research-server"
    }
  }
}

Database Setup

# Download sample data
npx @surgbc/egw-writings-downloader quick-start --zip

# Or use the Make target (development)
make egw-quick-start

šŸ“– API Reference

HTTP REST API

# Health and status
GET /health
GET /api/docs
GET /stats

# Content access
GET /content/books?page=1&limit=50&lang=en
GET /content/books/{id}
GET /content/books/{id}/toc
GET /search?q=righteousness&limit=20

# PDF generation
POST /content/books/{id}/generate-pdf
GET /pdf/status/{token}
GET /pdf/download/{token}

MCP Tools

  • search_local - Full-text search with FTS5 highlighting
  • get_local_book - Book information and metadata
  • get_local_content - Chapter and paragraph content
  • list_local_books - Paginated book listings
  • browse_by_reference - Navigation by EGW reference codes
  • get_context - Contextual paragraph retrieval
  • get_database_stats - Database metrics and statistics

šŸ“š Complete API Documentation

🐳 Docker & Production

Production Deployment

# Pull latest production image
docker pull ghcr.io/surgbc/egh-research-server:latest

# Run with persistent storage and health checks
docker run -d \
  --name egh-research \
  -p 3000:3000 \
  -v egh-data:/app/apps/local-server/data \
  --restart unless-stopped \
  --health-cmd="curl -f http://localhost:3000/health || exit 1" \
  --health-interval=30s \
  ghcr.io/surgbc/egh-research-server:latest

Build from Source

# Build local image
./scripts/build-docker.sh --tag local

# Build with custom registry
./scripts/build-docker.sh --registry ghcr.io/yourname --tag v1.0.0

GitHub Actions

The project includes comprehensive CI/CD workflows:

  • šŸ”Ø Build & Test: Automated testing and building on push/PR
  • 🐳 Docker Build: Multi-architecture container builds
  • šŸ“‹ Security Scan: Vulnerability scanning with Trivy
  • šŸ“š Documentation: Auto-deployment to GitHub Pages
  • šŸš€ Release: Automated releases with Docker publishing

šŸ“Š Performance & Capabilities

Search Performance

  • Sub-millisecond search response times
  • FTS5 full-text search with ranking
  • Highlighted search results with context
  • Reference navigation (e.g., "AA 15.1", "DA 123")

PDF Generation

  • Customizable formatting: Page size, fonts, margins
  • Table of contents: Automatic generation with configurable depth
  • Background processing: Non-blocking PDF generation
  • Progress tracking: Real-time generation status
  • Automatic cleanup: Scheduled file cleanup

Database Features

  • SQLite with FTS5 full-text search
  • Efficient storage with reference indexing
  • Multi-language support (150+ languages)
  • Offline operation - no internet required after setup

šŸŽÆ Use Cases

Research Applications

  • Academic research on Ellen Gould Harmon's writings
  • Topic compilation across multiple books
  • Reference verification and cross-referencing
  • Contextual analysis with surrounding paragraphs

Educational Use

  • Classroom instruction with offline access
  • Student research projects with PDF generation
  • Study materials creation with custom formatting
  • Reference lookup during presentations

Technical Integration

  • MCP clients (Claude, etc.) for AI-assisted research
  • REST API integration for custom applications
  • Docker deployment for institutional use
  • Batch processing for large-scale analysis

šŸ¤ Contributing

We welcome contributions! Here's how to get started:

Development Workflow

  1. Fork the repository
  2. Create a feature branch from main
  3. Make your changes with tests
  4. Run pnpm lint && pnpm build && pnpm test
  5. Submit a pull request

Development Commands

# Setup development environment
pnpm install
pnpm build

# Run tests and linting
pnpm test
pnpm lint

# Start development servers
pnpm dev                    # All packages in watch mode
pnpm --filter local-server dev   # Just the research server
pnpm --filter website dev        # Just the web interface

# Build for production
pnpm build

# Docker development
./scripts/build-docker.sh --tag dev
docker run -p 3000:3000 egh-research-server:dev

šŸ“š Educational and Research Use

This platform is designed specifically for educational and research purposes related to Ellen Gould Harmon's writings. The software:

  • Respects intellectual property rights and fair use guidelines
  • Provides tools for legitimate academic research
  • Enables offline access for educational institutions
  • Supports citation and reference verification

Key Benefits for Researchers

  • Complete offline access - No dependency on external services
  • Advanced search capabilities - Find specific passages quickly
  • PDF generation - Create formatted documents for study
  • Reference cross-linking - Navigate between related content
  • Context preservation - Maintain surrounding content for accuracy

Academic Citation

When using this software in academic work, please cite:

EGH Research Platform. (2024). 
Offline research platform for Ellen Gould Harmon's writings.
GitHub: https://github.com/surgbc/egh-research

šŸ”’ Security & Privacy

  • No data collection: All processing happens locally
  • Open source: Fully auditable codebase
  • Security scanning: Automated vulnerability detection
  • Container security: Non-root user and minimal attack surface

šŸ“„ License

MIT License - Open source software for educational and research use.

See LICENSE for full terms.

šŸ™‹ā€ā™‚ļø Support


Developed by surgbc • Built with ā¤ļø for educational and research purposes

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured