Trilium MCP Server
Gemini CLI用 Trilium MCPサーバー
このプロジェクトは、Gemini CLIを使用してターミナルから直接Trilium Notesを管理するための、Model Context Protocol (MCP) サーバー、専用のGeminiスキル、および自律型エージェントを提供します。
機能
完全なETAPI統合: 自然言語を使用してノートの作成、検索、移動、編集を行います。
自律型エージェント: 複雑な整理タスクのための専用エージェント
trilium-assistant。専門スキル: Triliumのノートツリー構造と属性に関する専門的なガイダンス。
安全:
.envファイルを使用してAPIトークンを保護します。
Related MCP server: Notes MCP Server
🛠️ セットアップとインストール
1. 前提条件
Python 3.10以上
Node.js (Gemini CLI用)
Trilium Notes (ETAPIが有効であること)
2. リポジトリのクローン
git clone https://github.com/dhiraj-ydv/trilium-mcp.git
cd trilium-mcp3. 依存関係のインストール
pip install -r requirements.txt4. 環境変数の設定
環境変数のサンプルファイルをコピーし、Triliumの詳細情報を入力します:
cp .env.example .env.envを開き、以下を指定します:
TRILIUM_SERVER_URL: TriliumインスタンスのURL (例:http://localhost:8080)。TRILIUM_ETAPI_TOKEN: ETAPIトークン (Triliumの「設定」>「オプション」>「ETAPI」で生成)。
🚀 Gemini CLIでの使用方法
初期化
プロジェクトディレクトリ内で gemini を実行するだけです。CLIは .gemini/ フォルダで定義されたMCPサーバー、エージェント、スキルを自動的に検出します。
コマンド
自律型エージェントの使用
エージェントは、ノートを見つけて移動するといった複数ステップのタスクを処理できます:
@trilium-assistant move my 'Drafts' note into the 'Projects' folder.
直接MCPツールを使用する
直接的な操作を実行します:
mcp_trilium-mcp_create_note title="Meeting Notes" parentNoteId="root" content="Hello World"
スキルの有効化
ノートの構造化方法について専門的なアドバイスを得ます:
activate_skill trilium-notes
📂 プロジェクト構造
server.py: MCPサーバーの実装。.gemini/settings.json: サーバーを読み込むためのGemini CLI設定。.gemini/agents/trilium-assistant.md: 自律型エージェントの定義。.gemini/skills/trilium-notes/: Triliumワークフローのための専門知識。
🛡️ セキュリティ
このプロジェクトでは .gitignore を使用して、.env ファイルがGitHubにプッシュされないようにしています。.env ファイルやETAPIトークンは絶対に共有しないでください。
📄 ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Notes and actions in one app. Let Claude or ChatGPT read and update them.
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.
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.9114 npm69-
- 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,886 npm4MIT