Skip to main content
Glama
Christian Open Library Connector

Christian Open Library Connector

Official

Christian Open Library connector

The AI connector for the Christian Open Library. The library has about 7,700 public-domain works, mostly Christian. They include the Church Fathers, the Reformers, the Puritans, Spurgeon, Edwards, creeds and confessions, and the historic records of more than 80 denominations. There are verse-by-verse commentaries, Greek and Hebrew study helps, sermons, the Princeton Review, poetry and fiction, and classic philosophy. Bible translations and classic Bible dictionaries are there too. You can search it all from AI apps such as Claude, ChatGPT, Gemini and Grok.

It's a Model Context Protocol server. Your AI app asks it questions. It answers with passages quoted word for word from the library's copies of the books. Each comes with the author and title, and the year and page where the source gives them, so you can check them.

Use it: add https://mcp.christianopenlibrary.org/mcp as a connector in your AI app and sign in with Google, your email or GitHub. It's free. Step-by-step instructions are on the library's front page.

This repository is the connector's complete source, published so anyone can see exactly what it does with their questions.

What it can do

Six read-only tools:

Tool

What it does

search_library

Searches by meaning and by keyword together, then reranks the results. There is also an exact-phrase mode for a remembered quotation. Old spellings are matched automatically ("sinne" finds "sin").

read_passage

Reads a passage by its reference, or a work by printed page.

find_works

Lists works by title, author, collection and years.

read_scripture

Reads Bible passages in seven public-domain translations (Berean Standard Bible by default).

find_scripture_citations

Finds which historic writers cited a verse, and where.

define_term

Looks up words in older Bible and theological dictionaries.

check_quote

Checks a quotation: did this author really write these words? It answers found word for word (with book, year, page and the sentences around it), found but worded differently (the real wording beside the one given, differences marked), found but by someone else (the earliest author in the library who used the words), or not found (which does not prove the quotation is false). For about 160 commonly quoted writers still in copyright (C. S. Lewis, John Piper), it says their books are not in the library.

Each result comes with the text around it, so the AI can quote an author's own position rather than an objection he goes on to answer. If a quotation appears word for word in the library, it ranks first.

Each search result is marked as an exact, close, partial or loose match. "Close" means on the subject. It is not proof of the source. For who said something, the AI is told to use the quote checker. A result that credits its words to another writer ("as Augustine tells us") says so. When the library has nothing close to what was asked or has no such work, the result says NOT FOUND or NO CLOSE MATCH. It tells the AI not to quote from memory. Passages from scanned books are marked as uncorrected OCR.

Related MCP server: bible-translation-mcp

How it works

  • indexer/ (Python) builds the search index from the books repository:

    • an SQLite FTS5 database for keyword search;

    • Voyage AI embeddings (books indexed with voyage-4-lite, 512 dimensions, int8; searches embedded with voyage-4-large, which shares its embedding space) with an IVF index for meaning search;

    • a Scripture citation index and the dictionaries.

    It runs nightly and embeds only passages that are new. Before a build goes live, a scanner refuses text that looks aimed at an AI.

  • plugin/col-library-connector/src/ (PHP 8.1 or later, no dependencies) is the MCP server: Streamable HTTP, protocol versions 2024-11-05 through 2026-07-28, search, reranking (Voyage rerank-3) and formatting. The same code can also run as a WordPress plugin.

  • server/www/index.php is the front controller for a plain PHP-FPM host. It handles the MCP endpoint, the OAuth discovery documents and the public cost card at /support.svg.

  • deploy/ holds the scripts that push builds and releases to the server over SSH, to an account that can only upload and run a few deploy commands. deploy/office/connector/ is the server's configuration: nginx, PHP-FPM in a locked-down systemd sandbox, an outbound proxy that allows only the two services the connector needs, and the Cloudflare Tunnel.

Sign-in, privacy and limits

  • Sign-in: the connector is an OAuth 2.1 resource server. WorkOS AuthKit handles sign-in (a one-time code by email, Google, or GitHub). The connector checks each token's signature and claims itself.

  • No user data: the connector keeps no copy of conversations or documents. Sign-in accounts are held by WorkOS, not by the connector.

  • Logs: they record the method, status and timing, with a pseudonymous id per person (part of a hash). Search text isn't logged unless debugging is turned on, and keys are always removed.

  • Your questions: to search by meaning, the search words are sent to Voyage AI. The library's Voyage account is opted out of data use. Voyage deletes them after processing. What happens to your question lists everyone who sees it.

  • Limits: each person has a daily limit, and a daily cap keeps search spending in check.

Security

See SECURITY.md for how to report a problem, and docs/security-review.md for the latest review.

How well does search work?

A 75-question test checks whether the right book comes back. Today about 87% of questions find it in the top 8 results. The method, results by kind of question, and the limits of the test are in docs/evaluation.md.

Running the tests

  • PHP: run tools/setup.sh once (it downloads Node and php-wasm into tools/), then tools/php tests/php/run.php.

  • Python: create a virtual environment with numpy, PyYAML and requests, then run python -m unittest discover -s indexer/tests -t ..

  • Both run on GitHub on every push (.github/workflows/tests.yml), and deploy/deploy-office.sh release runs the PHP tests and releases nothing if one fails. After each deploy, deploy/smoke.py checks quotations with known answers on the live website checker (KNOWN_QUOTES); add one whenever a wrong answer is fixed.

License

MIT (see LICENSE). The books themselves are public domain or Creative Commons and live in a separate repository.

The Christian Open Library is an independent library, founded by Matt Miller. If it's useful to you, you can support it by card or through GitHub Sponsors. You can also send Bitcoin over Lightning to mattm4444@strike.me.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides comprehensive Biblical research tools including scripture lookup, interlinear Greek/Hebrew data, and Strong's concordance within a Protestant theological framework. It enables AI applications to perform full-text biblical searches, topical studies, and cross-referencing using authoritative theological data.
      4
      MIT