About Triliumnext MCP
Triliumnext MCP is an MCP server published by tan-yong-sheng in the Developer Tools category: mCP server for TriliumNext Notes. Conduid read 11 tools from its source: create_note, delete_note, get_note, list_children_notes, manage_attributes, move_note and 5 more. No package is published for it, so it installs from a source checkout.
The repository has 69 stars and 8 forks, and its last commit was on 24 Mar 2026. Conduid has no tagged release on record for it. It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass License declared and Scoped permissions. Its topics include notes and trilium.
Install
git clone https://github.com/tan-yong-sheng/triliumnext-mcpTools (11)
create_noteCreate a new note. Supports 10 note types and allows creating attributes (labels and relations) in the same step.| Parameter | Type | Description |
|---|---|---|
| attributes | array | Optional attributes to create with the note (labels and relations). Enables one-step note creation with metadata. Labels use #tag format (e.g., 'important', 'project'), relations connect to other notes (e.g., template relations use 'Board', 'Calendar', 'Text Snippet'). ⚠️ TEMPLATE RESTRICTIONS: Container templates (Board, Calendar, Grid View, List View, Table, Geo Map) MUST be empty notes - add content as child notes. |
| content | string | Content of the note (optional). Content requirements by note type: TEXT notes require HTML content (plain text auto-wrapped in <p> tags, e.g., '<p>Hello world</p>', '<strong>bold</strong>'); CODE/MERMAID notes require plain text ONLY (HTML tags rejected, e.g., 'def fibonacci(n):'); ⚠️ OMIT CONTENT for: 1) FILE notes (binary content uploaded separately via fileUri parameter), 2) WEBVIEW notes (use #webViewSrc label instead), 3) Container templates (Board, Calendar, Grid View, List View, Table, Geo Map), 4) System notes: RENDER (create child HTML note with type='code' and mime='application/x-html', then link with ~renderNote relation), SEARCH (queries in search properties), RELATION_MAP (visual maps), NOTE_MAP (visual hierarchies), BOOK (container notes) - these must be EMPTY to work properly. When omitted, note will be created with empty content. |
| fileUri | string | File data source (required when type='file' or type='image'). Supports: 1) Local file path: '/path/to/document.pdf', 2) Base64 data URI: 'data:application/pdf;base64,JVBERi0xLjcK...', 3) Raw base64 string. Supports PDF, DOCX, PPTX, XLSX, CSV, MP3, WAV, M4A, JPG, JPEG, PNG, WebP formats. File will be uploaded via Trilium's two-step process: create note metadata, then upload binary content. |
| forceCreate | boolean | Bypass duplicate title check and create note even if a note with the same title already exists in the same directory. Use this when you want to intentionally create duplicate notes. |
| mime | string | MIME type for code/file/image notes. For file uploads, auto-detected from file extension when not specified. Supported: application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, audio/mpeg, audio/wav, audio/mp4, image/jpg, image/png, image/webp |
| parentNoteId * | string | ID of the parent note |
| title * | string | Title of the note |
| type * | string | Type of note (aligned with TriliumNext ETAPI specification). For file uploads: Use 'image' for Images (JPG/JPEG/PNG/WebP), 'file' for Documents & Audio (PDF/DOCX/MP3/WAV/M4A). Other types: 'text', 'code', 'render', 'search', 'relationMap', 'book', 'noteMap', 'mermaid', 'webView'. |
delete_notePermanently delete a note (⚠️ cannot be undone).| Parameter | Type | Description |
|---|---|---|
| noteId * | string | ID of the note to delete |
get_noteRetrieve a note and its content by ID. Can also be used with regex to extract specific patterns from the content.| Parameter | Type | Description |
|---|---|---|
| includeBinaryContent | boolean | Whether to include binary content for file/image notes (default: false). Set to true only when you need the actual binary data (e.g., for file downloads). Otherwise, keep false for faster responses. |
| includeContent | boolean | Whether to include note content (default: true). For file/image notes, this excludes binary content by default - use includeBinaryContent to retrieve binary data. |
| noteId * | string | ID of the note to retrieve |
| searchFlags | string | Search options. Defaults to 'gi' (find all matches, case-insensitive). |
| searchPattern | string | Optional pattern to search for within the note. Use when you need to find specific text or extract information. Note: Search is not available for file/image notes unless includeBinaryContent is true. |
| useRegex | boolean | Whether to use regex patterns (default: true). |
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.| Parameter | Type | Description |
|---|---|---|
| noteId * | string | ID of the parent note whose direct children to list |
manage_attributesCreate, update, or delete attributes on a note. Supports batch creation.| Parameter | Type | Description |
|---|---|---|
| attributes | array | Array of attributes to create/update/delete. Required for all write operations. IMPORTANT: Update operations have limitations - only label values/positions and relation positions can be updated. To change isInheritable or other properties, delete and recreate the attribute. |
| noteId * | string | ID of the note to manage attributes for |
| operation * | string | Operation type: 'create' (new attribute), 'update' (modify existing - limited to label value/position and relation position only), 'delete' (remove attribute), 'batch_create' (multiple new attributes efficiently) |
move_noteMove a note to a new parent folder. Use `branchId` only when the note has multiple parent branches.| Parameter | Type | Description |
|---|---|---|
| branchId | string | Optional: the specific branch ID to move. Required only when the note exists in multiple parent locations. If omitted and the note has multiple parents, the tool returns a list of available branches for you to choose from. |
| newParentNoteId * | string | ID of the destination parent note |
| noteId * | string | ID of the note to move |
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.| Parameter | Type | Description |
|---|---|---|
| expectedHash * | string | REQUIRED: blobId from get_note response. Prevents conflicts by ensuring you are patching the version you examined. |
| noteId * | string | ID of the note to patch |
| patches * | array | Batch list of patch operations to apply atomically. |
read_attributesRead all attributes (labels and relations) for a given note.| Parameter | Type | Description |
|---|---|---|
| noteId * | string | ID of the note to read attributes from |
resolve_note_idFind a note's ID by its title. Essential for getting a note's ID to use with other tools.| Parameter | Type | Description |
|---|---|---|
| autoSelect | boolean | When multiple matches found: true = auto-select best match (current behavior), false = stop and ask user to choose from alternatives (default: false for better user experience) |
| exactMatch | boolean | Whether to require exact title match. RECOMMENDED: Use false (default) for best user experience - fuzzy search finds partial matches and handles typos, while still prioritizing exact matches when found. Only set to true when user explicitly requests exact matching. |
| maxResults | number | Maximum number of results to return in topMatches array (default: 10) |
| noteName * | string | Name or title of the note to find (e.g., 'wqd7006', 'My Project Folder') |
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 filtering, and hierarchy navigation.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.| Parameter | Type | Description |
|---|---|---|
| content | string | Content of the note. Content requirements by note type: TEXT notes require HTML content (plain text auto-wrapped in <p> tags, e.g., '<p>Hello world</p>', '<strong>bold</strong>'); CODE/MERMAID notes require plain text ONLY (HTML tags rejected, e.g., 'def fibonacci(n):'); ⚠️ SYSTEM NOTES MUST REMAIN EMPTY: RENDER (HTML handled by note type), SEARCH (queries in search properties), RELATION_MAP (visual maps), NOTE_MAP (visual hierarchies), BOOK (container notes), WEBVIEW (use #webViewSrc label); IMPORTANT: When updating notes with template relations (Board, Calendar, Grid View, List View, Table, Geo Map), the note must remain EMPTY - these templates provide specialized layouts and content should be added as child notes instead. |
| expectedHash * | string | ⚠️ REQUIRED: Blob ID (content hash) from get_note response. This is Trilium's built-in content identifier that ensures data integrity by verifying the note hasn't been modified since you retrieved it. If you see an error about missing blobId, you MUST call get_note first to get the current blobId. |
| fileUri | string | File data source for file/image note updates. Replaces the existing file content with new file data. ⚠️ FILE TYPE MUST MATCH: The new file must have the same type as the current note (image files for image notes, other files for file notes). Supports: 1) Local file path: '/path/to/new_document.pdf', 2) Base64 data URI: 'data:application/pdf;base64,JVBERi0xLjcK...', 3) Raw base64 string. To change file types, create a new note instead. |
| mode | string | Content update mode. REQUIRED when updating content for text/code notes, optional for file-only updates. CRITICAL: Choose based on user intent: 'append' = add/insert content while preserving existing content (use for 'add to', 'append', 'insert', 'add more', 'continue writing'); 'overwrite' = completely replace all existing content (use for 'replace', 'overwrite', 'update all', 'completely replace'). Default behavior is not available - you MUST explicitly choose when updating content. |
| noteId * | string | ID of the note to update |
| revision | boolean | Whether to create a revision before updating (default: true for safety, title-only updates skip revision for efficiency) |
| title | string | New title for the note. If provided alone (without content), performs efficient title-only update without affecting note content or blobId. |
Security checks
Static checks derived from the repository a month ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 1.1K words.
- !License declaredNo license file. Legally you have no right to use it in a product.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionScanned 23 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
The repository's README runs to about 1.1K words, fetched a month ago. The original in the repository is authoritative.
Read full README