Trilium MCP Server
用于 Gemini CLI 的 Trilium MCP 服务器
本项目提供了一个模型上下文协议 (MCP) 服务器、一个专门的 Gemini 技能以及一个自主代理,用于使用 Gemini CLI 直接从终端管理 Trilium Notes。
功能特性
完整的 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.915565
- 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.103,8604MIT
Related MCP Connectors
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Cross-session, cross-device memory for your agent: remember and recall notes. No key to start.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dhiraj-ydv/trilium-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server