Trilium Notes
Hierarchical note tree with attributes and scripting, driven by the ETAPI REST API and an in-repo MCP route.
Trilium is a self-hostable notes app (desktop and server) built around an arbitrarily deep note tree with labels, relations, note versioning, encryption, and scripting. The server ships ETAPI, a documented REST API for notes, branches, attributes, attachments, and calendar notes, and since 2026 an MCP route (apps/server/src/routes/mcp.ts) that exposes the LLM tool registry.
- you want a deeply nested personal or team knowledge tree that an agent can populate through a stable REST API
- you outgrew flat markdown folders and want attributes, relations, and saved searches
- AGPL-3.0
- The desktop app and server versions must match for sync; disable auto-updates on the server when using TriliumDroid
- ETAPI needs a token created in the UI (Options > ETAPI) or from POST /etapi/auth/login with the instance password
- MCP route tool names were not read; they come from the core LLM tool registry (packages/core llm/tools)
Last activity Sep 3, 2026. Fit: adaptable 2, operable 3.
Adaptable: what is yours to change
Make it yours
Config only11 things to edit
config.ini (from apps/server/src/assets/config-sample.ini) sets instanceName, noAuthentication, noBackup, port, https with certPath and keyPath, trustedReverseProxy, session cookieMaxAge, OAuth multi-factor (oauthBaseUrl, oauthClientId, oauthClientSecret, oauthIssuerBaseUrl), and the security switches backendScriptingEnabled and sqlConsoleEnabled. TRILIUM_DATA_DIR and its siblings relocate data, logs, backups, and the config file. docker-compose.yml is in the repo.
- Env vars
TRILIUM_DATA_DIRTRILIUM_CONFIG_INI_PATHTRILIUM_DOCUMENT_PATHTRILIUM_BACKUP_DIRTRILIUM_LOG_DIRTRILIUM_TMP_DIRTRILIUM_OCR_CACHE_DIRTRILIUM_ANONYMIZED_DB_DIR- Config files
config.inidocker-compose.yml- Prompt files
.claude/skills/- Accounts you need
- an OAuth provider (optional, for multi-factor login)
Source
- github.com/TriliumNext/Trilium
- AGPL-3.0 license
- Last commit Sep 3, 2026
- 37,683 stars
Operable: what an agent can drive
Interface
OfficialAPIpublished by the builderlocal
How an agent can drive an Operable Listing, in five levels: native (built for the agent as the primary interface), official (the Builder ships an agent interface), wrapped (a third party wraps the software's API), config (an agent can only drive it by editing files), gui (screen control only). An interface is official only when it is published by the same organization that ships the software. GUI-level Listings are allowed and sorted last.
Reach
Partial coverage. 8 of 10 jobs reachable through the stated interface.
| Job | Through the interface | Evidence |
|---|---|---|
| Create, read, update, and delete notes | Reachable | ETAPI /notes and /create-note |
| Place notes in the tree (branches, clones) | Reachable | ETAPI /branches |
| Labels and relations | Reachable | ETAPI /attributes |
| Search with Trilium's query language | Reachable | ETAPI /notes?search= |
| Attachments | Reachable | ETAPI /attachments |
| Day, week, month, and year calendar notes | Reachable | ETAPI /calendar/days, /weeks, /months, /years |
| Note revisions and export | Reachable | ETAPI /notes/{id}/revision, /notes/{id}/revisions, /notes/{id}/export and /import |
| Backup | Reachable | ETAPI /backup/{name} |
| Scripting and widgets | Not reachable | backend scripts run inside the app; ETAPI cannot execute them |
| Sync and protected (encrypted) notes | Not reachable | sync is app-to-server; protected notes need the session password in the UI |
Code stack
- Languages
- TypeScript
- Frameworks
- ExpressElectronCKEditor
- Package manager
- pnpm
- Database
- SQLite
- Hosting target
- dockerbinary
- Built
- Mixed (recorded, never ranked)
Model stack
- Providers
- configurable LLM providers for the built-in AI chat
- Models
- none
- Keys you need
- none
- Prompts live in
.claude/skills/
Skills
Repo tooling for Trilium contributors: client UI, Electron and Capacitor builds, coverage, releases.
- Kind
- contributor
- Paths
.claude/skills/*/SKILL.md
Evidence and confidence
| Field | Where it was seen | Confidence |
|---|---|---|
| formFactor | README: server install with Docker with web UI; desktop builds also exist | 70% |
| executionModel | built-in LLM chat and tool registry (mcp_server.ts imports allToolRegistries from the llm tools); notes work without a model | 70% |
| operability | docs.triliumnotes.org ETAPI page: token from Options > ETAPI or POST /etapi/auth/login with the password; sent as 'Authorization: <token>', 'Authorization: Bearer <token>' (v0.93+), or Basic with username etapi. OpenAPI spec in repo at apps/server/src/assets/etapi.openapi.yaml (securitySchemes EtapiTokenAuth apiKey + basic); 31 paths incl. /notes, /branches, /attributes, /attachments, /calendar/*, /backup, /metrics. apps/server/src/routes/mcp.ts also present. | 95% |
| effort | config-sample.ini keys and TRILIUM_* names in apps/server/src/services/data_dir.ts | 90% |
| editions | AGPL, free; third-party hosting only | 95% |
| active | pushedAt 2026-09-03 | – |
| provenance | CLAUDE.md and .claude/skills in repo; project from 2017 | 40% |
| reach | 70% |
Open questions
- Read the MCP tool names from the core LLM tool registry and decide whether the MCP route should replace ETAPI as the stated interface
- Decide whether the MCP route (apps/server/src/routes/mcp.ts) should replace ETAPI as the stated interface once its tool list is read
Sources
- github.com/TriliumNext/Trilium sourcing:notes-knowledge:github
- github.com/TriliumNext/Trilium/blob/main/apps/server/src/assets/config-sample.ini analysis