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
- 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.
- 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.
- An MCP server exposes three tools over HTTP: search, list_books and list_categories. Search can be limited to one document or one category.
- 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.
- 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.
- 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.
- The index covers material we hold. Book text is not hosted or quoted on this site.
How it flows
- AI assistant to MCP server: search(question)
- MCP server to Vector store: Find closest passages
- Vector store to MCP server: Top 50 passages
- MCP server to Reranker: Reorder by relevance (optional)
- Reranker to MCP server: Best matches first
- MCP server: Is this covered at all?
- MCP server to AI assistant: Passages, or "not covered"
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
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.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.
Related
Service
Document intelligence
Indexed corpora with citation-verified findings, so answers link back to the source page.
See all custom build servicesFree tools built the same way
More builds
- AI Stack CVE Labs: Security research
- Agentic Agency: Agent framework
- AI Usage Dashboard: AI infrastructure and operations
- Geo-Intel: Data pipeline
- RapidAPI MCP: API integration
- Claude Budget: AI spend control
- Flightdeck: Agent operations
- Niagara BQL and NEQL Reference: OT reference
- IG Sanitize: Privacy tool
- WinHostPEAS: Security tooling
Last updated 2026-11-10