louvain-engine
Permission-aware retrieval for enterprise AI. Hybrid search over your company's documents for agents and RAG, with a permission check in every query, from one command.
Install / Use
claude mcp add louvain-ai -- npx -y github:louvain-ai/louvain-engineIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Our assessment of louvain-engine
louvain-engine scores 76/100 on our quality scale, 825th of 961 AI & Machine Learning skills we index.
Its MCP Server is 14 KB long, well organised into 12 sections with 10 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated yesterday, so louvain-engine is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
louvain-engine compared with similar skills
All 4 of these similar skills score higher than louvain-engine; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| louvain-engine (this skill)by louvain-ai | 76 | 10 | 1d ago | MCP Server |
| claude-memby thedotmack | 100 | 119.2k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 114.1k | 1d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 93.7k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 88.6k | today | CLAUDE.md |
Frequently asked questions
- How do I install louvain-engine?
- Run
claude mcp add louvain-ai -- npx -y github:louvain-ai/louvain-engine. The install tabs above show the steps for each supported agent. - Which AI agents does louvain-engine work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is louvain-engine safe to use?
- It is Apache-2.0-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is louvain-engine still maintained?
- The repository was last updated yesterday, so louvain-engine is actively maintained.
Skill content
View source on GitHubThe open retrieval engine behind Louvain: it finds the right document in your company’s files, behind a permission fence, and hands it to your agent with its source, self-hosted, over MCP and HTTP.
Louvain's own build scored 91.32% (preliminary, on a 100-question development sample); this repository doesn't reproduce it yet. EnterpriseRAG-Bench asks enterprise questions over a large company corpus and judges each answer on whether it is correct and complete. How it was measured
<p align="center"><img src="assets/quickstart.svg" alt="A terminal running the quickstart" width="760"></p>Retrieval your agents can trust.
Retrieval that scores. Keywords and meaning search together, so the right document comes first however the question is worded. Add a reranker in one line when you want more.
Permissions built in. Every query passes a permission check first. Add readers and grant each the collections it may read, in config; Louvain syncs real permissions from your tools.
Fits your stack. MCP tools for your agents, plugins as plain functions, and Postgres underneath. Open source, under Apache-2.0.
How it works
- Your documents. Folders, records or HTTP.
- The index. Keywords and meaning.
- Permission-checked search. The fence first, every query.
- Your agent or app. The right document, with its source.
Quickstart
Four commands to your first search.
You need Docker with Compose, Node 22, pnpm 10, curl and network access to Hugging Face for the first build.
1. Get it. The repository, with its lockfile and its schema.
git clone https://github.com/louvain-ai/louvain-engine && cd louvain-engine
2. Start it. Installs and builds on the first run, makes this install's secrets in the .engine directory (never
printed), starts Postgres and the two sidecars with Docker Compose, loads the schema and starts the tool server. It
prints the server's address and where its token is.
./engine up
Installing (the lockfile pins every version)...
Building the workspace packages...
Settings: wrote .env from .env.example.
Starting the engine's services (the first run builds their images)...
Reranker: off (engine.config.ts names none).
Schema: loaded.
Tools: http://127.0.0.1:8080/mcp
App: http://127.0.0.1:8080/app/
Token: .engine/token
Ready.
The first run downloads about 0.7 GB of packages, the 0.6 GB Postgres image and the embedding model, built into a 1.8 GB
image: about a minute on a datacenter connection. It uses four ports on 127.0.0.1: Postgres 5434, embeddings 8091,
keyword index 8095 and the tool server 8080; if one is taken, up names the .env setting that moves it. ./engine status shows what runs, ./engine logs its recent output, and ./engine down stops it all, keeping your data.
3. Send it a folder. Each readable file under the folder becomes one document in a collection named after the folder, and each subfolder a folder an agent can list. It prints each file with the reader that took it, or why it was refused. Run it again after a change: new files are added, edited ones updated, deleted ones removed.
./engine ingest folder --folder examples/sample-corpus
ingesting examples/sample-corpus into "sample-corpus"
calibration-rig.md: added (text)
facilities-agreement.pdf: added (documents)
hiring-plan.md: added (text)
lease-renewal.md: added (text)
"sample-corpus": 4 added, 0 updated, 0 removed, 0 unchanged; 4 new passages
keyword index: 4 indexed
4. Search it. One louvain_search_sources call, printed a line per matching document, best first: <rank>. <title> · <date> · <id> (--full-ids prints whole ids, as louvain_read_source takes them). Against the sample corpus,
lease-renewal comes first.
./engine search "When does the Harbour Street lease renew?"
1. lease-renewal · 2026-11-15 · 9a1ac4976ad1
2. facilities-agreement · 2026-11-15 · c0f10b4694de
The machine
One engine, built from parts you can swap:
- One file says what runs.
engine.config.tsnames the plugins and their settings; a field left out keeps its default, and no file at all runs the defaults. - Plugins are plain functions.
documents(),text(),mcp(): each a function thatdefinePluginmakes. Six kinds: file readers (documents,text), sources (folder,records,http), retrievers (vector,keyword,figures), a reranker (sidecaron your machine, orcohere), an answerer (agent,scripted) and surfaces (mcp,app). - Profiles. A configuration of its own, with its own corpus and index:
defaultis what./engine upstarts, anderbis the configuration the benchmark figure was scored with../engine profile set <name>switches. - Three ways in. MCP tools for your agent at
/mcp, an HTTP door for ingest (off unless configured), and Search and Ask in a browser at/app/. - A new plugin in one command.
./engine plugin new <kind> <name>writes a reader, source or reranker package with a test that passes.
Connect your agent
Gives an agent the three tools over MCP, with the token the server wrote. The server listens at
http://127.0.0.1:8080/mcp (MCP over HTTP); every call carries Authorization: Bearer <token>. The server writes a
random token at first start (mode 600), unless LOUVAIN_ENGINE_TOKEN is set; up prints its path, never the token.
claude mcp add --transport http louvain-engine http://127.0.0.1:8080/mcp --header "Authorization: Bearer $(cat .engine/token)"
The server offers three tools:
louvain_search_sourcesranks documents by meaning and words.sourcesholds the documents that match,looselyRelatedthe nearest ones that do not, andmatched: falsesays nothing loaded covers the search.louvain_lookup_sourceopens the document an identifier names (a ticket key, a URL, a file name), by exact match.louvain_read_sourcereads one document whole, in pages.
Make it yours
1. Configure it. engine.config.ts at the root says what runs; a field left out keeps its default.
// engine.config.ts
import { defineEngine } from "@louvain/engine-core";
import { documents } from "@louvain/reader-documents";
import { text } from "@louvain/reader-text";
import { sidecar } from "@louvain/reranker-sidecar";
export default defineEngine({
readers: [documents(), text()],
reranker: sidecar({ url: "http://localhost:8096" }),
settings: { rerank: { window: 10 } },
});
Run ./engine down and ./engine up after a change. Configuration lists every field and
setting.
2. Write a plugin. A plugin adds a file reader, a source or a reranker.
./engine plugin new reader csv
It writes packages/plugins/reader-csv with a test that passes and a README that walks every line, then prints the
command that links it and the two lines that add it to engine.config.ts. Plugins has each
kind's contract.
3. Keep a second configuration. A profile is a folder under profiles/ with its own engine.config.ts, corpus and
index. ./engine profile prints the one in use; ./engine profile set <name> switches. The scored benchmark
configuration ships as one (Profiles).
What ships
| Part | What it is |
| --- | --- |
| packages/engine-core | The contracts every plugin is written against, and the pure code: no I/O |
| packages/engine | Ingest, the fenced reads, search and the tool server |
| packages/cli | ./engine's commands: loads engine.config.ts and starts the engine |
| packages/plugins | reader-documents (PDF, Word, Excel, PowerPoint, OpenDocument, EPUB, RTF, HTML, CSV, mail), reader-text (text, Markdown), reranker-sidecar (BAAI/bge-reranker-v2-m3 on your machine, a 2.3 GB download, best with a GPU), reranker-cohere (Cohere's Rerank API), source-http (an ingest door, off unless configured) |
| apps/app | Search and Ask in a browser, at /app/ |
| services | The embedding sidecar (Xenova/bge-base-en-v1.5) and the BM25 keyword sidecar |
| examples/ | sample-corpus (four invented documents), agent (an agent's side of the tools), an-ingest-source |
The engine starts with the two readers, the folder and records sources, the tools at /mcp and the app at
/app/, and no reranker. Docker Compose runs Postgres 17 with pgvector and the two sidecars.
Architecture maps the code.
What it promises
- The fence comes first in every read. Each read resolves the reader's readable collections once and applies them
inside every statement it sends, so no row outside them is ranked, counted or returned. A retriever gets a reading
already narrowed to that set, and every row it returns is checked against the set again. The engine's own token
reads everything loaded; every other reader, made with
./engine reader add, reads the collectionsengine.config.tsgrants it and nothing else (Permissions). - Your documents stay on your machine. Postgres and the sidecars listen on
127.0.0.1. After the first./engine updownloads packages, images and the embedding model, nothing goes out unless you choose it: a remote reranker receives each search and the texts it reranks, and the app's Ask, given a model key, sends each question and the documents it reads to that model's provider. - A file is hostile input. The engine holds every reader to regular files, 32 MB and 1,000,000 characters, and a reader that throws or answers late costs only that file. The 60-second deadline cannot stop a reader that blocks the process without yielding (Limits).
- A search says when nothing matches. A document matches when it holds the search's words, an identifier or a figure the search names, or is close enough in meaning; the rest are shown apart, as loosely related.
- No default credential. The tool server, Postgres and the sidecars each need a secret made for this install,
kept in the
.enginedirectory with mode 600 and never printed.
What it is not
- No accounts. A reader is a name and a token: no sign-up, no passwords, no single sign-on. A grant is a whole collection, never a single document, and the engine's own token reads everything.
- Not an answer engine. Its tools return documents and passages with their sources; your agent writes the answer. The app's Ask writes one only with a model key you give it.
- **No conne
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
119.2kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
114.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
93.7kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
hyperframes
88.6kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
