All plugins

mediarag

Local, offline semantic search across your documents, notes, images, audio and subtitles: one index you query by meaning from Hermes or any MCP client, with snippets, timestamps and thumbnails from PDFs, Office files, photos and recordings. Disclosure — Downloads about 480 MB of EmbeddingGemma-2 ONNX model weights from Hugging Face at a pinned revision on first setup; offline after that. Reads the folders you point it at, outside the plugin directory. Runs pandoc, pdftotext, ffmpeg and curl from PATH; ffmpeg samples video files at 0.5 frames per second (first 240 frames) into its local cache to index them. Fetches the http(s) URLs you add, from public hosts only, re-checked on every redirect. Runs source adapters as local subprocesses; the optional Raindrop and Notion adapters send RAINDROP_API_TOKEN to Raindrop's API and NOTION_TOKEN to api.notion.com. With MEDIARAG_AUTO_BOOTSTRAP=1, the standalone MCP launcher installs its Python environment from PyPI, about 1.7 GB.

dyiapanis7Toolsv0.1.22Updated 9 days ago

About

Local, offline semantic search across your documents, notes, images, audio and subtitles: one index you query by meaning from Hermes or any MCP client, with snippets, timestamps and thumbnails from PDFs, Office files, photos and recordings.

Disclosure —

  • Downloads about 480 MB of EmbeddingGemma-2 ONNX model weights from Hugging Face at a pinned revision on first setup; offline after that.
  • Reads the folders you point it at, outside the plugin directory.
  • Runs pandoc, pdftotext, ffmpeg and curl from PATH; ffmpeg samples video files at 0.5 frames per second (first 240 frames) into its local cache to index them.
  • Fetches the http(s) URLs you add, from public hosts only, re-checked on every redirect.
  • Runs source adapters as local subprocesses; the optional Raindrop and Notion adapters send RAINDROP_API_TOKEN to Raindrop's API and NOTION_TOKEN to api.notion.com.
  • With MEDIARAG_AUTO_BOOTSTRAP=1, the standalone MCP launcher installs its Python environment from PyPI, about 1.7 GB.

MediaRAG

MediaRAG — one semantic index over documents, images and audio

Local multimodal semantic search over documents and media, packaged as an
agent-plugin per the agent-plugins.org 1.0
standard.

It indexes documents (pdf, office files, notes, html) and media (images, audio,
subtitles, video) into one local SQLite corpus, and you search both by meaning
from any MCP-capable agent. Video files are indexed natively: frames sampled at
0.5 fps (each frame carries its timestamp and a thumbnail — picture content is
searchable) plus the full audio track (spoken content, 11.2 s windows), so
"which file mentions the landing", "where did I talk about it", and "find the
frame with the logo" are all the same kind of question.

How it runs:

  • In-gateway: five native tools (mediarag_search, mediarag_add_source,
    mediarag_ingest_dir, mediarag_add_note, mediarag_status) register once,
    so one gateway serves all agents and the embedding model loads once.

  • Cross-client: mcp.json declares a stdio MCP server, so Claude Desktop,
    Cursor, and other Agent Plugins compliant clients load the same package.
    Per the spec the entry uses a plugin-relative command
    (./scripts/mcp_launch.py), never a bare python3: portable plugins must not
    depend on PATH or ambient variables for resolution. That launcher is
    stdlib-only and finds an interpreter that can import the engine
    (numpy/onnxruntime/transformers/torch, ~500 MB), which Agent Plugins 1.0 has
    no field to declare — so a client without a provisioned interpreter needs one
    command, once:

    python3 -m venv .venv && .venv/bin/python -m pip install -r requirements.txt
    

    Order of preference: $MEDIARAG_PYTHON, the package's own .venv/, the
    client's $PLUGIN_DATA/venv, then the interpreter that started it. With none
    present it exits 3 naming what's missing instead of vanishing mid-handshake.

    If uv is installed, it can own the environment instead — same
    requirements.txt, resolved and cached by the installer:

    uv run --with-requirements requirements.txt -- python -c pass   # once
    

    Set MEDIARAG_AUTO_BOOTSTRAP=1 to have the launcher run that on start. It is
    off by default: a first run pulls ~1.7 GB, longer than most clients wait.

  • Local-only: no cloud services. The corpus lives at <root>/.corpus/store.db.

