# brain.md [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/mi4uu/brain.md  
**GitHub Stars:** 40  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brain-md

## Description
Local-first markdown notes with a first-class MCP server. 16 tools + 2 resources for Claude Code, Claude Desktop, Cursor and any MCP agent. Per-folder permissions, semantic RAG via LanceDB, single Bun binary. AGPL.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/mi4uu/brain.md), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL https://raw.githubusercontent.com/mi4uu/brain.md/main/install.sh | bash
```

2. Install:

```sh
powershell -c "irm https://raw.githubusercontent.com/mi4uu/brain.md/main/install.ps1 | iex"
```

3. Start the server:

```sh
brainmd                  # serve on :3000, vault at $HOME/.local/share/brain.md/vault
```

4. Start the server:

```sh
brainmd --vault-dir ./example/vault
```

5. Install:

```sh
curl -L -o brainmd \
  https://github.com/mi4uu/brain.md/releases/latest/download/brain-md-darwin-arm64
```

6. Install:

```sh
chmod +x brainmd
```

## Documentation

## What brain.md does

brain.md turns a folder of Markdown notes into an agent-accessible knowledge base. The files remain on disk and are compatible with Obsidian-style features including wikilinks, embeds, callouts, math, Mermaid diagrams, tasks, frontmatter, and aliases. The application also provides a browser editor, live preview, graph view, and note navigation, but its MCP surface is focused on letting agents work with the vault.

The MCP server exposes 18 tools and 2 resources through streamable HTTP on the same port as the web application. Agents can read notes, search the vault, retrieve related notes, query content, and make changes. A note view designed for MCP Apps can present interactive notes in compatible hosts; other clients receive the note text through the normal MCP response.

## How it works

Each vault has an embedded vector store. When a note is saved, its content is chunked, embedded, and indexed for semantic retrieval. The default embedder is `bge-small-en-v1.5`, executed locally through bundled WASM ONNX. After the one-time model download, this mode works offline and does not require Python, Ollama, or native dependencies.

Embedding providers can instead point to Ollama, LM Studio, OpenAI, or another service exposing a `/v1/embeddings` endpoint. Semantic search and the `similar_notes` tool are enabled from the AI / RAG settings.

MCP access can be restricted independently for each folder. Folders receive read and write permissions for the agent surface, allowing private areas such as journals to remain inaccessible while other notes stay available. Optional authentication supports password protection with argon2id, bearer tokens, and 24-hour token expiry.

## Setup and configuration

Prebuilt binaries are available for supported operating systems. The macOS and Linux installer uses `install.sh`; Windows users can run `install.ps1`. The installer downloads the platform-specific binary from the latest GitHub release and verifies it with the accompanying SHA256 checksums.

Run `brainmd` to serve the application on port 3000. By default, the vault is created under the platform’s local application-data location, including `$HOME/.local/share/brain.md/vault` on macOS and Linux. Use `--vault-dir` to select another vault, such as the repository’s example vault.

The binary can be used without installing Bun or Node.js. Cloud embedding providers are optional; the local embedder is the default path for an offline setup.

## Tools and capabilities

- Read, search, query, and write Markdown notes through MCP.
- Find semantically similar notes with the `similar_notes` tool.
- Expose two MCP resources alongside the tool collection.
- Apply separate read and write permissions by vault folder.
- Present notes through an MCP Apps interactive view where supported.
- Commit saves to Git automatically, with history, diffs, restore operations, and path-level attribution.

## Limitations and notes

MCP communication uses streamable HTTP rather than a stdio transport. The vault is intentionally a folder of Markdown files, so it does not provide a proprietary database format or replace the broader plugin ecosystem of applications such as Obsidian. Semantic search requires enabling AI / RAG and downloading the local embedding model, unless a compatible external embedding provider is selected. Authentication is optional and disabled by default.

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

