# TriliumNext MCP Server

> Manage TriliumNext notes through MCP.

- **URL**: https://followmcp.com/en/servers/triliumnext-mcp
- **Category**: Other
- **Origin**: Community
- **Stars**: 72
- **FMRS Score**: 51/100 (Grade D)
- **Source**: https://github.com/perfectra1n/triliumnext-mcp
- **Transports**: stdio (local process), SSE, Streamable HTTP
- **Runtimes**: Node.js
- **Auth**: API key / credential required

## Overview
A Model Context Protocol server that interacts with a Trilium instance through TriliumNext ETAPI. It can create, read, update, and organize notes, and manage search, attachments, revisions, and system operations.

## Best for
- Individuals or teams with a TriliumNext instance and an ETAPI token.
- Users who want an MCP client to read, write, and organize Trilium notes.

## Not for
- Users without a Trilium instance or access to an ETAPI token.
- Read-only use cases, since the server includes deletion, writing, import, and restore operations.

## Required permissions
- Needs access to the configured Trilium ETAPI URL and an ETAPI token for authentication.
- Available operations include creating, updating, deleting, and organizing notes, and managing attachments, revisions, and system operations.
- Local file reads for attachment or image inputs are enabled by default in stdio mode and disabled by default in HTTP mode.

## Risks
- Write, delete, restore, import, and backup operations can change Trilium data; deletion can affect notes or attachments.
- HTTP multi-tenant mode accepts client-supplied Trilium URLs and tokens; the README describes SSRF checks and gateway authentication settings.
- Configure tokens and server access carefully; the README says logs do not include tokens or note bodies.

## Client config (JSON)
```json
{
  "mcpServers": {
    "trilium": {
      "command": "node",
      "args": ["/path/to/triliumnext-mcp/dist/index.js"],
      "env": {
        "TRILIUM_TOKEN": "<your_etapi_token>",
        "TRILIUM_URL": "<your_trilium_url>/etapi"
      }
    }
  }
}
```

## Tools (20)
- `get_note`: Read a note, optionally returning its body, embedded images, paths, and backlinks.
- `get_note_history`: View recent changes across the note tree, optionally filtered to a subtree.
- `create_note`: Create a note with support for Markdown, embedded images and files, and note-link placeholders.
- `write_note`: Update a note using metadata, replace, append, or edit mode.
- `delete_note`: Delete a note or restore a deleted note.
- `search_notes`: Search notes by full text or attributes, with filters, scoping, and optional content previews.
- `get_note_tree`: Explore the note hierarchy to a specified depth.
- `organize_note`: Move, clone, reorder, or unlink note branches.
- `get_attributes`: Read all attributes of a note or a specific attribute.
- `set_attribute`: Add or update a note attribute.
- `delete_attribute`: Delete an attribute by ID.
- `get_special_note`: Get a day, week, month, year, inbox, or other special note for a date or the current period.
- `get_attachment`: List a note's attachments or read an attachment's content.
- `create_attachment`: Create an image or file attachment for a note.
- `write_attachment`: Update attachment metadata, replace its content, or edit it.
- `delete_attachment`: Delete an attachment.
- `get_revisions`: List a note's revisions or read a specific revision.
- `restore_revision`: Restore a note to a revision, optionally snapshotting its current state first.
- `create_revision`: Create a revision snapshot of a note.
- `manage_system`: Run backup, subtree export or import, app-info, or metrics operations.
