
TriliumNext (trilium-mcp)
io.github.OVDEN13Published by GitHub account OVDEN13v0.1.5Updated Oct 24, 2026
Read and write a self-hosted TriliumNext knowledge base over its ETAPI.
Overview
MCP server that lets an AI assistant read and write a self-hosted TriliumNext knowledge base over its ETAPI, creating, searching, moving and tagging notes.
- What you can do
- Create notes, including batch creation under a parent with labels in one call
- Read note metadata, bodies and whole subtrees as nested trees
- Update, append to, move, clone and delete notes or branches
- Search the knowledge base with Trilium query syntax, optionally scoped to a subtree
- Attach, list and remove labels and relations that act as columns or links
- When to use it
- Useful when you keep notes in a self-hosted TriliumNext instance and want an assistant to capture research, decisions or reading lists, maintain label-based table or board views, and pull snippets from your existing notes into a conversation.
- Requirements
- A running TriliumNext instance reachable over HTTP(S) and an ETAPI token created in Trilium options, supplied as TRILIUM_TOKEN. TRILIUM_URL is required and accepts comma-separated URLs for failover. Optional TRILIUM_HTTP_TIMEOUT_SECONDS and TRILIUM_MCP_LOG. Runs as a local binary or Docker image over stdio; no runtime dependencies.
Installation
In SourceWeft
- Open TriliumNext (trilium-mcp) in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
trilium-mcp
An MCP server that lets AI agents (Claude Desktop, Claude Code, any MCP-compatible client) read and write a self-hosted TriliumNext knowledge base over its ETAPI.
Single static Go binary. No runtime dependencies. Talks to your local Trilium over HTTP(S) and to the client over stdio.
Why
TriliumNext is a strong personal KB: tree-of-notes with attributes (labels, relations) that double as table columns / board lanes / calendar events. This MCP exposes the right slice of ETAPI so an agent can:
- Capture stuff into your notes (reading lists, decisions, research dumps).
- Maintain structured "tables" by creating notes-as-rows under a parent and tagging them with labels-as-columns.
- Search your existing KB and feed snippets back into a conversation.
It is intentionally minimal: ten tools, ~600 lines of Go, zero clever abstractions.
Tools
Quick start
1. Run TriliumNext
If you don't already have one:
Open http://localhost:8092/, finish the setup wizard, then Options → ETAPI → Create new ETAPI token. Copy the token (shown only once).
2. Install trilium-mcp
Pre-built binary (recommended) — grab the right archive from Releases.
From source with Go 1.23+:
With Docker (no Go on host):
3. Configure
Copy .env.example to .env next to the binary:
Or pass the same as real environment variables — the server reads either.
4. Register with your MCP client
Claude Code (CLI):
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your OS:
Restart the client. The ten tools should show up as trilium__*.
Usage patterns
"Database" of notes (the killer feature)
Trilium's collection views (Table / Board / Calendar) render any note's children based on shared labels. So a "table" is just a parent note + child notes + a consistent label schema:
An agent populates it like this:
Flip the parent's view to Table (or Board by status, or Calendar by a date label) in the Trilium UI and you have a database without ever leaving notes.
Append-only log
append_content is non-destructive — handy for daily journals, decision logs, ideation dumps.
Trilium search cheat sheet
#tag— note has labeltag.#status=active— label equals.#rating>=8— numeric comparison.~author.title *= "Clear"— follow a relation, match relation target's title.note.title %= "^Re:"— regex on title.note.content *= "kubernetes"— substring in body.#status=active OR #status=pending— boolean.- Combine with
ancestor_note_idto scope to a subtree.
Full reference: Trilium search docs.
Environment variables
Building from source
Cross-compile (e.g. for macOS from Linux):
Security notes
- The server reads
TRILIUM_TOKENfrom env. Treat it like a password — anyone with it can read and write your entire KB. Keep.envout of git (it is in.gitignore). - The binary speaks only to your configured Trilium URL. It does not phone home, log to disk, or open any listening ports.
- HTTPS works automatically (the binary ships with system CAs when run from the host; the Docker image includes
ca-certificates).
Contributing
PRs welcome. Useful directions:
- Stream large note bodies instead of buffering.
move_note/clone_notetools.- Bulk operations (
add_label_to_many). - ETAPI v2 features as TriliumNext adds them.
- Tests against an ephemeral TriliumNext container.
For substantive changes, please open an issue first to discuss the shape.
License
MIT.
trilium-mcp is an independent project; it is not endorsed by or affiliated with the TriliumNext project. TriliumNext itself is AGPL-3.0; this MCP server talks to it only over its public ETAPI.
Source: README.md at commit a3a3289
Tools
0Version history
1- v0.1.5LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts