Trilium MCP Server
Provides full ETAPI integration for Trilium Notes, enabling creation, search, movement, and editing of notes using natural language commands through the Gemini CLI.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Trilium MCP Servercreate a note titled 'Meeting Notes' under my 'Work' folder"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Trilium MCP Server for Gemini CLI
This project provides a Model Context Protocol (MCP) server, a specialized Gemini Skill, and an autonomous Agent for managing Trilium Notes directly from your terminal using the Gemini CLI.
Features
Full ETAPI Integration: Create, search, move, and edit notes using natural language.
Autonomous Agent: A dedicated
trilium-assistantagent for complex organizational tasks.Specialized Skill: Expert guidance on Trilium's note tree structure and attributes.
Secure: Uses a
.envfile to protect your API tokens.
Related MCP server: Notes MCP Server
🛠️ Setup & Installation
1. Prerequisites
Python 3.10+
Node.js (for Gemini CLI)
Trilium Notes (with ETAPI enabled)
2. Clone the Repository
git clone https://github.com/dhiraj-ydv/trilium-mcp.git
cd trilium-mcp3. Install Dependencies
pip install -r requirements.txt4. Configure Environment Variables
Copy the example environment file and fill in your Trilium details:
cp .env.example .envOpen .env and provide:
TRILIUM_SERVER_URL: Your Trilium instance URL (e.g.,http://localhost:8080).TRILIUM_ETAPI_TOKEN: Your ETAPI token (generated in Trilium Settings > Options > ETAPI).
🚀 Usage with Gemini CLI
Initialization
Simply run gemini inside the project directory. The CLI will automatically discover the MCP server, Agent, and Skill defined in the .gemini/ folder.
Commands
Using the Autonomous Agent
The agent can handle multi-step tasks like finding a note and moving it:
@trilium-assistant move my 'Drafts' note into the 'Projects' folder.
Using Direct MCP Tools
Perform surgical actions directly:
mcp_trilium-mcp_create_note title="Meeting Notes" parentNoteId="root" content="Hello World"
Activating the Skill
Get expert advice on how to structure your notes:
activate_skill trilium-notes
📂 Project Structure
server.py: The MCP server implementation..gemini/settings.json: Configuration for the Gemini CLI to load the server..gemini/agents/trilium-assistant.md: The autonomous agent definition..gemini/skills/trilium-notes/: Specialized knowledge for Trilium workflows.
🛡️ Security
This project uses a .gitignore to ensure your .env file is never pushed to GitHub. Never share your .env file or ETAPI token.
📄 License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
- KnowtisOAuthapp.knowtis
Create, search and manage Knowtis collaborative notes from AI assistants.
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Related MCP Servers
- FlicenseAqualityCmaintenanceA model context protocol server that allows interaction with TriliumNext Notes, providing tools to create, search, retrieve, update, and delete notes through natural language commands.963 npm68-
- AlicenseAqualityDmaintenanceEnables creating, managing, and searching Markdown notes with support for tags, timestamps, and full-text search. Includes AI prompts for analyzing and summarizing notes.61MIT
- FlicenseAqualityDmaintenanceEnables comprehensive management of Obsidian vaults with full CRUD operations, advanced search, link/tag extraction, backlinks discovery, frontmatter editing, and template-based note creation through natural language.16-
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Obsidian vaults for creating, reading, searching, and managing notes, daily notes, TODOs, session reports, and backlinks through both stdio and HTTP/SSE transports.102,778 npm4MIT