Documents and media are embedded by the same model into the same vector space
(see Embedding model), which is why one index answers both
kinds of question.

System Requirements

Python3.11 or newer (requires-python >=3.11)
OSLinux x86_64 · Windows 10+ x86_64 · macOS 14+ on Apple Silicon
Memory~1.5 GB resident once everything is loaded — measured 834 MB after the text trunk, 1.06 GB with vision and audio added, 1.5 GB with the processor
Disk~480 MB of q4 towers on first run (measured 505 MB: 174 MB text + 109 MB vision + 189 MB audio + a 32 MB tokenizer), and up to ~450 MB more if the cache stores them as symlinks and they are materialised into ~/.cache/mediarag; the corpus then grows with whatever you index

macOS is Apple Silicon only. onnxruntime and torch publish no x86_64
macOS wheels, and their arm64 wheels require macOS 14.0 — an Intel Mac or a
macOS 13 machine cannot install this engine. CI runs the real engine on macOS
(arm64), Windows and Linux, ingest to search, on every commit.

System tools are needed only by the lanes that use them:

ToolUsed forInstall
ffmpegaudio + videoapt install ffmpeg · winget install Gyan.FFmpeg · brew install ffmpeg
pandocdocx, odt, epub, rst, html, csv, rtfapt install pandoc · winget install JohnMacFarlane.Pandoc · brew install pandoc
pdftotextpdfapt install poppler-utils · winget install oschwartz10612.Poppler · brew install poppler
curladd_source on an http(s) URLpreinstalled on all three

curl ships with Linux and macOS and is present on Windows 10+ (a built-in
curl.exe); ffmpeg, pandoc and pdftotext are not installed by default
anywhere. Everything else — numpy, onnxruntime, transformers, torch — is
pip-installed from the declared dependencies.

Install

Two ways in; both end at the same mediarag-mcp stdio server.

As a Python package — any MCP client, no clone:

uvx --from git+https://github.com/dyiapanis/mediarag mediarag-mcp   # runs it
pipx install git+https://github.com/dyiapanis/mediarag              # or: mediarag-mcp on PATH

As a plugin — for hosts that provision dependencies from the package manifest:

hermes plugins install dyiapanis/mediarag    # Hermes reads python_dependencies

The engine needs numpy, onnxruntime, transformers and torch (~1.7 GB with the
model weights); pipx/uvx/hermes install that for you. Running from a bare
checkout instead, see the MCP section below.

Python dependencies: pip install -r requirements.txt.

Runs on Linux, Windows and macOS 14+ on Apple Silicon — see System
Requirements
for memory, disk and the system-tool table.
On Windows and macOS those tools are not preinstalled; the table has the
winget/brew commands. The corpus cache lives at ~/.cache/mediarag
(%USERPROFILE%\.cache\mediarag on Windows); adapters are python scripts run
through the current interpreter, so they need neither the executable bit nor a
shebang.

The embedding weights are not downloaded on startup. Once, before first search:

python scripts/fetch_model.py

That is about 480MB into the Hugging Face cache; what is in it, and why, is
covered under Embedding model. After the download everything
runs offline (HF_HUB_OFFLINE=1).

Features

  • Hybrid retrieval: semantic vectors plus an FTS5/BM25 keyword lane, fused with
    reciprocal rank fusion. Exact-string lookups and meaning searches both work.
  • Documents and media in one index: pdf via pdftotext, docx/odt/epub/rst/html/csv/rtf
    via pandoc, plus images, audio, subtitles, and video (mp4/mov/mkv/webm/avi/m4v —
    frames at 0.5 fps + the audio track; >8 min of footage is sampled to the first 240
    frames and reports frame_cap).
  • Incremental re-indexing: unchanged files are skipped on an mtime+size
    fingerprint.
  • Source adapters: external collections through sources.d executables (see
    below).

