MCP server for TriliumNext Notes

MCP server for TriliumNext Notes

triliumnext-mcp•bytan-yong-sheng

A prototype Model Context Protocol server that exposes tools for searching, reading, creating, updating, moving, and deleting notes in a Trilium Notes instance.

License: Not specified•Runtime: Awaiting documentation review•Category: productivity work

WHAT IT DOES

  • •Provides search and discovery tools including unified note search, note ID resolution by title, and listing of direct child notes.
  • •Supports note management including retrieval, creation, updates, moving, patching, and deletion.
  • •Provides attribute management tools to read and manage labels and relations on notes.
  • •Enforces configurable read and write permissions through an environment variable.

BEST FOR

  • •Users who want to search and browse their Trilium notes through an MCP-capable AI client.
  • •Users who want to create, append to, or overwrite note content from an AI client.
  • •Developers prototyping MCP integration with TriliumNext Notes who can back up their notes beforehand.

ABOUT TRILIUMNEXT-MCP

MCP server for TriliumNext Notes is cataloged as an MCP server attributed to tan-yong-sheng. A prototype Model Context Protocol server that exposes tools for searching, reading, creating, updating, moving, and deleting notes in a Trilium Notes instance. It is categorized under productivity work. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for TriliumNext Notes are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What does the PERMISSIONS environment variable control?

It controls which tools are accessible: the default READ;WRITE setting grants read access to search and retrieval tools and write access to create, update, delete, and attribute management tools.

Does deleting a note through the server allow recovery?

No, the delete tool permanently deletes a note and the README warns that it cannot be undone.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 1af5b220aba2 · 采集于 2026-11-13 09:02:31 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

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. 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": "<YOUR_TRILIUM_API_TOKEN>",
        "PERMISSIONS": "READ;WRITE"
      }
    }
  }
}
Claude Code
claude mcp add triliumnext-mcp \
  -e TRILIUM_API_URL=http://localhost:8080/etapi \
  -e TRILIUM_API_TOKEN=<YOUR_TRILIUM_API_TOKEN> \
  -e PERMISSIONS='READ;WRITE' \
  -- npx triliumnext-mcp

Note: Increase the MCP startup timeout to 1 minutes and MCP tool execution timeout to about 5 minutes by updating ~\.claude\settings.json as follows:

{
  "env": {
    "MCP_TIMEOUT": "60000",
    "MCP_TOOL_TIMEOUT": "300000"
  }
}
Cursor

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.

{
  "mcpServers": {
    "triliumnext-mcp": {
      "command": "npx",
      "args": ["triliumnext-mcp"],
      "env": {
        "TRILIUM_API_URL": "http://localhost:8080/etapi",
        "TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
        "PERMISSIONS": "READ;WRITE"
      }
    }
  }
}
Cline

Cline uses a JSON configuration file to manage MCP servers. To integrate the provided MCP server configuration:

  1. Open Cline and click on the MCP Servers icon in the top navigation bar.
  2. Select the Installed tab, then click Advanced MCP Settings.
  3. In the cline_mcp_settings.json file, add the following configuration:

(i) Using Google AI Studio Provider

{
  "mcpServers": {
    "timeout": 300, 
    "type": "stdio",
    "triliumnext-mcp": {
      "command": "npx",
      "args": ["triliumnext-mcp"],
      "env": {
        "TRILIUM_API_URL": "http://localhost:8080/etapi",
        "TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
        "PERMISSIONS": "READ;WRITE"
      }
    }
  }
}
Other MCP clients

The server uses stdio transport and follows the standard MCP protocol. It can be integrated with any MCP-compatible client by running:

npx triliumnext-mcp
Using Docker to run MCP (beta)

Using Pre-built Image from GitHub Container Registry

Pull and run the latest image:

docker pull ghcr.io/tan-yong-sheng/triliumnext-mcp:latest

Then, put this configuration for your your mcp: (Note: remember to change your TRILIUM_API_URL and TRILIUM_API_TOKEN here)

{
  "mcpServers": {
    "triliumnext-mcp-docker": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "TRILIUM_API_URL",
        "-e",
        "TRILIUM_API_TOKEN",
        "-e",
        "PERMISSIONS",
        "-e",
        "VERBOSE",
        "ghcr.io/tan-yong-sheng/triliumnext-mcp:latest"
      ],
      "env": {
        "TRILIUM_API_URL": "https://trilium:8080/etapi",
        "TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>",
        "PERMISSIONS": "READ;WRITE",
        "VERBOSE": "false"
      }
    }
  }
}

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.
  • list_children_notes - List the direct child notes of a parent note using a deterministic search query. Returns child summaries sorted by creation date and title.

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 10 note types and allows creating attributes (labels and relations) in the same step.
  • update_note - Updates a note's title or content. Requires a mode ('overwrite' or 'append') to specify the update type and an expectedHash to prevent conflicts.
  • move_note - Move a note to a new parent folder. Use branchId only when the note has multiple parent branches.
  • patch_note - Apply 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.
  • 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"
  • "List the direct child notes of this folder"

Content Management

  • "Add today's update to my work log" (uses update_note with mode: 'append')
  • "Replace this draft with the final version" (uses update_note with mode: 'overwrite')
  • "Create a new note called 'Weekly Review' in my journal folder"

📖 More Examples: See User Query Examples for comprehensive usage scenarios.

Documentation

Development

If you want to contribute or modify the server:

# Clone the repository
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

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.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for TriliumNext Notes from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/triliumnext-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related productivity work MCP Servers

Alternative and complementary servers in the same category

View all in productivity work →
Tuqui hosted MCP server for Odoo
tuqui-odoo-mcp-for-claude-chatgpt•tuqui-ai

Tuqui is a hosted MCP server that connects Odoo with Claude and ChatGPT so users can ask about sales, stock, customers and overdue invoices in plain language.

Repository stats unavailable
Productivity & Ops