About Brain Rag
Brain Rag is an MCP server published by dasportillo in the RAG category: hybrid retrieval-augmented search over a corpus of markdown files. Vector and keyword search fused into one ranking, optionally reranked by a cross-encoder, served locally over a warm-model daemon, and exposed to LLM tools over MCP. Conduid read 8 tools from its source: explore_entity, get_context, get_state, keep_session, list_projects, save_memories and 2 more. No package is published for it, so it installs from a source checkout.
The repository has 1 stars and 0 forks, and its last commit was on 10 Nov 2026. Conduid has no tagged release on record for it. Its topics include embeddings, rag, semantic-search, sqlite and vector-search.
Install
git clone https://github.com/dasportillo/brain-ragTools (8)
explore_entityExplores one ENTITY from the heuristic entity graph — a service hostname, a DB table, an S3 bucket/ARN, a repo, a file path, or a SCREAMING_SNAKE state name. Returns where it lives: projects, mention count, recency, top co-occurring entities, and the most recent mention snippets. USE IT for "what talks to X?", "where is X used?", "what do we know about <service/table/ARN/state>?" — for exact identifiers it is more precise than search_context.get_contextAssembles the FULL working context for a project in ONE call: curated state note + active decisions + recent knowledge + open TODOs + potential conflicts, size-budgeted with a sources footer. USE IT FIRST at session start, when the user asks "where did I leave off?", or to ramp up on a known repo — one call replaces get_state + several search_context calls. Model-free and instant. Falls back to recent activity when the project has no curated data yet.get_stateReturns the curated CURRENT state of a project (state/<project>.md), the precise source of "where I am today". USE IT when the user asks "where did I leave off?", "give me the state of X", "what state is X in?", "what do you know about this project?". If no curated note exists it falls back to recent indexed activity (clearly marked NOT curated) — synthesize it and save_state to persist the real note.keep_sessionMarks THIS conversation to be saved into the brain (indexed when the session ends). The brain is OPT-IN — nothing is saved unless kept, so an un-kept chat is lost. USE IT PROACTIVELY, without being asked, when this conversation produced something worth remembering later: a decision, a solution/fix, a design, or non-obvious context about a project. Do NOT call it for trivial, throwaway, or purely exploratory chats. Idempotent.list_projectsLists the projects indexed in the second brain, with session/chunk counts and last activity.save_memoriesSaves DISTILLED knowledge into the memory store (Layer 2) — durable facts, not conversation chunks. USE IT PROACTIVELY when this session produces something worth keeping: a decision (+why), a bug root cause, a solution, an architecture fact, a preference, a lesson. Each memory must be SELF-CONTAINED (readable without the conversation). Same title = refresh in place; pass supersedes:<id> to retire an outdated memory (the response warns about similar existing ones).save_stateWrites/overwrites the curated CURRENT-STATE note for a project (state/<project>.md) — the precise "where I am today" layer that get_state serves. USE IT when the user asks to save/update the state, or at the end of a work session to persist decisions and current status. Pass a concise Markdown note (Now / In flight / Decisions / Blockers / Next). It OVERWRITES the previous note, so include everything still true — that is how reverted decisions get removed instead of resurfacing in search.search_contextSearches the history of work conversations (all projects). Returns the most relevant chunks with project/date. USE IT when the user asks "what did we decide about X?", "how did I solve Y?", "what did we do with Z?", "search the brain for…", or before assuming there is no prior context on a topic. Recovers past decisions and work.Security checks
6 checks have not been run yet.