# brainllm [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/miisodev/BrainLLM  
**GitHub Stars:** 0  
**npm Downloads (last month):** 2525  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brainllm

## Description
Persistent graph-structured memory for LLMs in TriliumNext Notes — readable and editable by humans.

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

```json
"mcpServers": {
  "brainllm": {
    "command": "npx",
    "args": ["-y","brainllm"]
  }
}
```

## Documentation

## What brainllm does

brainllm provides persistent memory for LLMs through TriliumNext Notes, an open-source knowledge base that can be self-hosted. Memories remain ordinary Trilium notes, so people can open, read, edit, and correct them directly. The model supplies the content, while the server controls how that content is placed and maintained.

The memory is organized as a typed graph rather than an opaque embedding store. It uses areas, knowledge domains, labels, typed links, work threads, daily records, and current-state notes. Personal information such as biography, goals, and preferences can be loaded at the beginning of a session. Work can continue through dated thread entries, while knowledge claims retain a source and measured state can be kept separately.

## How it works

A Bun process written in TypeScript communicates with Trilium only through its public ETAPI. The MCP layer is available over stdio, Streamable HTTP, and legacy SSE, allowing one memory to serve different MCP clients. Retrieval combines Trilium search with the server's structural organization; brainllm does not run a model or compute embeddings.

Writes pass through server-side policy. Note kinds have canonical templates, and the server handles placement, labels, normalization, deduplication, relations, dates, and content checks. Lifecycle routines protect notes, age material, generate session-start information, and maintain daily insight logs. A close gate requires a session to be logged, reflected on, and backed up before it ends.

## Setup and configuration

Run brainllm as a Bun service and connect it to a TriliumNext Notes instance through ETAPI. The published runtime requirement is Bun 1.4.2 or newer. The server supports local stdio connections as well as HTTP-based deployments using Streamable HTTP or legacy SSE.

Remote deployments can use the built-in OAuth 2.1 authorization server, including CIMD and RFC 7591 registration, or a static bearer token. An optional owner TOTP mechanism is also included. The project provides a separate bootstrap CLI for building the initial five-area tree.

## Tools and capabilities

The codebase groups its MCP surface around master, LLM, memory, knowledge, and insights functions, with an advanced full-mode interface for raw ETAPI access. These capabilities support session orientation, durable memory writes, knowledge management, work-thread tracking, insight and change logging, and session closure.

The server also maintains typed relations, source-linked claims, daily records, revision-aware changes, and backups. Deep maintenance checks can detect structural problems such as duplicate headings, malformed tags, inconsistent table rows, or notes that disagree with one another.

## Limitations and notes

brainllm requires both a Bun runtime and a TriliumNext Notes instance, so it is intended for users comfortable hosting a small service and their own knowledge base. Data is stored in Trilium rather than in a managed vendor account. Trilium remains the storage, editing, and human-facing interface, while brainllm applies its own memory structure and lifecycle policy through ETAPI.

The server is licensed under MIT, and TriliumNext Notes is a separate project with its own license.

_Full upstream README: https://allmcps.com/mcp/brainllm/readme_