Embedding model

One model embeds everything: EmbeddingGemma
2
in its ONNX q4
build, on onnxruntime, on the CPU. It ships three towers — the text trunk, a
vision encoder and an audio encoder — and all three write into the same
768-dimensional space, so a pdf, a photograph and a clip of you talking about
both are directly comparable.

  • Snapshot daa72c51243991dfcaf9f9137d2c573d8f7790c0 of
    onnx-community/embeddinggemma-2-ONNX. scripts/fetch_model.py pulls only the
    q4 towers plus the tokenizer and processor configs — 174 MB text, 109 MB
    vision, 189 MB audio, 32 MB tokenizer, about 505 MB — and never at startup. A
    cache that has also seen other quantisations of this model will be larger
    still, because those blobs are not evicted.
  • 768 dimensions, L2-normalised, stored as f32 blobs (3,072 bytes per row).
    Retrieval is exact cosine over the whole corpus; there is no approximate index.
  • 1024-token cap on the text trunk. Attention is quadratic in sequence
    length, so tool input is sliced at that boundary rather than trusted.
  • Chunking: documents and notes at 1,500 characters, subtitles at 600,
    audio in 11.2-second windows, video frames at 0.5 fps (one vector per frame
    plus a 256 px thumbnail — indexing runs ~3 s of embed CPU per frame).
  • If the Hugging Face cache stores the ONNX shards as symlinks, they are
    materialised once into ~/.cache/mediarag/onnx-real: onnxruntime will not
    load external-data blobs out of a sharded cache.

The three embedders are parity-locked against the reference model — 12/12 golden
vectors at cosine 1.000000 (tests/fixtures/golden.json, enforced by
tests/test_parity_slices.py).

What it touches

No telemetry. It shells out to curl (http sources), ffmpeg, pandoc,
pdftotext, and rclone when those lanes are used, and to whatever adapter
you drop in sources.d/. It reads the paths you pass plus the corpus at root
(mediarag-config.yaml root:, else MEDIARAG_ROOT, else ~/.mediarag). The Raindrop adapter calls
api.raindrop.io with RAINDROP_API_TOKEN — optional; inside Hermes the token
is resolved through the profile secret scope, and a missing scope does not
inherit another profile's value.

To run it as a Hermes plugin, point the plugin loader at this directory (or at
the agent plugin catalog entry). The manifests (mcp.json, plugin.yaml,
plugin.json) describe both the stdio MCP server (scripts/mcp_server.py,
spawned by the client) and the in-gateway native tools. Neither mode opens a
network listener.

Configuration

