loci
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HF_ENDPOINT | No | HuggingFace mirror endpoint, used when downloading local rerank models (e.g., https://hf-mirror.com). | |
| BRAIN_LLM_API_KEY | No | API key for the LLM provider. Overrides the [llm] section in config.toml. | |
| BRAIN_EMBED_API_KEY | No | API key for the embedding provider. Overrides the [embed] section in config.toml. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| brain_searchA | Search the personal knowledge base with hybrid retrieval (vector similarity fused with BM25 keyword matching). Behavior: returns up to k ranked excerpts, each with file path, heading breadcrumb and similarity score; no LLM call is made. Usage: reach for this when you need source material to quote, verify a claim, or see what exists on a topic; use brain_ask when you want a synthesized answer instead. Results are limited to the indexed sources — run brain_ingest first if recent files are missing. |
| brain_askA | Ask the knowledge base a question. Behavior: retrieves the most relevant excerpts, then an LLM synthesizes an answer grounded ONLY in them, ending with [source: path > section] citations. Usage: prefer this over brain_search whenever a question needs synthesis or an explanation; set verify=true to get a claim-by-claim audit (supported / partial / unsupported) when accuracy matters more than speed. |
| brain_linksA | Show the Obsidian-style [[wikilink]] graph around a note. Behavior: lists every note the given note links to (outbound) and every note that links back to it (inbound), based on the current index. Usage: use to explore how a topic connects to others before asking questions, or to find related notes when search keywords fail. |
| brain_statsA | Report what the index currently contains. Behavior: returns the store path, total chunk count, chunk count per source file, the embedding and chat models in use, and retrieval settings (hybrid, rrf_k, top_k). Reads local metadata only — no LLM or embedding calls. Usage: call before searching to see what is indexed, after brain_ingest to confirm what changed, or whenever answers seem to be missing a file you expected to be there. Takes no parameters. |
| brain_wikiA | Generate a wiki page about a topic by distilling everything the index knows into one curated, cross-linked markdown page. Behavior: retrieves up to k source excerpts, an LLM synthesizes a structured page, and the page is written to the wiki directory and indexed immediately (loci's memory-consolidation layer). Requires a working LLM. Usage: use when scattered notes about a topic should become one stable, searchable page; regenerate the same topic to update it. |
| brain_rememberA | Store a durable memory (decision, fact, preference, lesson learned) into the shared knowledge base. Behavior: writes a markdown note with frontmatter tags into the memories directory and indexes it immediately, so it is searchable within the same call. Memories persist across sessions and are shared by every MCP host that mounts loci — write from one IDE, recall from any other with brain_search or brain_ask. Usage: use for decisions, facts, preferences and lessons worth recording; do not use for ephemeral chit-chat. |
| brain_graphA | Query the knowledge graph over memories and wiki pages. Behavior: with an entity, returns its outgoing/incoming relations (each cites its source file); without one, returns the top hub entities. The graph is built from |
| brain_forgetA | Retract memories that are wrong or outdated. Behavior: memory notes matching the query move to a .trash folder (recoverable by hand) and their chunks leave the index immediately; nothing is permanently destroyed. Usage: use when a remembered fact was superseded or was a mistake; check with brain_search first if you are unsure what matches. |
| brain_ingestA | Incrementally (re)index the configured source directories. Safe to call repeatedly; only changed files are re-embedded. |
| brain_harnessA | Harness memory hub: per-AI-tool (zcode, codex, ...) memory stats, or refresh each one's auto-summary note into the shared memory pool. Unchanged harnesses cost nothing. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| brain-briefing | A structured briefing on a topic from your own notes. |
| study-plan | Turn scattered notes on a topic into a learning plan. |
| contradiction-check | Find contradictions and stale claims across your notes. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| index-stats | What is in the index: chunks per source, models, settings. |
TDQS
Scored across 10 tools
Most tools target distinct actions (ingest, search, ask, remember, forget, stats, wiki), and the descriptions explicitly disambiguate the search-vs-ask and graph-vs-links pairs. The remaining mild overlap is between brain_graph and brain_links (both graph exploration) and the somewhat vague brain_harness, but guidance is clear enough to select correctly.
Every tool uses a uniform brain_ + single-verb/noun pattern (brain_search, brain_ask, brain_remember, brain_forget, brain_ingest, etc.). No casing or verb-style deviations, making the set highly predictable.
Ten tools is well within the ideal range and each earns its place: ingest, search, ask, remember, forget, stats, wiki, graph, links, and harness cover distinct capabilities. Nothing feels padded or missing at the count level.
The surface covers the full memory lifecycle: index (ingest), create (remember), read (search/ask), delete (forget), plus stats, wiki consolidation, and graph exploration. Minor gap: no explicit update/edit operation for an existing memory note (though remember can effectively overwrite), and no delete for generated wiki pages.