Brainllm MCP Server
by miisodevio.github.miisodev/brainllmv12.8.0
Self-hosted memory for LLMs in TriliumNext, structured by the server and editable by you.
context tax
queued
security
queued
cold start
queued
freshness
Active5d ago
Install Brainllm MCP server
Install in Claude Code
claude mcp add brainllm -e TRILIUM_BASE_URL='<trilium-base-url>' -e TRILIUM_ETAPI_TOKEN='<trilium-etapi-token>' -e TRILIUM_PASSWORD='<trilium-password>' -e BRAINLLM_OWNER_PASSWORD='<brainllm-owner-password>' -e BRAINLLM_OAUTH_SECRET='<brainllm-oauth-secret>' -- npx -y brainllmInstall in Cursor
{
"mcpServers": {
"brainllm": {
"command": "npx",
"args": [
"-y",
"brainllm"
],
"env": {
"TRILIUM_BASE_URL": "<trilium-base-url>",
"TRILIUM_ETAPI_TOKEN": "<trilium-etapi-token>",
"TRILIUM_PASSWORD": "<trilium-password>",
"BRAINLLM_OWNER_PASSWORD": "<brainllm-owner-password>",
"BRAINLLM_OAUTH_SECRET": "<brainllm-oauth-secret>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"brainllm": {
"command": "npx",
"args": [
"-y",
"brainllm"
],
"env": {
"TRILIUM_BASE_URL": "<trilium-base-url>",
"TRILIUM_ETAPI_TOKEN": "<trilium-etapi-token>",
"TRILIUM_PASSWORD": "<trilium-password>",
"BRAINLLM_OWNER_PASSWORD": "<brainllm-owner-password>",
"BRAINLLM_OAUTH_SECRET": "<brainllm-oauth-secret>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"brainllm": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"brainllm"
],
"env": {
"TRILIUM_BASE_URL": "<trilium-base-url>",
"TRILIUM_ETAPI_TOKEN": "<trilium-etapi-token>",
"TRILIUM_PASSWORD": "<trilium-password>",
"BRAINLLM_OWNER_PASSWORD": "<brainllm-owner-password>",
"BRAINLLM_OAUTH_SECRET": "<brainllm-oauth-secret>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"brainllm": {
"command": "npx",
"args": [
"-y",
"brainllm"
],
"env": {
"TRILIUM_BASE_URL": "<trilium-base-url>",
"TRILIUM_ETAPI_TOKEN": "<trilium-etapi-token>",
"TRILIUM_PASSWORD": "<trilium-password>",
"BRAINLLM_OWNER_PASSWORD": "<brainllm-owner-password>",
"BRAINLLM_OAUTH_SECRET": "<brainllm-oauth-secret>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| TRILIUM_BASE_URL | yes | — | Base URL of the TriliumNext instance, e.g. http://localhost:8080 |
| TRILIUM_ETAPI_TOKEN | — | yes | ETAPI token. Required unless TRILIUM_PASSWORD is set. Create one in Trilium under Options → ETAPI. |
| TRILIUM_PASSWORD | — | yes | Alternative to TRILIUM_ETAPI_TOKEN — BrainLLM mints a token on first start and caches it beside brainllm.json. |
| BRAINLLM_MODE | — | — | core (default) exposes the 45 brain-aware tools; full additionally exposes the 33 raw ETAPI tools. |
| BRAINLLM_TZ | — | — | IANA timezone used to stamp dated notes, e.g. Africa/Johannesburg. Defaults to the host timezone. |
| BRAINLLM_OWNER_PASSWORD | — | yes | Enables the OAuth 2.1 / CIMD endpoints required by claude.ai and other hosted Claude surfaces. This is the password entered on the consent screen when authorizing a client. |
| BRAINLLM_OAUTH_SECRET | — | yes | Optional 32+ character deployment secret for signing OAuth tokens; rotate it to invalidate old tokens. |
| BRAINLLM_PUBLIC_URL | — | — | Override for the public origin when a proxy rewrites Host. Must exactly match the URL entered in the client. |
| BRAINLLM_ALLOW_UNAUTHENTICATED_HTTP | — | — | Explicit trusted-network-only escape hatch for HTTP mode. Never enable on a public interface. |
| BRAINLLM_TRUST_PROXY | — | — | Trust forwarded host/protocol headers for OAuth discovery only when a trusted reverse proxy sets them. |
Freshness
Active — last maintenance signal 5d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-04 · 6d ago · GitHub
Latest release
2026-10-04 · 5d ago · GitHub · v12.8.0
Package published
no data · npm/PyPI
Registry entry updated
2026-10-04 · 5d ago · official registry · v12.8.0
FAQ
›How do I install the Brainllm MCP server in Claude Code?
Run: claude mcp add brainllm -e TRILIUM_BASE_URL='<trilium-base-url>' -e TRILIUM_ETAPI_TOKEN='<trilium-etapi-token>' -e TRILIUM_PASSWORD='<trilium-password>' -e BRAINLLM_OWNER_PASSWORD='<brainllm-owner-password>' -e BRAINLLM_OAUTH_SECRET='<brainllm-oauth-secret>' -- npx -y brainllm. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Brainllm require an API key?
Yes. It expects TRILIUM_BASE_URL, TRILIUM_ETAPI_TOKEN, TRILIUM_PASSWORD, BRAINLLM_OWNER_PASSWORD, BRAINLLM_OAUTH_SECRET, of which 4 are secrets.
›Can I use Brainllm as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Brainllm in the official MCP registry?
Yes, as io.github.miisodev/brainllm.
Alternatives to Brainllm
Other memory MCP servers.