home / mcp / triliumnext mcp server

TriliumNext MCP Server

MCP server for TriliumNext Notes

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "tan-yong-sheng-triliumnext-mcp": {
      "command": "npx",
      "args": [
        "triliumnext-mcp"
      ],
      "env": {
        "VERBOSE": "true",
        "PERMISSIONS": "READ;WRITE",
        "TRILIUM_API_URL": "http://localhost:8080/etapi",
        "TRILIUM_API_TOKEN": "<YOUR_TRILIUM_API_TOKEN>"
      }
    }
  }
}

You can use this MCP server to interact with your TriliumNext Notes instance through the MCP protocol, enabling automated note search, retrieval, creation, updates, and attribute management from compatible clients and automation workflows.

How to use

Connect a compatible MCP client to the server using one or more local stdio configurations, or run a containerized instance via Docker. You can then perform common note operations such as searching notes, retrieving note content, creating new notes, updating existing notes, and managing note attributes through the MCP endpoints. Ensure you supply the API URL and token from your Trilium Notes installation as shown in the example configurations.

How to install

Prerequisites: you need Node.js and npm installed if you plan to run MCP configurations that rely on npx. If you prefer Docker, you only need Docker installed.

Step 1: Clone the MCP server repository and navigate into it.

Step 2: Install dependencies.

Step 3: Build the server (if a build step is provided) and start the MCP server as shown in the configuration examples.

Step 4: Run one of the MCP client configurations described in the examples to connect to your TriliumNotes API.

Configuration and usage tips

Environment variables you must or may set when connecting to your TriliumNotes API are shown in the examples. These include the API URL, API token, and permission scope.

The server supports multiple MCP clients concurrently. You can configure more than one connection method, such as running a local stdio MCP instance and a separate Docker-based MCP runner.

Security and best practices

Protect your API token and do not expose it in public configurations. Use scoped permissions (READ;WRITE) to limit access according to your workflow. Rotate tokens regularly and monitor access to your MCP endpoints.

Available tools

search_notes

Unified search across notes with filters for keywords, dates, attributes, and hierarchy.

resolve_note_id

Find a note’s ID by its title for subsequent operations.

get_note

Retrieve a note’s content by ID, with optional content pattern extraction.

create_note

Create a new note with support for multiple types and attributes in one step.

update_note

Update a note’s title or content with mode-based or hash-conflict handling.

delete_note

Permanently delete a note (irreversible action).

read_attributes

Read all attributes (labels and relations) for a given note.

manage_attributes

Create, update, or delete attributes on a note, including batch operations.