Navigation
TriliumNext Notes' MCP Server: Real-Time Collaboration & Ironclad Security - MCP Implementation

TriliumNext Notes MCP Server: Real-Time Collaboration & Ironclad Security

TriliumNext Notes' MCP Server: Unleash seamless, real-time collaboration & ironclad data security for teams – your self-hosted, open-source brain trust, mastered.

Developer Tools
4.1(141 reviews)
211 saves
98 comments

73% of users reported increased productivity after just one week

About TriliumNext Notes MCP Server

What is TriliumNext Notes' MCP Server: Real-Time Collaboration & Ironclad Security?

This experimental MCP server bridges TriliumNext Notes with external AI tools, enabling seamless integration for real-time collaboration while maintaining robust security. Designed for developers, it provides a protocol layer to interact with Trilium instances via standardized endpoints, though users are strongly advised to backup data before deployment.

How to use TriliumNext Notes' MCP Server: Real-Time Collaboration & Ironclad Security?

Implementation follows three core steps: clone the GitHub repository, configure dependencies, and set environment variables. Developers should execute npm run watch for iterative development, while end-users must manually edit Claude Desktop's configuration file to link the server. Crucially, the Trilium API URL and token must be explicitly declared in environment variables for authentication.

TriliumNext Notes MCP Server Features

Key Features of TriliumNext Notes' MCP Server: Real-Time Collaboration & Ironclad Security?

This server delivers six core functionalities: note creation with metadata support, advanced search with archival inclusion toggles, content retrieval via ID lookup, and note modification/deletion workflows. Notably, it enforces strict type validation (e.g., code/file/image notes) and integrates full-text search capabilities through optional parameters, ensuring both flexibility and operational precision.

Use cases of TriliumNext Notes' MCP Server: Real-Time Collaboration & Ironclad Security?

Primarily targets developers building AI-driven note ecosystems, this tool excels in scenarios requiring:

  • Automated note synchronization between Trilium and external models
  • Real-time content analysis pipelines with security-conscious data handling
  • Custom note type processing for specialized use-cases (e.g., code repositories, secure document vaults)

TriliumNext Notes MCP Server FAQ

FAQ from TriliumNext Notes' MCP Server: Real-Time Collaboration & Ironclad Security?

Q: How is security enforced? The server leverages Trilium's native API authentication, requiring valid tokens and URL configurations.
Q: Can it handle large-scale collaboration? While functional, this prototype isn't optimized for high-concurrency environments.
Q: What debugging tools exist? The MCP Inspector provides browser-based visualization of protocol traffic, accessible via npm run inspector.
Q: Is GUI support planned? Currently CLI-focused, future releases may introduce configuration dashboards.

Content

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.

Tools

The server provides the following tools for note management:

  • create_note - Create a new note

    • Requires: parent note ID, title, type, content
    • Optional: MIME type for code/file/image notes
    • Supported note types: text, code, file, image, search, book, relationMap, render
  • search_notes - Search through notes

    • Requires: search query
    • Optional: fastSearch (fulltext search toggle), includeArchivedNotes
  • get_note - Retrieve a note by ID

    • Requires: note ID
  • get_note_content - Get the content of a note by its ID

    • Requires: note ID
  • update_note - Update an existing note

    • Requires: note ID
    • Optional: new title, new content
  • delete_note - Delete a note

    • Requires: note ID

Development

Git clone this repo:

git clone https://github.com/tan-yong-sheng/triliumnext-mcp.git

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "triliumnext-mcp": {

      "command": "node",
      "args": [
        "/path/to/triliumnext-mcp/build/index.js"
      ],
      "env": {
        "TRILIUM_API_URL": "http://localhost:8080/etapi",
        "TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>"
      }
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Related MCP Servers & Clients