Brain.mdSAFE
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.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A local-first second brain for you — and for your AI agents.
[](LICENSE) [](https://bun.com) [](docs/mcp.md) [](#-semantic-search-rag) [](https://glama.ai/mcp/servers/mi4uu/brain.md) [](https://smithery.ai/server/mi4uu/brain-md)
What you get
db3b8ed9ff75OBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add web --env BRAINMD_LOG_OAUTH=${BRAINMD_LOG_OAUTH} -- npx -y @brain/[email protected]{
"mcpServers": {
"web": {
"command": "npx",
"args": [
"-y",
"@brain/[email protected]"
],
"env": {
"BRAINMD_LOG_OAUTH": "${BRAINMD_LOG_OAUTH}"
}
}
}
}Exposed tools (17)
16 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
append_note | read | |
compare_notes | read | |
context_for_query | read | |
current_datetime | read | |
find_orphans | read | |
find_related | read | |
find_similar_tasks | read | |
get_backlinks | read | |
get_tasks | read | |
list_notes | read | |
list_tags | read | |
read_note | read | |
search_notes | read | |
semantic_outline | read | |
similar_notes | read | |
weekly_digest | read | |
write_note | write |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- declared (8 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (13)
const importPath = "../../../web/dist/" + rel;
import f0 from "../../../web/dist/.DS_Store" with { type: "file" };import f1 from "../../../web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2" with { type: "file" };import f2 from "../../../web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff" with { type: "file" };import f3 from "../../../web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf" with { type: "file" };baseURL: "http://127.0.0.1:1",
typescript
@elysiajs/cors, @lancedb/lancedb, @modelcontextprotocol/sdk, apache-arrow, elysia, gpt-tokenizer, onnxruntime-web, yaml
@codemirror/autocomplete, @codemirror/commands, @codemirror/lang-markdown, @codemirror/language, @codemirror/search, @codemirror/state, @codemirror/view, @lezer/highlight
server/src/rag/assets/ort-wasm-simd-threaded.wasm
web/public/icon_.svg
curl -fsSL https://raw.githubusercontent.com/mi4uu/brain.md/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/mi4uu/brain.md/main/install.sh | bash
Gates applied: no_behavioural_pass.
db3b8ed9ff75full audit observations/trust-audit/mcp-server/mi4uu__brain-md.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | db3b8ed9ff75 | SAFE | B | 89 | first audit |
Questions
What is the Brain.md MCP server?
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.
What tools does Brain.md expose?
17 in total: 16 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Brain.md safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Brain.md need?
It reads BRAINMD_LOG_OAUTH from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Brain.md run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as @brain/web at 0.4.10.
How current is this page?
The grade is for one exact copy of the source (db3b8ed9ff75), read on 2026-10-09. The repository is watched and re-audited when it changes.