TriliumNext Notes' MCP Server

MCP server for TriliumNext Notes

Local serverstdioGo

What is the TriliumNext Notes' MCP server?

MCP server for TriliumNext Notes. Exposed over MCP by the triliumnext notes' mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

⚠️ DISCLAIMER: This is a prototype for https://github.com/TriliumNext/Notes/issues/705. Suggested only for developer use. Please backup your Trilium notes before using this tool. ⚠️

Adding it to your client

triliumnext-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Its toolset

Everything the assistant can do here goes through one of these:

  • search_notes — Unified search with comprehensive filtering capabilities including keyword search, date ranges, field-specific searches, attribute searches, note
  • resolve_note_id — Find a note's ID by its title. Essential for getting a note's ID to use with other tools
  • list_children_notes — List the direct child notes of a parent note using a deterministic search query. Returns child summaries sorted by creation date and title
  • get_note — Retrieve a note and its content by ID. Can also be used with regex to extract specific patterns from the content
  • create_note — Create a new note. Supports 10 note types and allows creating attributes (labels and relations) in the same step
  • update_note — Updates a note's title or content. Requires a mode ('overwrite' or 'append') to specify the update type and an expectedHash to prevent conflicts
  • move_note — Move a note to a new parent folder. Use branchId only when the note has multiple parent branches
  • patch_note — Apply targeted batched edits using mode-based patches (css, xpath, line, fragment, literal, regex) with atomic validation. Literal patches can use
  • delete_note — Permanently delete a note (⚠️ cannot be undone)
  • read_attributes — Read all attributes (labels and relations) for a given note
  • manage_attributes — Create, update, or delete attributes on a note. Supports batch creation

Configuration

You will need 7 environment variables: TRILIUM_API_URL, TRILIUM_API_TOKEN, PERMISSIONS, MCP_TIMEOUT, MCP_TOOL_TIMEOUT, VERBOSE, YOUR_TRILIUM_API_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch TriliumNext Notes'.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the triliumnext notes' mcp server does with a few real requests.

When to reach for it

Plenty of planning and project tracking servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. TriliumNext Notes''s toolset — search_notes, resolve_note_id, list_children_notes and 8 more — is a fair guide to whether it matches your workflow. It is maintained by tan-yong-sheng; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
search_notesUnified search with comprehensive filtering capabilities including keyword search, date ranges, field-specific searches, attribute searches, note properties, template-based searches, note type filtering, MIME type filter
resolve_note_idFind a note's ID by its title. Essential for getting a note's ID to use with other tools.
list_children_notesList the direct child notes of a parent note using a deterministic search query. Returns child summaries sorted by creation date and title.
get_noteRetrieve a note and its content by ID. Can also be used with regex to extract specific patterns from the content.
create_noteCreate a new note. Supports 10 note types and allows creating attributes (labels and relations) in the same step.
update_noteUpdates a note's title or content. Requires a mode ('overwrite' or 'append') to specify the update type and an expectedHash to prevent conflicts.
move_noteMove a note to a new parent folder. Use branchId only when the note has multiple parent branches.
patch_noteApply targeted batched edits using mode-based patches (css, xpath, line, fragment, literal, regex) with atomic validation. Literal patches can use occurrence and optional context to target repeated text.
delete_notePermanently delete a note (⚠️ cannot be undone).
read_attributesRead all attributes (labels and relations) for a given note.
manage_attributesCreate, update, or delete attributes on a note. Supports batch creation.

How to install the TriliumNext Notes' MCP server

{
  "mcpServers": {
    "triliumnext-mcp": {
      "command": "npx",
      "args": ["triliumnext-mcp"],
      "env": {
        "TRILIUM_API_URL": "http://localhost:8080/etapi",
        "TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
        "PERMISSIONS": "READ;WRITE"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
TRILIUM_API_URLEndpoint or connection string the server talks to.Yes
TRILIUM_API_TOKENCredential the server authenticates with.Yes
PERMISSIONSConfiguration value read at startup.Optional
MCP_TIMEOUTConfiguration value read at startup.Optional
MCP_TOOL_TIMEOUTConfiguration value read at startup.Optional
VERBOSEConfiguration value read at startup.Optional
YOUR_TRILIUM_API_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use TriliumNext Notes' to search notes.
  • Use TriliumNext Notes' to resolve note id.
  • Use TriliumNext Notes' to list children notes.

Frequently asked questions

`TRILIUM_API_TOKEN` is required. `TRILIUM_API_URL` defaults to `http://localhost:8080/etapi`. `PERMISSIONS` (default `READ;WRITE`) and `VERBOSE` (default `false`) are optional.