chore(cursor): add Trilium MCP template and ignore local secrets

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-17 12:16:46 +08:00
parent 428eed7ae4
commit 3a467704d6
3 changed files with 34 additions and 0 deletions

14
.cursor/mcp.json.example Normal file
View file

@ -0,0 +1,14 @@
{
"mcpServers": {
"triliumnext-mcp": {
"command": "npx",
"args": ["-y", "triliumnext-mcp"],
"env": {
"TRILIUM_API_URL": "http://127.0.0.1:37840/etapi",
"TRILIUM_API_TOKEN": "<paste-from-trilium-settings>",
"PERMISSIONS": "READ;WRITE",
"VERBOSE": "false"
}
}
}
}

View file

@ -0,0 +1,12 @@
---
description: >-
Trilium 笔记维护。结构:收集箱/工作(Oclaw·NETX 各挂技术文档,NAS 项目)/生活/资料/归档。禁止改动 Demo、Default、Journal、博客。
alwaysApply: false
---
# Trilium 笔记维护
- MCP:`triliumnext-mcp`(`.cursor/mcp.json`)
- 规范:`skills/_workspace/generalist/knowledge-base-manager/SKILL.md`
- **禁止改动**:Trilium Demo、Default、Journal、博客(`#kb/immutable`)
- 仓库文档同步:`.\scripts\import_oclaw_netx_docs_to_trilium.ps1`(`-Update`)

8
.gitignore vendored
View file

@ -46,6 +46,9 @@ runtime/operations/scripts/.run/
desktop/node_modules/
desktop/dist/
desktop/runtime-data/
# Cursor MCP(含 Trilium token,复制 mcp.json.example 后本地填写)
.cursor/mcp.json
# _local/ 下其余文件均忽略(密钥、mcp_local.env 等)
platform/data/*.sqlite
platform/data/*.sqlite-journal
@ -73,3 +76,8 @@ vendor/oclaw/
# 仅本机使用的私有 skill(勿提交)
skills/_workspace/generalist/knowledge-base-manager/
# 本机 Trilium 文档导入(依赖个人 TRILIUM_API_*,勿提交;入口在仓库根 scripts/)
scripts/import_oclaw_netx_docs_to_trilium.py
scripts/import_oclaw_netx_docs_to_trilium.ps1
scripts/import_oclaw_netx_docs_to_trilium.sh