Skip to main content
MCP server CX Codex

TriliumNext (trilium-mcp) — Claude Code MCP server: notes access

Lets an agent read and write your TriliumNext knowledge base over ETAPI. Useful when your notes live in Trilium and you want to file things there from a chat.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env TRILIUM_URL=<TRILIUM_URL> --env TRILIUM_TOKEN=<TRILIUM_TOKEN> --env TRILIUM_HTTP_TIMEOUT_SECONDS=<TRILIUM_HTTP_TIMEOUT_SECONDS> --env TRILIUM_MCP_LOG=<TRILIUM_MCP_LOG> --transport stdio triliumnext-trilium-mcp -- docker run -i --rm -e TRILIUM_URL -e TRILIUM_TOKEN -e TRILIUM_HTTP_TIMEOUT_SECONDS -e TRILIUM_MCP_LOG ghcr.io/ovden13/trilium-mcp:0.1.5
Open on GitHub

What TriliumNext (trilium-mcp) does

The server ships as a single static Go binary with no runtime dependencies. It speaks stdio to the client and HTTP or HTTPS to Trilium. The toolset covers note creation one at a time or in bulk, fetching metadata and whole subtrees, partial updates, appending text to a body, deletion, re-parenting, cloning and branch removal. Search and attribute handling sit alongside: labels, relations, listing them, dropping one by id.

You need a running TriliumNext instance plus an ETAPI token, which the settings page shows once. Connection details go into TRILIUM_URL and TRILIUM_TOKEN; TRILIUM_HTTP_TIMEOUT_SECONDS caps each request and TRILIUM_MCP_LOG sets log verbosity. TRILIUM_URL accepts a comma-separated list — the server walks it in order and moves on when a transport error hits, while an HTTP error such as 404 comes back right away.

Logs go to stderr because stdout carries the JSON-RPC stream. Running it in Docker means passing the environment variables into the container; without them the server has nothing to connect to.

What it helps with

  • file links and notes into Trilium without leaving the agent chat
  • build a table out of note rows tagged with labels as columns
  • find entries by label, relation or a title regex
  • append a line to a decision log and leave the rest untouched
  • move or duplicate a note under a second parent

Example prompts for the agent

  • Create a note titled Atomic Habits under the Books node with labels status=read, rating=9, author=Clear
  • Search the Books subtree for notes tagged #status=read and #rating>=8
  • Append a line to the journal note: shipping v0.2 on Monday

How to install TriliumNext (trilium-mcp)

Platform CLI

claude mcp add --env TRILIUM_URL=<TRILIUM_URL> --env TRILIUM_TOKEN=<TRILIUM_TOKEN> --env TRILIUM_HTTP_TIMEOUT_SECONDS=<TRILIUM_HTTP_TIMEOUT_SECONDS> --env TRILIUM_MCP_LOG=<TRILIUM_MCP_LOG> --transport stdio triliumnext-trilium-mcp -- docker run -i --rm -e TRILIUM_URL -e TRILIUM_TOKEN -e TRILIUM_HTTP_TIMEOUT_SECONDS -e TRILIUM_MCP_LOG ghcr.io/ovden13/trilium-mcp:0.1.5

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about TriliumNext (trilium-mcp)

How do I install TriliumNext (trilium-mcp) in Claude Code?

Run `claude mcp add --env TRILIUM_URL=<TRILIUM_URL> --env TRILIUM_TOKEN=<TRILIUM_TOKEN> --env TRILIUM_HTTP_TIMEOUT_SECONDS=<TRILIUM_HTTP_TIMEOUT_SECONDS> --env TRILIUM_MCP_LOG=<TRILIUM_MCP_LOG> --transport stdio triliumnext-trilium-mcp -- docker run -i --rm -e TRILIUM_URL -e TRILIUM_TOKEN -e TRILIUM_HTTP_TIMEOUT_SECONDS -e TRILIUM_MCP_LOG ghcr.io/ovden13/trilium-mcp:0.1.5`, replacing the placeholders with your own values.

What does TriliumNext (trilium-mcp) do?

It gives an agent access to your TriliumNext base through ETAPI: creating, reading, updating and deleting notes, working with subtrees, labels and relations, and running searches.

What does the server need to run?

A TriliumNext instance and an ETAPI token from its settings. The address and token are set through TRILIUM_URL and TRILIUM_TOKEN.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor