Trilium MCP Server
Enables users to manage Trilium Notes through natural language commands in the terminal. Provides full ETAPI integration for creating, searching, moving, and editing notes, along with an autonomous agent for complex organizational tasks.
README
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.
🛠️ 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-mcp
3. Install Dependencies
pip install -r requirements.txt
4. Configure Environment Variables
Copy the example environment file and fill in your Trilium details:
cp .env.example .env
Open .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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.