Skip to main content

Research Engine

Research Engine builds a searchable, citable research corpus and exposes it to MCP clients. The base package includes the CLI, PostgreSQL schema/migrations, MCP server, remote inference clients, lightweight text ingestion, extraction, entity/event services, and plugin host.

It does not install PostgreSQL, database extensions, local ML models, Docling, GPU drivers, or third-party plugins.

Install

python -m pip install marginalia-ai
# Everything, including local inference and document AI:
python -m pip install "marginalia-ai[full]"

Optional features are independently installable:

  • marginalia-ai[openai] — OpenAI-compatible LLM adapter;
  • marginalia-ai[local-inference] — sentence-transformers embedding and reranking;
  • marginalia-ai[documents] — PDF text, EPUB, HTML, and TEI parsers;
  • marginalia-ai[document-ai] — Docling layout/OCR and office/image conversion;
  • marginalia-ai[embed-server] — FastAPI/Uvicorn plus its local inference runtime.

Local inference and Docling may download multi-gigabyte models and can require substantial disk, RAM, and GPU capacity. A standard PyPI install does not select PyTorch's alternate CPU wheel index; follow PyTorch's CPU installation instructions first when required.

Database

Use PostgreSQL 15 or newer with vector, pg_trgm, and ltree available. Creating extensions may require an elevated database role. Set the async URL explicitly:

export RE_DB_URL='postgresql+asyncpg://user:password@localhost:5432/research_engine'
ALEMBIC_INI="$(python -c 'from importlib.resources import files; print(files("research_engine").joinpath("adapters/storage/postgres/migrations/alembic.ini"))')"
alembic -c "$ALEMBIC_INI" upgrade head
research-engine doctor

pg_dump and pg_restore are external requirements for backup commands.

Run over MCP

{
  "mcpServers": {
    "research-engine": {
      "type": "stdio",
      "command": "research-engine",
      "args": ["serve"]
    }
  }
}

No checkout or repository working directory is required. research-engine --help and research-engine config --help describe the installed command surface.

Data and trust

Remote LLM providers receive prompts and selected corpus text and may charge per token. Review provider settings and budgets before ingestion or extraction.

Plugins are ordinary Python distributions. Installation makes their static manifests available; research-engine plugin enable ID displays and records the exact version, hash, contributions, and permissions before code is imported. Enabled plugins execute in-process. Scoped clients are the supported API boundary, not a security sandbox; enable only trusted artifacts.

See the documentation, changelog, issues, and Apache-2.0 license.

Release files for marginalia-ai 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marginalia-ai 0.6.0
File Size Uploaded
marginalia_ai-0.6.0.tar.gz 341.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for marginalia-ai 0.6.0
File Interpreter ABI Platform
marginalia_ai-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 832.1 kB

Release files / marginalia_ai-0.6.0.tar.gz

Download URL marginalia_ai-0.6.0.tar.gz
Size 341.8 kB
Tags Source
SHA-256 checksum
How to use checksums
50178613d51a0911cdd845150d51e605adc5c10f4f25039c3de5d11e70a716e2
BLAKE2b-256 checksum
How to use checksums
fe38df9bbd5637a4f7d78e5281e07f9ad949b46b8774df09b261e6bd1b220e5e
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 18, 2026.

Transparency log

Release files / marginalia_ai-0.6.0-py3-none-any.whl

Download URL marginalia_ai-0.6.0-py3-none-any.whl
Size 490.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b86fc38272a837b624a7a9fcf677db727689bc2a96165692378de3a1311e5ca4
BLAKE2b-256 checksum
How to use checksums
8dcf38c250c6983b514c1f65786f7ac49b9268ace1e95169da6a81e6c3b77e96
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.2

2 release files

0.6.1

2 release files

This release

0.6.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page