Brainllm logo

Brainllm

Persistent, human-editable graph memory for LLMs stored in self-hosted TriliumNext Notes.

Install Brainllm

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "brainllm": {
      "command": "npx",
      "args": [
        "-y",
        "brainllm"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio brainllm -- npx -y brainllm

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

brainllm gives LLMs persistent, graph-structured memory backed by self-hosted TriliumNext Notes. It exposes MCP tools over stdio, Streamable HTTP, and legacy SSE, while enforcing note placement, labels, templates, links, deduplication, lifecycle handling, and backups. Sessions can load personal context, record durable knowledge, track work threads, and close with logs, reflection, and a database backup. Reach for it when an LLM needs editable long-term memory across multiple sessions and clients.

Use cases

  • Carry personal context across LLM sessions
  • Track ongoing work with dated thread entries
  • Store source-linked knowledge in an editable graph
  • Review session changes and maintain daily logs
  • Back up memory when closing a session

Key features

  • Persistent graph memory in TriliumNext Notes
  • Human-editable notes and typed relations
  • Server-enforced templates, labels, and placement
  • Session orientation, logging, reflection, and close checks
  • stdio, Streamable HTTP, and legacy SSE transports
  • Built-in OAuth 2.1 and static bearer-token authentication

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 46d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16h ago via OSV.dev · brainllm (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads2.5kPackage downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.

How Brainllm works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Brainllm

brainllm is an MCP server that connects LLM clients to self-hosted TriliumNext Notes for persistent, graph-structured memory. Its main tools cover session handling, memory, knowledge, and insights, allowing models to load context, record durable facts, connect related notes, track work, and preserve session history across conversations.

Run brainllm as a Bun process and connect it to a TriliumNext Notes instance through the public ETAPI. The project targets Bun 1.4.2 or newer and includes a separate bootstrap CLI for creating its initial five-area tree.

brainllm stores memory in TriliumNext Notes. Each memory is an ordinary note that people can open, read, edit, and correct, with structure added through areas, domains, labels, and typed links.

Yes, brainllm is described as working with Cursor through MCP. It also supports Claude Code, Claude Desktop, claude.ai, Cowork, Claude mobile, and other MCP clients.

brainllm supports stdio, Streamable HTTP, and legacy SSE. Remote deployments can also use its built-in OAuth 2.1 authorization server or a static bearer token.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBrainllm AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/brainllm?style=directory)](https://allmcps.com/mcp/brainllm)
HTML Embed
<a href="https://allmcps.com/mcp/brainllm"><img src="https://allmcps.com/api/badge/brainllm?style=directory" alt="Brainllm on AllMCPs" /></a>