Atlas / MCP servers / tan-yong-sheng / TriliumNext

TriliumNextCAUTION

mcp/tan-yong-sheng/triliumnext

MCP server for TriliumNext Notes

Verdict
CAUTION
Grade
B
Trust score
86 /100
Exposed tools
9 4r · 3w · 2d
Transport
stdio · streamable-http
License
—
Stars
69
01

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 to search_notes, get_note, resolve_note_id, and read_attributes, and WRITE grants access to create_note, update_note, delete_note, and manage_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

Read from source at commit 44fc9c421191OBSERVED · 2026-10-07
02

Connect

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-code
claude mcp add triliumnext-mcp --env TRILIUM_API_TOKEN=${TRILIUM_API_TOKEN} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "triliumnext-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "TRILIUM_API_TOKEN": "${TRILIUM_API_TOKEN}"
      }
    }
  }
}
03

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.

ToolRiskDescription
create_notewriteCreate a new note in TriliumNext with duplicate title detection. When a note with the same title already exists in the same directory, you
delete_notedestructiveDelete a note permanently. ONLY use this tool when the user explicitly requests note deletion (e.g.,
get_notereadGet a note and its content by ID. Perfect for when someone wants to see what
list_children_notesreadList 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_notewriteMove 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_notewriteApply 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_attributesreadRead 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_idreadResolves 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_notedestructiveUpdate 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
04

Trust audit

CAUTIONgrade B · trust 86/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryWARN
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (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)

MEDIUMInventory / provenance · inv.symlink · CWE-1104
.agents
.agents
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
.codex
.codex
Why it matters. link not followed
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
delete_note, update_note
Why it matters. 2 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.symlink · CWE-1104
CLAUDE.md
CLAUDE.md
Why it matters. link not followed
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/duplicate-handling.test.js:16
import { handleCreateNote } from '../../build/modules/noteManager.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/list-children-notes.test.js:6
import { createReadTools } from '../../build/modules/toolDefinitions.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/list-children-notes.test.js:7
import { handleListChildrenNotes } from '../../build/modules/noteManager.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/list-children-notes.test.js:8
import { handleListChildrenNotesRequest } from '../../build/modules/noteHandler.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/patch-note.test.js:7
import { createWriteTools } from '../../build/modules/toolDefinitions.js';
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/DOCKER.md:61
-e TRILIUM_API_URL=http://192.168.1.100:8080/etapi \
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
.claude/skills/mcp-builder/scripts/requirements.txt
anthropic, mcp
Why it matters. 2 requirement(s) not pinned with ==
Fix. pin exact versions
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, axios, marked, mime-db, node-html-parser, safe-regex2, @types/node, typescript
Why it matters. 9 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.authority_framing · CWE-94, CWE-1427
src/README.md:78
PERMISSIONS="READ;WRITE"     // Full access
LOWPrompt injection · prompt.credential_read · CWE-94, CWE-1427
AGENTS.md:689
- **Issue**: Functions checked lowercase "read" vs uppercase "READ" environment variable
Why it matters. asks the agent to read credentials

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 44fc9c421191full audit observations/trust-audit/mcp-server/tan-yong-sheng__triliumnext.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-0744fc9c421191CAUTIONB86first audit
06

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.

Advertisement