OnMind-RAG
This lightweight knowledge base (RAG) MCP server enables agents to query, search, and retrieve content from one or more static sites, complementing a static site generator. Key capabilities:
List configured sites (
list_sites): View loaded sites, body-cache statistics, and Orama search engine status (mode, embeddings, snapshot).Summarize the knowledge base (
catalog_summary): Get document counts by site, category, language, and top tags, filterable by visibility (public,protected,all).Full-text search (
search_content): Perform BM25 searches (optional hybrid/vector if embeddings enabled) across titles, descriptions, tags, and full markdown body. Filter by site, category, language, tags, and visibility. Paginate withlimitandoffset.Retrieve document metadata (
get_entry): Fetch full metadata for a document by its stable ID (e.g.,know:devops/es/Keycloak).Read full document (
read_document): Get the complete markdown body (without frontmatter) from cache/disk, with configurable truncation up to 100,000 characters.List series (
list_series): List documents in a category ordered by filename for sequential reading (e.g., chapters, dream logs).Reload catalog (
reload_catalog): Re-read index and markdown files from disk and rebuild the Orama index, respecting snapshot settings.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OnMind-RAGSearch for 'markdown indexing' in the knowledge base"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OnMind-RAG
A complementary and independent project from OnMind-PUB: a lightweight knowledge base (light RAG) that exposes an MCP server so an agent (MCP client) can query the content of one or more sites.
It is not part of the init → index → build → publish workflow. It only reads the _index.json already generated by a site and, on demand, the markdown.
Idea
On startup, the server loads
docs/public/_index.jsonfrom each configured site.Normalizes in memory (stable IDs, clean tags,
visibility, path to.md).Body cache: reads each
.mdonce, storesbodyText(no frontmatter) and logs time/size to stderr.Search engine: Orama BM25 full-text by default;
hybrid/vectormodes opt-in with embeddings.Exposes compact MCP tools: summary → search (meta + body) → document reading.
No _catalog.json is written. If the site re-indexes externally, use the reload_catalog tool.
Related MCP server: md-graph
Requirements
Node.js ≥ 18 (or Bun with Node compatibility)
At least one site with
docs/public/_index.json(e.g.sites/knowfrom OnMind-PUB)
Setup
cd rag
cp .env.example .env # optional; you can also export vars
bun install # or: npm installVariables (see .env.example):
Variable | Meaning |
| Paths to site roots, comma-separated (required) |
| Optional labels (same order) |
|
|
| Max chars returned by |
|
|
|
|
|
|
| Vector dimensions (default 384) |
|
|
| Snapshot path (default |
Example:
export RAG_SITES=../sites/know
# or multiple:
# export RAG_SITES=../sites/know,../sites/andreySmoke test (no MCP)
RAG_SITES=../sites/know bun run smokeWith embeddings + hybrid:
RAG_SITES=../sites/know RAG_EMBEDDINGS=1 RAG_SEARCH_MODE=hybrid bun run smokeWith snapshot (2nd load ~100 ms):
RAG_SITES=../sites/know RAG_SNAPSHOT=1 bun run smoke # first: saved
RAG_SITES=../sites/know RAG_SNAPSHOT=1 bun run smoke # second: loadedStart MCP server (stdio)
RAG_SITES=../sites/know bun run mcpMCP Client (Cursor / Claude Desktop / Grok / Jan)
{
"mcpServers": {
"onmind-rag": {
"command": "bun",
"args": ["/absolute/path/to/pub/rag/src/server.js"],
"env": {
"RAG_SITES": "/absolute/path/to/pub/sites/know",
"RAG_VISIBILITY": "public",
"RAG_SEARCH_MODE": "fulltext",
"RAG_EMBEDDINGS": "0",
"RAG_SNAPSHOT": "0"
}
}
}
}You can also use
nodeinstead ofbun
{
"command": "node",
"args": ["/absolute/path/to/pub/rag/src/server.js"],
"env": { "RAG_SITES": "/absolute/path/to/pub/sites/know" }
}Tools
Tool | Purpose |
| Loaded sites, body-cache stats, search-engine status (Orama, embeddings, snapshot) |
| Stats by category / language / tags (orientation) |
| Full-text Orama (BM25) by default on title/description/tags/body. |
| One record by |
| Markdown body (preferably from cache; truncatable) |
| Series ordered by |
| Re-reads |
Typical agent flow:
catalog_summary → search_content → get_entry / list_series → read_documentRelation to OnMind-PUB
OnMind-PUB | onmind-rag |
Generates | Only consumes it |
Publish workflow | Outside that flow |
Lives in monorepo for convenience | Movable: just point |
Body cache (startup)
In stderr you'll see something like:
[onmind-rag] index: 289 entries from 1 site(s) in 3ms at ...
[onmind-rag] body cache: 289 docs, 3533.3 KiB in 59ms (missing path=0, read errors=0)
[onmind-rag] search engine: orama · mode=fulltext · embeddings=off · 289 docs · 450msWith RAG_CACHE_BODY=1 (default): Orama indexes the body field → search_content performs full-text BM25 over the entire markdown. read_document answers from memory (fromCache: true).
With RAG_CACHE_BODY=0: Orama only indexes metadata (title, description, tags) → search_content does not find matches in the document body. read_document falls back to disk reads.
Disable only if RAM is very tight or corpus > 50 MB and you accept metadata-only search.
Search engine (Orama)
Mode | What it does |
| BM25 with stemming, typo tolerance, field boosting. Fast, no external deps. |
| BM25 + vector (cosine) — needs |
| Vector similarity only — needs |
Embeddings (opt-in)
RAG_EMBEDDINGS=1 uses local feature-hashing (no TensorFlow, no API keys) — a portable baseline to exercise the vector/hybrid path. Not a SOTA semantic model. For real quality, replace embed.js with a provider (OpenAI, Xenova/transformers.js, etc.) keeping the embedText(text, { dims }) interface.
Snapshot (opt-in)
RAG_SNAPSHOT=1 serializes the Orama index to disk (data/orama-snapshot.json + .meta.json). On subsequent starts, if the corpus fingerprint (ids, titles, body length, hide, embeddings flag/dims) matches, it loads the snapshot in ~100 ms instead of re-indexing (~450 ms).
Limits (by design)
Lexical/BM25 retrieval + hash vectors (no SOTA embeddings unless you plug them in).
No knowledge graph / neighbors yet (next step: markdown links).
Designed as a useful, portable base — not a managed vector engine.
Why Spanish tokenizer?
The corpus is predominantly Spanish (~80%). Orama's default English tokenizer treats short technical codes like "XDB", "IAM", "UCDM" as stop-words/noise. Setting language: 'spanish' in the tokenizer indexes them correctly.
Based on onmind-rag v0.2.0 — MCP server for knowledge retrieval with Orama BM25 + opt-in hybrid/vector + snapshot
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceA local MCP server that allows AI systems to search and retrieve information from a custom knowledge base generated from markdown files. It provides tools for natural language text search, category browsing, and specific content chunk retrieval.Last updated3
- Flicense-qualityAmaintenanceMCP server that enables full-text search and link navigation over Markdown files as a knowledge graph.Last updated
- Alicense-qualityCmaintenanceMCP server for local knowledge management with Markdown and PDF indexing using SQLite FTS5.Last updated92MIT
- Flicense-qualityBmaintenanceA CLI tool and MCP server that turns markdown documentation into a searchable, queryable knowledge base.Last updated143
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kaesar/onmind-rag'
If you have feedback or need assistance with the MCP directory API, please join our Discord server