AI

AI Bible MCP Server for Reproducible Research

Explore reproducible AI research with the AI Bible MCP server, enabling reliable LLM data lookups and containerized OpenAI-compatible completions for study.

Overview

AI Bible MCP Server provides a reproducible, containerized way for language models to reliably look up Biblical text and related data during research or teaching workflows. It implements an MCP (Model Context Protocol) server that LLM clients (for example, Claude Desktop) can call to retrieve deterministic verse data and representations, and it can be wrapped with a small mcpo-based adapter to expose an OpenAI-compatible completions API for local model integration.

The primary goals are reproducibility and interoperability: ensure that LLM-based experiments reference consistent, auditable text lookups, and make it straightforward to run the service locally (via a Docker image) so completions and context lookups can be integrated with local LLMs or experiment pipelines.

Features

  • Deterministic retrieval of Bible verses and references for use within LLM prompts
  • MCP server implementation suitable for Claude Desktop and other MCP-capable clients
  • Dockerized mcpo wrapper exposing an OpenAI-completions-compatible API layer
  • Built-in Swagger UI for exploring available endpoints and request schemas
  • Designed to support reproducible AI research and educational use-cases
  • Open source (GPLv3) with separate data-license notes in LICENCE.md

Installation / Configuration

  1. Clone the repository:
git clone https://github.com/AdbC99/ai-bible.git
cd ai-bible
  1. Build the MCP server component
  • The MCP server build steps live in the mcp-server subfolder; follow that subfolder’s README to compile/prepare the mcp-server.stdio.js build artifact used by MCP clients.
  1. Build and run the Docker container (from project root after building the MCP server):
# build the completions image (maps to internal server on port 8000)
docker build -f completions/Dockerfile -t mcp-server .

# run and expose port 8000 as 8002 on the host
docker run -p 8002:8000 mcp-server
  1. Verify the service is running by opening the Swagger docs:
http://localhost:8002/docs

Notes:

  • The Docker image wraps the MCP server with mcpo to provide an OpenAI-completions-compatible endpoint. Check the Swagger UI for the exact routes and request/response shapes.
  • For Claude Desktop or other MCP-capable clients, use the built mcp-server.stdio.js as the MCP server target (see the mcp-server build README for configuration specifics).

Available Resources

  • Repository: https://github.com/AdbC99/ai-bible
  • Web front end (pocket bible): http://ai-bible.com
  • Swagger UI (running locally after container start): http://localhost:8002/docs
  • Build artifact: build/mcp-server.stdio.js (for MCP clients)
  • Docker image: mcp-server (built from completions/Dockerfile)
  • License: GNU GPL v3 (see LICENCE.md for project and embedded data license notes)

API Examples

Example: call the get-verse endpoint (documented in Swagger):

curl -X POST "http://localhost:8002/get-verse" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": ["Gen.1.1", "Gen.2.1"],
    "language": "english"
  }'

Example: check the Swagger docs to find the OpenAI-completions-compatible endpoint exposed by the mcpo wrapper (path and auth details shown in /docs). A typical completions request (endpoint path may vary — confirm via /docs):

curl -X POST "http://localhost:8002/v1/completions" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "local-llm",
    "prompt": "Retrieve Genesis 1:1 and present it in plain text",
    "max_tokens": 200
  }'

(Replace the path with whatever the Swagger UI documents if different.)

Use Cases

  • Reproducible research: Ensure that prompts referencing scripture consistently resolve to the same verse text across experiments by sourcing context through the MCP server rather than ad-hoc copy/paste.
  • Educational tools: Integrate deterministic verse lookups into teaching assistants, study bots, or web apps (for example, a pocket-bible UI that consults the MCP server for canonical citations).
  • Local LLM experimentation: Run the completions container locally and connect Open WebUI + Ollama or other local model drivers to experiment with the combination of deterministic context retrieval and model completions.
  • Chain-of-thought / tool-using models: Let an LLM call the MCP tool to fetch exact verse text as part of a reasoning pipeline, improving traceability of model outputs.
  • Benchmarking and audits: Use server logs and deterministic retrievals to reproduce and audit model outputs during evaluations.

Tips for Developers

  • Always confirm endpoint paths and request schemas via the Swagger UI at /docs after starting the container.
  • If you plan to integrate with Claude Desktop, use the mcp-server.stdio.js artifact produced by the mcp-server build; the subfolder README contains configuration notes specific to Claude.
  • The project is GPLv3; consult LICENCE.md