home / mcp / triliumnext mcp server
MCP server for TriliumNext Notes
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.
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.
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.
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.
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.
Unified search across notes with filters for keywords, dates, attributes, and hierarchy.
Find a note’s ID by its title for subsequent operations.
Retrieve a note’s content by ID, with optional content pattern extraction.
Create a new note with support for multiple types and attributes in one step.
Update a note’s title or content with mode-based or hash-conflict handling.
Permanently delete a note (irreversible action).
Read all attributes (labels and relations) for a given note.
Create, update, or delete attributes on a note, including batch operations.