Everything is optional and set through the environment:

  • mediarag-config.yaml — named corpus config in the plugin dir (root: key); wins over env and the default (see mediarag-config.example.yaml)
  • MEDIARAG_ROOT — corpus root (default: ~/.mediarag)
  • MEDIARAG_ALLOW_PRIVATE_URLS=1 — let add_source fetch loopback/private-network URLs (standalone; inside Hermes the host's security.allow_private_urls applies). Link-local and cloud-metadata addresses are always refused.
  • RAINDROP_API_TOKEN, NOTION_TOKEN, PCLOUD_MOUNT, OBSIDIAN_VAULT — adapter inputs

Adapters

add_source accepts public http(s):// URLs (fetched with curl, capped at 256MB;
every redirect hop is checked and loopback/private/link-local/metadata hosts are refused)
and source-scheme URIs (<scheme>://...) handled by adapters. Six ship in the
box:

  • dropbox:// — Dropbox through the desktop client's local folder, or any mirror
    (DROPBOX_DIR env). Skips Dropbox's own .dropbox/ bookkeeping.
  • rclone://remote:path — any rclone remote. Files copy
    into a persistent cache at ~/.cache/mediarag/rclone and index from there.
  • pcloud:// — walks a locally mounted pCloud drive (PCLOUD_MOUNT env).
  • obsidian:// — an Obsidian vault; skips .obsidian/, .trash/, .git/.
  • raindrop:// — Raindrop.io bookmarks through the REST API
    (RAINDROP_API_TOKEN env).
  • notion://<page-or-database-id> — Notion pages through the REST API
    (NOTION_TOKEN env, an integration secret). Text only: Notion-hosted files
    carry signed URLs that expire within an hour, so they are not indexed.

To write your own adapter, drop an executable at sources.d/<scheme> under the
configured corpus root (mediarag-config.yaml / MEDIARAG_ROOT / ~/.mediarag; a
per-call root argument never adds adapters) that
accepts fetch <rest> and prints one JSON object per line, either
{"uri","title","text"} or {"uri","path"}. status reports the adapters it
found; an unknown scheme fails with the list of what is available.

Development

Tests are direct-run scripts, not pytest-collectable:

  • python tests/test_contract.py — tool/store/adapter contracts (no model)
  • python tests/test_ingest_units.py — chunking, subtitle timings, store integrity
  • python tests/test_engine_deref.py — sharded-cache materialisation (no model)
  • python tests/test_config_root.py — corpus-root precedence (no model)
  • python tests/test_parity_slices.py — FTS lane, RRF fusion, doc bridge (needs the model)

The fixtures under tests/fixtures/ are synthetic and deterministic, and nothing
contacts the network. tests/bench_engine.py and scripts/bench.sh are the
local benchmark harness. CI runs the model-free suites on Linux and Windows,
plus the full parity lane on Linux.

License

MIT. For security reports, see SECURITY.md.

Acknowledgements

This project was developed with AI assistance using Hermes Agent.

README from the reviewed commit 8b2423d; it updates when the author re-pins.

More by dyiapanis

4 plugins by dyiapanis in the catalog.

dyiapanislimbicLocal long-term memory for Hermes agents: facts and preferences stay on your machine in one SQLite file with bundled embedding and natural language inference (NLI) models, decaying and reconsolidating organically with use and abstaining rather than guessing. No LLM calls. Disclosures Network: ~1.0GB of pinned, sha256-verified ONNX models download from huggingface.co on first session start (Arctic 2.0 L int8 ~570MB; MiniLMv2 NLI ~430MB). Optional spaCy models pip-install ~14.5MB from spaCy's GitHub releases — version not hash-pinned. Local files: everything lives under HERMES_HOME (limbic.db, backup VACUUM snapshots) except the model cache ~/.cache/limbic, which is pruned at every model load — files not in the pinned manifest are deleted, so never point cache_dir at a shared folder. Memories at trust zero are deleted. forget: user-scoped two-step (list candidates, pick one) that appends a hash-only receipt (sha256, length, user id, fact id) to limbic.db.deletions.jsonl beside the database. Agent surface is exactly remember, recall, forget — no shell commands, no background services, no stored credentials, no telemetry.Communitymemory23dyiapanistabellaRead, create and convert documents — .docx, .xlsx, .pptx, .pdf, .odt, .ods, .odp — from structured JSON or HTML/CSS, with OCR for scanned files. Disclosures Shells out to pandoc for conversion, a TeX engine for PDF output, and tesseract for OCR. Re-execs into its own dependency venv, bootstrapped from PyPI on first run. Optional self-host HTTP server; a bearer token is generated into the plugin data directory on first run. Reads and writes only the filesystem paths you pass. Runs entirely locally: no network calls, no telemetry.Communitytools6dyiapanispass-secretspass (password-store) secret source: resolves secrets from a local, GPG-encrypted, git-tracked password store into environment variables at startup, as a first-class SecretSource beside the built-in Bitwarden and 1Password sources. Disclosure — When enabled, shells out to the local pass binary (10 s per entry) for every .gpg entry under the configured store subdirs and injects each as an env var that by default overrides .env and shell values; when enabled, also adds a ~900-char system-prompt note about secret resolution; registers a pre_gateway_dispatch hook that consumes !secret//secret messages before gateway auth and, only for senders listed in the plugin's chat_allowed_users setting (empty = off), writes the value into the pass store with pass insert -f (a shared/ entry becomes an env var in every agent at next start); no network.Communitytools1

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section