marginalia-ai-plugin-logos
A Research Engine plugin for Logos Bible Software. It adds:
- 28 MCP tools over your Logos account: passage text in several translations, passage and exegetical guides, word studies, verbatim lexicon entries, cross-references, commentary lookup, full-text and library search, Factbook, notes, and the Logos study assistant.
- A verse-boundary chunker (
verse_boundary5.0) built for commentaries and Greek/Hebrew reference works, with token budgets measured per script. - Resumable whole-book ingestion (
logos.ingest_book): walks a book's articles, checkpoints every one, and stores the book into your Research Engine corpus as a single document with its structure and page numbers. - Scholar authority records and a
scripture_ref_rangesearch filter.
You need a Logos account. The plugin reads only what that account can open.
This project is not affiliated with or endorsed by Faithlife, LLC. "Logos" and "Faithlife" are their trademarks.
Compatibility
| Plugin | Research Engine (marginalia-ai) and marginalia-ai-sdk |
Python | Database |
|---|---|---|---|
| 0.2.1 | 0.6.2+ (core_api: ">=0.6.2,<0.7") |
3.11–3.13 | The PostgreSQL database Research Engine uses |
The wheel depends on marginalia-ai-sdk, not on marginalia-ai itself;
logos/plugin.yaml declares which core versions it runs under, and core refuses
to load it under any other.
Install
Install into the same Python environment as Research Engine.
With pip:
python -m pip install marginalia-ai marginalia-ai-plugin-logos
With pipx, inject it into Research Engine's environment. --include-apps puts
logos-login and logos-diagnose on your PATH:
pipx install marginalia-ai
pipx inject --include-apps marginalia-ai 'marginalia-ai-plugin-logos[auth]'
Browser sign-in (auth extra)
Signing in, and renewing a session without a password, uses Playwright and Chromium. Install the extra, then the browser. Installing a wheel never downloads a browser for you; this is always a separate step:
python -m pip install 'marginalia-ai-plugin-logos[auth]'
python -m playwright install chromium
Under pipx, run Playwright from Research Engine's environment:
"$(pipx environment --value PIPX_LOCAL_VENVS)/marginalia-ai/bin/python" -m playwright install chromium
Without the extra every tool still works while a stored session is valid;
renewing it then needs logos-login from an environment that has Playwright.
Sign in
logos-login # opens a browser once; sign in to Logos
logos-login --status # where the session is stored, and whether it is valid
logos-login --refresh # renew silently from the saved browser profile
logos-diagnose # every layer of auth state, with no cookie values
The session lives in the plugin's data directory:
~/.research-engine/plugin-data/logos/ # or $RE_DATA_DIR/plugin-data/logos/
cookies.json # 0600
browser-profile/ # 0700, Chromium profile for silent renewal
The console scripts work out that location the same way the engine does,
without importing it, so a terminal login is picked up by a running server. If
you set RE_DATA_DIR for the engine in a .env file rather than the
environment, export it in your shell as well.
AUTHENTICATION.md
covers renewal and troubleshooting.
Enable in Research Engine
Installing the wheel only makes the plugin discoverable. Core reads
logos/plugin.yaml without importing any plugin code, shows you what it asks
for, and does nothing until you approve it:
research-engine plugin list # logos appears as "available"
research-engine plugin audit logos # tools, chunker, filter, schema, permissions, migrations
research-engine plugin enable logos # review and approve
research-engine plugin migrate logos # create or upgrade the plugin's tables
research-engine plugin doctor logos
Then restart research-engine serve. The tools appear as logos.*, for
example logos.auth_status, logos.get_entry, logos.library and
logos.search.
After pip install --upgrade marginalia-ai-plugin-logos, core holds the new
version until you approve it again, then asks for the migration if the release
added one:
research-engine plugin approve-upgrade logos
research-engine plugin migrate logos
Upgrading from 0.1.x
0.1.x was installed by cloning this repository. 0.2.0 is a normal package, and three things change for you:
-
Your session moves. 0.1.x kept it in
~/.logos-mcp/. With the engine stopped:logos-login --migrate-data --dry-run # show what would move logos-login --migrate-data
Only
cookies.jsonandbrowser-profile/move. The command refuses and changes nothing if the destination already holds something different. It verifies the copies before it removes the originals.--keep-sourcekeeps the originals anyway. Nothing moves until you run it. -
Tables are migrated, not created on first use. 0.1.x created the
logos_*tables the first time a tool needed one.research-engine plugin migrate logosnow records them as revision 1. Existing tables, rows and ingest checkpoints are kept exactly as they are, so a half-walked book resumes where it stopped. -
Nothing needs re-chunking.
verse_boundaryis still 5.0, and every passage boundary is where 0.1.x put it.
The old checkout under ~/.research-engine/plugins/ is no longer loaded. Delete
it once 0.2.0 is enabled and working.
Database
The plugin keeps its own tables in Research Engine's PostgreSQL database:
| Table | Holds |
|---|---|
logos_ingest_progress |
Where each book's walk stopped, for resume |
logos_ingest_chunks |
Staged passages, before and after they reach the corpus |
logos_ingest_article_texts |
The article text each passage's offsets address |
logos_scholars, logos_authority |
Scholar authority records |
logos_resources, logos_api_calls |
Resource tracking and an API call log |
logos_schema_migrations |
Which plugin migrations have run, with checksums |
Only this plugin writes these tables. Core's migrations never change them, uninstalling the plugin never drops them, and no plugin migration deletes data. Migrations run only when you ask. A migration file that changed after it was applied blocks every later upgrade until you look at it.
Core 0.6.2 supplies its configured database URL to every tool in
PluginContext, including a value loaded from core's .env. Standalone
commands use RE_DB_URL and then DATABASE_URL; they fail rather than guessing
a local database when neither is configured. Migration entries continue to
receive core's URL explicitly.
To check or migrate from a shell:
python -m logos.db.migrate status
python -m logos.db.migrate upgrade
Permissions, and what they do not mean
plugin.yaml asks for |
Why |
|---|---|
network: egress to app.logos.com, www.logos.com, auth.faithlife.com |
The Logos API, the product-page lookup behind ingest_book(url=...), and Faithlife sign-in |
subprocess: true |
Silent session renewal launches headless Chromium |
filesystem: plugin_data |
cookies.json and the browser profile |
ingest: true |
logos.ingest_book stores books into your corpus |
Database access is not one of them: Research Engine 0.6 has no database permission to ask for, and hands plugins no connection. The tables above are the plugin's own, and it opens its own connection to reach them — see "Database".
An enabled plugin is trusted code. It runs inside the Research Engine process as ordinary Python. The permissions limit the SDK clients core hands the plugin. They are not a sandbox, and they cannot stop code that uses Python directly. Enable only plugins you trust.
That applies to this plugin in two known places:
- Direct HTTP. Logos API calls go through the plugin's own
httpxclient, because they need a session cookie jar, retry after a 401, and streaming responses from the study assistant, and the SDK's scopedHttpClienthas none of those. Those calls reach onlyapp.logos.com. The one unauthenticated fetch, the product-page lookup, uses the scoped client. - Chromium. The sign-in page that renewal loads also pulls in hosts outside the allowlist (captcha and analytics). Browser traffic is not bound by the allowlist.
Licensed content
Logos resources are licensed to your account. The plugin fetches only what your account can open and stores it in your local corpus for your own study. Do not publish or share ingested text beyond what your Logos licenses allow. Wheels and source distributions contain no Logos content, sessions, browser profiles or ingest checkpoints.
Development
uv sync
uv run pytest tests/unit -q
- Unit tests use the SDK only; core is never installed for them.
- Core integration tests need Research Engine 0.6 installed and a disposable
PostgreSQL with
vector,pg_trgmandltree. They drive core's own discovery, approval, migration and load, and ingest a fixture book through it:LOGOS_TEST_DB_URL=postgresql://... pytest tests/integration/test_core_plugin_host.py. - Migration tests need a disposable PostgreSQL:
LOGOS_TEST_DB_URL=postgresql://... uv run pytest tests/integration/test_plugin_migrations.py. They create and drop their own databases, so never point them at a corpus you care about. - Live tests call the real Logos API with a stored session and are opt-in:
LOGOS_LIVE=1 uv run pytest -m live. - Artifacts:
uv build, thenpython scripts/check_dist.py dist.
Security and support
- Security issues: do not put details in a public issue. Open an issue asking for a private contact, and the maintainer will arrange one.
- Bugs and questions: GitHub issues.
Include
logos-diagnoseoutput, which reports cookie names and lengths but never values. Never pastecookies.jsonor anything frombrowser-profile/.
Licensed under the Apache License 2.0.
Release files for marginalia-ai-plugin-logos 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| marginalia_ai_plugin_logos-0.2.1.tar.gz | 104.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| marginalia_ai_plugin_logos-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 233.7 kB
Release files / marginalia_ai_plugin_logos-0.2.1.tar.gz
| Download URL | marginalia_ai_plugin_logos-0.2.1.tar.gz |
|---|---|
| Size | 104.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fabc94ece331341e898b4caa1bae335cd2c366e9121a2751c00f56f7f3a24e3
|
|
BLAKE2b-256 checksum How to use checksums |
a22ea2fa1f0985bb8a96102b4a45c4fcb00b2f8c5581687e0c7b50c781a85b0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / marginalia_ai_plugin_logos-0.2.1-py3-none-any.whl
| Download URL | marginalia_ai_plugin_logos-0.2.1-py3-none-any.whl |
|---|---|
| Size | 128.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30ebd910e9944a764fe7bea2d6c26918973a1f33c36505bc267930e7cd0585a5
|
|
BLAKE2b-256 checksum How to use checksums |
2910ddfffc888155e8ef79a4f2672430f9a42cbfb965d1f12cea7d0a415ad4a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log