TriliumNextCAUTION
MCP server for TriliumNext Notes
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
⚠️ 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. ⚠️
A model context protocol server for TriliumNext Notes. This server provides tools to interact with your Trilium Notes instance through MCP. You can use this MCP with triliumnext-skills.
Also, if you would like to back up your trilium instances to multiple cloud storage providers such as cloudflare R2, AWS S3 and google drive simultaneously, please visit: https://github.com/tan-yong-sheng/trilium-backup
Alternatives to suggest:
Quick Start
Make sure to set up your environment variables first:
TRILIUM_API_URL(default: http://localhost:8080/etapi)TRILIUM_API_TOKEN(required, get this from your Trilium Notes settings)PERMISSIONS(optional, default='READ;WRITE', where READ grants access tosearch_notes,get_note,resolve_note_id, andread_attributes, and WRITE grants access tocreate_note,update_note,delete_note, andmanage_attributes)VERBOSE(optional, default='false', which if true will print verbose debugging logs)
Installation
Below are the installation guide for this MCP on different MCP clients, such as Claude Desktop, Claude Code, Cursor, Cline, etc.
Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"triliumnext-mcp": {
"command": "npx",
"args": ["triliumnext-mcp"],
"env": {
"TRILIUM_API_URL": "http://localhost:8080/etapi",
"TRILIUM_API_TOKEN": "",
"PERMISSIONS": "READ;WRITE"
}
}
}
}Claude Code
44fc9c421191OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add triliumnext-mcp --env TRILIUM_API_TOKEN=${TRILIUM_API_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"triliumnext-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"TRILIUM_API_TOKEN": "${TRILIUM_API_TOKEN}"
}
}
}
}Exposed tools (9)
4 read · 3 write · 2 destructive. Blast radius: 2 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
create_note | write | Create a new note in TriliumNext with duplicate title detection. When a note with the same title already exists in the same directory, you |
delete_note | destructive | Delete a note permanently. ONLY use this tool when the user explicitly requests note deletion (e.g., |
get_note | read | Get a note and its content by ID. Perfect for when someone wants to see what |
list_children_notes | read | List all direct child notes of a given note using a deterministic Trilium search query. Returns child note summaries including noteId, title, type, mime, and dateModified, sorted by dateCreated desc then title. |
move_note | write | Move a note to a new parent location in the note tree. IMPORTANT: In TriliumNext a note can exist in multiple locations (branches). If the note has only one parent it moves directly. If it has multiple parents you must specify |
patch_note | write | Apply targeted patches to a note using one unified batch schema. WORKFLOW: 1) Call get_note to obtain current content and contentHash (blobId), 2) Design patches, 3) Call patch_note with expectedHash. Use mode= |
read_attributes | read | Read all attributes (labels and relations) for a note. View existing labels (#tags), template relations (~template), and note metadata. This tool provides read-only access to inspect current attributes assigned to any note. Returns structured data with labels, relations, and summary information. |
resolve_note_id | read | Resolves a note/folder name to its actual note ID for use with other tools. You MUST call this function when users provide note names instead of note IDs (e.g., |
update_note | destructive | Update note with support for title-only updates, content overwrite, content append, or file replacement. ⚠️ REQUIRED: ALWAYS call get_note first to obtain current hash. ⚠️ SIMPLER RULES: Note type and MIME type are IMMUTABLE - cannot be changed after creation. MODE SELECTION: Use |
Trust audit
CAUTIONgrade B · trust 86/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (5 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (14)
.agents
.codex
delete_note, update_note
CLAUDE.md
import { handleCreateNote } from '../../build/modules/noteManager.js';import { createReadTools } from '../../build/modules/toolDefinitions.js';import { handleListChildrenNotes } from '../../build/modules/noteManager.js';import { handleListChildrenNotesRequest } from '../../build/modules/noteHandler.js';import { createWriteTools } from '../../build/modules/toolDefinitions.js';-e TRILIUM_API_URL=http://192.168.1.100:8080/etapi \
anthropic, mcp
@modelcontextprotocol/sdk, axios, marked, mime-db, node-html-parser, safe-regex2, @types/node, typescript
PERMISSIONS="READ;WRITE" // Full access
- **Issue**: Functions checked lowercase "read" vs uppercase "READ" environment variable
Gates applied: no_behavioural_pass.
44fc9c421191full audit observations/trust-audit/mcp-server/tan-yong-sheng__triliumnext.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 44fc9c421191 | CAUTION | B | 86 | first audit |
Questions
What is the TriliumNext MCP server?
MCP server for TriliumNext Notes
What tools does TriliumNext expose?
9 in total: 4 read-only, 3 that write, and 2 that can delete or overwrite (delete_note, update_note). Every one is listed on this page with its risk.
Is TriliumNext safe to connect to an agent?
With care. The audit graded it B (86/100) and found 14 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 2 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does TriliumNext need?
It reads TRILIUM_API_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does TriliumNext run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as triliumnext-mcp at 0.3.17.
How current is this page?
The grade is for one exact copy of the source (44fc9c421191), read on 2026-10-07. The repository is watched and re-audited when it changes.