# brain-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/debashishthakur/brain-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 426  
**Views:** 11  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brain-mcp

## Description
Your Obsidian vault as private, searchable memory for Claude, Cursor, Hermes and any MCP client

## Tools
Capabilities this server exposes over MCP:

- **brain_identity** — Call this FIRST in every conversation. Returns who the owner is, their preferences and feedback rules, the projects they run, and what they touched recently. Adopt it as your persona and working context. Captured facts are only the ones true now; brain_facts has their history. Pass `topic` (a few words about what the conversation is about) to get a smaller bundle with only the memory notes that apply.
- **brain_context** — One call that returns the most relevant sections from across the vault for a question, with source note ids. Use this before brain_search when you need to answer or reason about something the owner may have written down. Ask in plain words: retrieval is hybrid (keywords + meaning + a reranker), so paraphrases work; still include specific nouns, ids and dates when you have them. The reply states its coverage (good / thin / none).
- **brain_search** — Full-text search across every note with optional filters. Returns ranked hits with snippets and note ids for brain_read. Keywords or a short question both work (hybrid keyword + semantic search with spelling correction); the reply states its coverage.
- **brain_read** — Return one note in full (or one section of it) by note id, title, or wikilink target. Includes frontmatter metadata, topics, and links.
- **brain_project** — One-call briefing on a project: what it is, its notes grouped by type, latest progress entries, decisions, and what changed recently. Call this before discussing any project. Omit the project name to list all projects.
- **brain_graph** — Neighbours of a note, hub, or concept: outgoing links, backlinks, and notes sharing the same topics. For a concept (e.g. 'OAuth') this shows every project that touches it. Use it to hop sideways between projects.
- **brain_recent** — Notes modified in the last N days, newest first. Answers 'what am I working on' and 'what did I do last week'. Hubs and concepts are excluded unless include_structural is set.
- **brain_capture** — Write a new note into the vault's capture folder with graph-ready frontmatter. Use for plans, decisions, ideas, meeting notes, or session logs the owner wants to keep. Not for one-line facts (use brain_remember). The reply lists existing notes the body names without linking.
- **brain_remember** — Append one durable fact about the owner to their memory file: a preference, a correction on how to work, a project constraint, or a reference. It becomes part of brain_identity immediately. Include why it matters and how to apply it. When it changes an earlier fact, pass `replaces` with that fact's id (the stamp in its heading, e.g. '2026-09-22 18:21'): the old fact stays in the file as history and leaves brain_identity. For a fact with one current value, pass `subject` and `attribute` (e.g. 'JobMail' and 'database'); a later fact with the same pair replaces it on its own. Use `valid_until` for something temporary and `valid_from` when it became true earlier than now. Near-duplicates of current facts are refused, and a fact that looks like it changes a current one is held back until you say whether it replaces it; pass force=true to store it as is. Do not store session trivia.
- **brain_facts** — Facts recorded with brain_remember and when each was true. By default, the facts true now. `as_of` returns the facts true at another time (a bare date means the end of that day); `history` lists every version, oldest first, with what replaced it or when it expired; `subject` narrows to one thing, e.g. a project; `query` filters by words. The ids are the ones brain_remember's `replaces` takes.
- **brain_write** — Create a note at a path you choose under Notes/ or Captures/, or replace one there with overwrite=true. Use it for hubs, guides and runbooks maintained by hand. Unlike brain_capture you set the type, including 'hub': a hub groups every note whose frontmatter project matches its title. Generated notes elsewhere in the vault cannot be written. The reply lists existing notes the body names without linking.
- **brain_edit** — Change part of a note under Notes/ or Captures/ without rewriting it. Give exactly one of: old_text + new_text (old_text must occur exactly once; new_text may be empty), section + content (replaces everything under that heading up to the next heading of the same or higher level; the heading itself stays), or append. Generated notes and the memory file cannot be edited. The reply lists existing notes the new text names without linking.
- **brain_move** — Move or rename a note within Notes/ and Captures/, for example to promote a capture into Notes/. Refuses to overwrite an existing note, and reports any links that stop resolving.
- **brain_delete** — Remove a note from Notes/ or Captures/ by moving it into the vault's .trash/ folder, which is never indexed. Nothing is erased; the result gives the path to restore from. Generated notes and the memory file cannot be deleted.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "brain-mcp": {
    "command": "npx",
    "args": ["-y","debawho-brain-mcp"]
  }
}
```

## Documentation

## What brain-mcp MCP server does

The brain-mcp MCP server exposes an Obsidian vault as persistent context for MCP-compatible AI clients. Notes remain as Markdown files in a folder controlled by the user, while the server maintains a SQLite index containing full-text search data, section embeddings, links, topics, and project metadata.

It supports both reading and writing. Agents can load identity and project context, search notes, inspect individual sections, follow links, review recent changes, capture new notes, remember facts, edit existing content, move notes, or send notes to `.trash/` instead of permanently deleting them.

## How it works

A file watcher updates the index after vault changes. Notes are divided into sections, with links, topics, and project information extracted for retrieval and graph operations. Embeddings use the `bge-small-en-v1.5` model, and candidate results can be reranked with `bge-reranker-base`. These models run locally on the CPU and are downloaded into `data/models`.

Queries are expanded for known shorthand and corrected against words found in the vault. Retrieval combines BM25 keyword matches, semantic similarity, exact dates, and note-title matches. Reciprocal rank fusion combines those result sets before reranking selected candidates. If the strongest passage is below the configured relevance floor, the server reports that the vault does not contain a relevant answer rather than presenting a weak match.

The server can communicate over stdio, HTTP with a bearer token, or OAuth 2.1 with PKCE through Cloudflare Tunnel. Notes do not leave the server during normal local operation. Remote access includes scopes, secret redaction, and an audit log of calls.

## Setup and configuration

The repository targets Node.js 22 or newer and uses strict TypeScript.

Hybrid retrieval is enabled by default according to the documentation. Set `BRAIN_MCP_HYBRID=0` to use keyword-only retrieval. Retrieval behavior can also be adjusted in `brain.config.json`, including embedding and reranker models, candidate counts, score blending, the relevance floor, shorthand expansions, and context budgets. Additional constants such as `RRF_K` and `TITLE_BONUS` are available in the indexing code.

## Tools and capabilities

- `brain_identity` returns profile, memory, facts, skills, projects, and recent focus; it accepts an optional topic.
- `brain_context` selects relevant sections under a size budget and reports source notes and coverage.
- `brain_search` returns ranked note snippets with project, type, topic, and date filters.
- `brain_read`, `brain_project`, `brain_graph`, and `brain_recent` inspect notes, projects, links, backlinks, shared topics, and recent changes.
- `brain_capture`, `brain_remember`, `brain_write`, `brain_edit`, `brain_move`, and `brain_delete` provide constrained write operations.

`brain_remember` rejects near-duplicate facts unless forced, can mark partial overlaps with a supersession line, and feeds captured facts into identity results. Writes are limited to allowed folders, with `Notes/` and the capture folder writable by default. Moving does not overwrite existing notes and reports links that no longer resolve; deletion moves content to `.trash/`.

## Limitations and notes

The brain-mcp MCP server depends on the structure and content of the connected vault. It can explicitly report missing coverage, but it cannot supply information that the notes do not contain. The hybrid models are local and retrieval falls back to keywords while they are unavailable. The current design uses fixed retrieval rules, one process, and one SQLite database; the documentation identifies pluggable retrievers, storage, and graph strategies as future possibilities rather than current features.

_Full upstream README: https://allmcps.com/mcp/brain-mcp/readme_

