CYBERAUTOMATIONSStart a project
Knowledge baseIn daily use

A security library that agents can search by meaning

A retrieval index built over security books and reports we hold: more than 100,000 passages in ChromaDB, served to AI agents through a three-tool MCP server with optional reranking and a relevance gate.

passages indexed
100k+
documents (Aug 2026)
1,066
plain search
~50 ms

The problem

Security reference material lives in books, reports and cheat sheets. An AI agent in the middle of a task cannot flip through them, and keyword search misses passages that describe the same technique in different words.

Search results also need to be safe to hand to an agent. Offensive security text contains real attack strings, and some of them read exactly like instructions to an AI.

The approach

  1. Ingest is incremental and resumable. Each source file gets an id from its path, and a ledger records size and modified time, so a rerun only processes files that are new or changed.
  2. Text is split into passages of up to 1,500 characters with a 200 character overlap and stored in ChromaDB, with a second collection holding one record per document.
  3. An MCP server exposes three tools over HTTP: search, list_books and list_categories. Search can be limited to one document or one category.
  4. Reranking is optional. When asked, a second model reads the question and each passage together and reorders the top 50. If that model is missing, search falls back to the original order instead of failing.
  5. A relevance gate is also optional. It can answer "the library does not cover this" with an explicit no-coverage result rather than returning weak matches. Passages that look like instructions to an AI are kept, but wrapped and labelled as quoted data.
  6. Serving is separate from ingest. The query server runs as a supervised service on a small always-on machine with no GPU, while ingest runs wherever the source files are.
  7. The index covers material we hold. Book text is not hosted or quoted on this site.

How it flows

AI assistantMCP serverVector storeRerankersearch(question)Find closest passagesTop 50 passagesReorder by relevance (optional)Best matches firstIs this covered at all?Passages, or "not covered"
  1. AI assistant to MCP server: search(question)
  2. MCP server to Vector store: Find closest passages
  3. Vector store to MCP server: Top 50 passages
  4. MCP server to Reranker: Reorder by relevance (optional)
  5. Reranker to MCP server: Best matches first
  6. MCP server: Is this covered at all?
  7. MCP server to AI assistant: Passages, or "not covered"
One search, from question to cited passages. Solid arrows are requests, dashed arrows are replies.
Show this diagram as Mermaid text
sequenceDiagram
    participant P0 as AI assistant
    participant P1 as MCP server
    participant P2 as Vector store
    participant P3 as Reranker
    P0->>P1: search(question)
    P1->>P2: Find closest passages
    P2-->>P1: Top 50 passages
    P1->>P3: Reorder by relevance (optional)
    P3-->>P1: Best matches first
    P1->>P1: Is this covered at all?
    P1-->>P0: Passages, or "not covered"

Tech stack

Language
Python
Vector store
ChromaDB (persistent)
Parsing
PyMuPDF for PDFs, pandas for tabular files
Server
MCP Python SDK, streamable HTTP transport
Ranking
Vector search, optional cross-encoder reranker, optional relevance gate
Runtime
Supervised Linux service, CPU only

Results

  • At the August 2026 count the index held about 103,000 passages from 1,066 documents. The number moves with every ingest run.
  • A plain search returns in about 50 milliseconds on a CPU-only host.
  • Reranking costs about 81 milliseconds per candidate across a 50 candidate pool, roughly 4 to 5 seconds in total, so it is off by default and used when ordering matters.
  • Any MCP client that can reach the server gets the same three tools, so several agents share one library instead of each keeping a copy.

Every figure on this page comes from the project's own code, tests or notes. Where there is no measured number, we describe the outcome in words.

Demo

MCP tool list
search(query, n_results=5, book_id="", category="", rerank=False, gate=False)
    Matching passages with text, score, title, category and source.

list_books(category="")
    Every indexed document: id, title, category, passage count, source type.

list_categories()
    The source categories.
The three tools the server offers, as an MCP client sees them.

A recorded search session and current passage counts are being prepared.

Source code

The source is being prepared for public release. Until then, contact us for a walkthrough of Security Knowledge Base.

Service

Document intelligence

Indexed corpora with citation-verified findings, so answers link back to the source page.

See all custom build services

More builds

Last updated 2026-11-10

Want something like this on your data?

Tell us what you want automated. If it fits, we will tell you exactly what it looks like and what it costs.