ai-brain-mcp
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., "@ai-brain-mcpsearch my notes for MCP server setup"
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.
ai-brain-mcp
An MCP server that exposes a markdown knowledge vault (Obsidian-style) as agent-readable memory: search, read, graph, guarded capture. One stdio server, every Claude surface.
It deliberately has no embeddings and no vector database. See Why no RAG.
What it gives an agent
Tool | Purpose |
| Boot context: the root routing docs, every note with size and tags, and the tag index. One call, ~1.2k tokens for a 350 KB vault. |
| Lexical search across title, tags, headings and body. Ranked, with line-numbered snippets. Filter by tag or folder. |
| Read a note by wikilink name or path. |
| Outgoing wikilinks (resolved, broken, ambiguous), backlinks, and notes sharing the same tags. |
| The only write path. Appends to the capture queue. Canonical notes are unreachable. |
The intended loop is brain_map once per session, then brain_search to locate and brain_read to pull. The agent reasons about what it needs instead of receiving whatever a similarity score returned.
The read budget
The pathological case in a personal vault is one monolithic note. brain_read refuses to dump anything over AI_BRAIN_READ_BUDGET and returns the heading tree annotated with per-section sizes:
⚠ This note is 17.6 KB, above the 7.8 KB read budget, so here is its outline.
Call brain_read again with `section` to pull one part.
## Outline
- Large Project — 17.5 KB
- Architecture — 7.2 KB
- Data Layer — 2.2 KB
- Transport Layer — 2.3 KB
- Operations — 7.2 KB
- Deploy Notes — 2.3 KB
- Rollback Notes — 2.3 KB
- Open Questions — 2.8 KB
- Further ReadingThe agent now knows exactly what to pull, and a 128 KB note costs ~800 tokens to triage instead of ~33,000 to read. Section reads honour the same budget, so a top-level heading spanning the whole file is not a back door around it.
Safety as code, not as prompt
Vault rules like "never delete" and "never overwrite a canonical note" are enforced structurally rather than asked for in a system prompt:
There is no delete tool and no canonical write tool. A confused model cannot produce one.
brain_capturereaches only the two configured capture directories, always appends, never overwrites.Every filesystem access goes through one
safeJoinchoke point that rejects traversal.
Related MCP server: Neuro Vault MCP
Install
Requires Node 20+.
git clone https://github.com/HenryCordes/ai-brain-mcp
cd ai-brain-mcp
npm install # builds via prepare
npm test # 36 end-to-end checks against a fixture vault, no setup neededCheck it against your own vault (read-only, never writes):
npm run doctor -- ~/AI-Brainconnected · 5 tools: brain_map, brain_search, brain_read, brain_graph, brain_capture
root: /Users/you/AI-Brain · 49 notes · 351.3 KB
map payload: ~1209 tokens
3 note(s) over the read budget, served as outlines:
Projects/Large Project.md · 128.3 KB · ⚠ large: read by sectionClaude Code
claude mcp add --scope user ai-brain -- node /absolute/path/to/ai-brain-mcp/dist/src/index.js ~/AI-BrainClaude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows:
{
"mcpServers": {
"ai-brain": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/ai-brain-mcp/dist/src/index.js", "/absolute/path/to/vault"]
}
}
}Use an absolute path for command. The desktop app does not inherit your shell PATH, so a bare node fails to resolve under nvm or Homebrew. node -e 'console.log(process.execPath)' prints the right value.
Cowork
Nothing extra. Cowork sessions proxy the MCP servers registered in Claude Desktop, so once the entry above exists the same tools appear there. One server, one vault, every surface, with no exported snapshot to keep in sync.
Configuration
Setting | Default | Meaning |
first CLI argument | — | Vault root. Wins over the env var. |
|
| Vault root. |
|
| Characters above which |
|
| Docs |
|
| Capture target for raw material. |
|
| Capture target for drafted note edits. |
Skipped during indexing: .obsidian, .git, .trash, node_modules.
Your vault is a runtime argument, never repo content. Nothing from it is copied into this project.
Why no RAG
Embeddings earn their keep when you physically cannot look at everything. A 600 KB vault is roughly 150k tokens: the whole corpus fits in a single context window, and a full in-memory scan of it takes single-digit milliseconds. That is faster than a vector round trip, and the agent can see why a note matched rather than trusting a cosine score it cannot inspect.
The structure a RAG pipeline would try to recover statistically — folders, frontmatter tags, wikilinks, heading hierarchy — is already hand-authored in a vault like this. Indexing it away and approximating it back is a net loss.
What actually hurts at this scale is not recall, it is one 128 KB note that an agent can only read all-or-nothing. That is a chunking problem, and the read budget solves it without an embedding model anywhere in the stack.
If a vault outgrows this, src/search.ts is the single seam: swap its body for BM25 or a hybrid index. The tool contract above it does not change, so nothing downstream has to be re-taught.
Architecture
src/config.ts vault root, ignore list, capture allowlist, safeJoin
src/vault.ts index (notes, tags, links, headings), wikilink resolution, sections
src/search.ts in-memory ranked lexical search ← the swappable seam
src/capture.ts the only write path, queue-only, append-only
src/tools.ts MCP tool surface and output formatting
src/index.ts stdio wiring
src/doctor.ts install check against a real vault
test/smoke.ts end-to-end over the real protocol, against test/fixtures/vaultThe index refreshes itself by fingerprinting (path, mtime, size) on every call. At this scale a rescan is cheaper than any cache-invalidation scheme, so there is no staleness to reason about.
Development
npm run dev # tsc --watch
npm test # build, then the full suite against a disposable fixture copyTests drive the server as a real MCP client over stdio, so they exercise the protocol rather than the internal functions. The fixture vault covers tags, wikilinks, a broken link, an ambiguous note name, headings inside fenced code, an ignored .obsidian directory, and an oversized note.
License
MIT
Built by Henry Cordes — devartist.nl · LinkedIn
This server cannot be installed
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
- AlicenseAqualityBmaintenanceMCP server that exposes a local Obsidian vault as persistent, searchable memory for AI agents, with hybrid retrieval, reranker, and PDF support.3485129MIT
- Alicense-qualityAmaintenanceAn MCP server that provides semantic search and vault operations for Obsidian notes, enabling agents to recall and manage notes with provenance and low token usage.276ISC
- Alicense-qualityBmaintenanceAn MCP server that provides controlled read/write tools for managing local-first research memory in an Obsidian vault, enabling AI agents to maintain project context across sessions.71MIT
- Alicense-qualityAmaintenanceAn MCP server that enables AI agents to read, search, and write to your Obsidian vault.4MIT
Related MCP Connectors
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
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/HenryCordes/ai-brain-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server