The TriliumNext Notes' MCP Server allows you to manage notes through the Model Context Protocol with these core functions:
Search Notes: Query notes with options for fast search and including archived items
Get Note: Retrieve a specific note by ID, with option to include/exclude content
Create Note: Add new notes with specified parent, title, type, and content; supports various formats (text, code, image) with optional MIME type
Update Note: Modify existing notes by changing title and content
Delete Note: Permanently remove notes by ID
Provides tools for interacting with a Trilium Notes instance, enabling note management operations including creating, searching, retrieving, updating, and deleting notes of various types (text, code, file, image, search, book, relationMap, render).
TriliumNext Notes' MCP Server
⚠️ 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.
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)
Related MCP server: Notion MCP Server
Installation
1. Using with Claude Desktop
Add the server config to your Claude Desktop configuration file:
For Local Installation (on Windows)
For Local installation (on Linux)
For Development (on Windows / Linux)
Location of the configuration file:
Windows:
%APPDATA%/Claude/claude_desktop_config.jsonMacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Feedback: Please report issues and test results at GitHub Issues
Available Tools
The server provides the following tools for note management:
Search & Discovery Tools
search_notes- Unified 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.resolve_note_id- Find a note's ID by its title. Essential for getting a note's ID to use with other tools.
Note Management Tools
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 9 note types and allows creating attributes (labels and relations) in the same step.update_note- Updates a note's title or content. Requires amode('overwrite'or'append') to specify the update type and anexpectedHashto prevent conflicts.delete_note- Permanently delete a note (⚠️ cannot be undone).
Attribute Management Tools
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.
📖 Detailed Usage: See Note Management Guide for revision control strategy and best practices.
Example Queries
Search & Discovery
"Find my most recent 10 notes about 'n8n' since the beginning of 2024"
"Show me notes I've edited in the last 7 days"
"List all notes under 'n8n Template' folder, including subfolders"
Content Management
"Add today's update to my work log" (uses
update_notewithmode: 'append')"Replace this draft with the final version" (uses
update_notewithmode: 'overwrite')"Create a new note called 'Weekly Review' in my journal folder"
📖 More Examples: See User Query Examples for comprehensive usage scenarios.
Documentation
Note Management Guide - Safe content editing with revision control
User Query Examples - Natural language query examples
Search Query Examples - Advanced search syntax and filters
Development
If you want to contribute or modify the server:
Contributing
Contributions are welcome! If you are looking to improve the server, please familiarize yourself with the official Trilium Search DSL documentation and our internal Search Query Examples to understand how search queries are constructed.
Please feel free to open an issue or submit a pull request.